-
Notifications
You must be signed in to change notification settings - Fork 3k
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
App crashed when navigate to WebView component #3052
Comments
I also use version 13.2.2 the option |
i have disabled navigation transition animations |
What platform are you seeing this on? |
It might be related to the memory leak RNWW introduced on 13.0.0. |
@suneox worked for me too. And the problem is android specific. |
If it's Android-specific and software rendering helps, it might be related to #2874 |
I would like to build an app on Android and iOS platform.
I have found this solution too, and it works for me as well. Thanks. I have found the reason of this issue is something related to React-Naive-Navigation library, the WebView able to re-render with no problem when I added attribute 'animation: "none"' in <Stack.Navigator>. I guess the animation trigger the parent component re-render before the WebView is load completely, hope it helps. Thank you for all suggestions. |
Yes that does sound related. Thanks @KPB98115 for updating. This issue doesn't use The repro that #2874 focused on was using a (which is to say, if you don't want to use software rendering or the opacity trick or turn off transition animations, you could try patching the changes from that PR) |
Thanks this worked for me |
Bug description:
I am using react-native-navigation to route two components, WebView will appear when navigate to component.In the first time of navigation is nothing wrong, but the App was crashed when I navigate to WebView component in second time with no error message show in the terminal. I have tried to unmount the WebView with conditional rendering after user was left the current component(code example in below), but somehow it still can't fix this issue.
I notice that the WebView could be appear/render successfully at the first time navigate to this component when I am just return WebView component with no conditional rendering or change isNavigated state to true after the parent component is rendered, but not like the way in above example, the App will crash when navigate to WebViewPage component in the first time.
I also notice that component have render successfully, because the useFocusEffect hook was invoke in proper way. So I think the issue is about the WebView, but I have no idea why these mess happened.
Expected behavior:
I expect the WebView component will appear everytime when user navigate back and forward between two components, the WebView component should reset after the user left the MainPage component.
Screenshots/Videos:
Environment:
The text was updated successfully, but these errors were encountered: