-
-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blank page when using setParams
in ReactNavigationv5 on Android 8
#544
Comments
Can you provide a repo/snack with minimal configuration needed to reproduce the issue? |
Sure, trying to create repo now. One question regarding the If I am not using |
@WoLewicki repo here: https://github.com/alimek/react-native-screens-bug by default app will open with "blank" screen, please comment line https://github.com/alimek/react-native-screens-bug/blob/master/App.tsx#L20 and you will get default RN screen page. While testing noticed, that the same is happening on all androids: 8, 9, 10. For some reason on my app it was happening only on 8, but maybe i was lost with android version while testing it :P |
So does it happen on all Android versions or not? I added this screen to my app with Android 10 and everything works just fine. |
Could you check if applying react-navigation/react-navigation#8473 fixes your issue? |
yes, it does! 🎉 |
Ok so I am closing this issue. Feel free to comment if there is something wrong. |
Can you repro it on a small example? |
sure, will prepare tomorrow or on Monday |
@WoLewicki any hint how can i debug this on my app? My Android dev expierence is not big and cant reproduce it in simple app, which means must be something related to my app code, but cant find what really is causing problem. Like you see on screenshot, i have the ViewID but cant find anything in I have component which has aniamted splashscreen when app is cold opened and then redirecting to login or user module, I noticed when module is
I would assume something must be with RN clearing Screens once they are created/removed dynamically. |
Isn't it the same issue as #463? |
yes, looks like its the same problem. @edit |
I managed to get rid of crash on Android. Not sure if that's a bug or not, but i couldnt reproduce it on simple app without any extra heavy logic which my app is doing. Problem on my app was, that once user is logged in, in very short time my app was trying to render Main app component with whole drawer and bottom navigation and then back to Splash screen when animation was happening and navigating to this main screen again. I was not aware that main app compoennt was loaded (it was that quick). After adding some more condition to prevent doing that, crash is not happening and everything is working fine. @WoLewicki i am patching the Thanks for help! |
Added `collapsable={false}` to the View in order for the Android to render screens properly. This issue is most probably similar to 9c06a92 but fixes it on Android since the View seems to be removed from a native view hierarchy due to not drawing anything. To see the bug go to software-mansion/react-native-screens#544.
Nice! Could you try and repro it anyhow and add this repro to the #463 even if it seems a bit big? It would greatly help us remove the problem. |
Added `collapsable={false}` to the View in order for the Android to render screens properly. This issue is most probably similar to react-navigation@9c06a92 but fixes it on Android since the View seems to be removed from a native view hierarchy due to not drawing anything. To see the bug go to software-mansion/react-native-screens#544.
Added `collapsable={false}` to the View in order for the Android to render screens properly. This issue is most probably similar to react-navigation/react-navigation@9c06a92 but fixes it on Android since the View seems to be removed from a native view hierarchy due to not drawing anything. To see the bug go to software-mansion/react-native-screens#544.
Added `collapsable={false}` to the View in order for the Android to render screens properly. This issue is most probably similar to react-navigation/react-navigation@9c06a92 but fixes it on Android since the View seems to be removed from a native view hierarchy due to not drawing anything. To see the bug go to software-mansion/react-native-screens#544.
Added `collapsable={false}` to the View in order for the Android to render screens properly. This issue is most probably similar to react-navigation/react-navigation@9c06a92 but fixes it on Android since the View seems to be removed from a native view hierarchy due to not drawing anything. To see the bug go to software-mansion/react-native-screens#544.
Added `collapsable={false}` to the View in order for the Android to render screens properly. This issue is most probably similar to react-navigation/react-navigation@9c06a92 but fixes it on Android since the View seems to be removed from a native view hierarchy due to not drawing anything. To see the bug go to software-mansion/react-native-screens#544.
Hello,
Found issue where calling
setParams
incomponentDidMount
for example is casuing blank page on Android 8.Everything works fine on Android 9+ in my app.
If I remove
enableScreens()
, everything works fine.Found workaround that adding timeout for 100ms and then call
setParams
is also working fine.react-native-screens: 2.8.0
@react-navigation/bottom-tabs": "^5.5.2"
@react-navigation/drawer": "^5.8.2"
@react-navigation/native": "^5.5.1"
@react-navigation/stack": "^5.5.1"
anyone faced similar issue?
The text was updated successfully, but these errors were encountered: