-
-
Notifications
You must be signed in to change notification settings - Fork 955
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
Could not find root view for a given ancestor with tag #1675
Comments
I have the same problem in production. |
facing same issue |
Any update on this one. occuring for me as well. Every time I try restarting the app programatically. "react-native": "0.65.1", |
we are also suffering from this problem reported by users online. EXPECTING a solution! |
+1 |
1 similar comment
+1 |
We are also seeing this with:
|
+1 |
1 similar comment
+1 |
+1
|
Same issue here too |
Same issue here too |
This may not really be a fix, but we found a workaround for this that is working well for us. We are using:
... and just return instead of throwing. Honestly we're not exactly sure of the ramifications of this, but the app seems to behave normally in this scenario.
|
@systemride Thanks for sharing. Are you also using codepush? |
Well, unfortunately, your trick won't do for me, my app goes completely blank |
I updated my comment, you might also try adding flex styles to the component. Eg:
|
No, not using codepush. |
Damn, I did not even thought about that, I ended up using patch-package to patch the module and return instead of throw, I don't have any overrides on my MainActivity.java, it's working fine, I may try your way tho thanks! |
@federicot You asked if another user was using Codepush. Are you aware of a relationship between Codepush and this crash? My team is seeing an increase in crashes with this stacktrace, and it's not clear to us why. Unlike @systemride , we are using Codepush, and the crashes seem to have increased after a Codepush. |
Our team is also using Codepush. Crashes with this stack trace is pretty common after a codepush restart on Android. We have our app wrapped in |
@nchase We are seeing a slight correlation when we do codepush releases. There's also this related issue #1724 |
We use codepush too |
As a temporal solution, we made a fork of stack navigator and replaced the |
Codepush user, also seeing similar crash |
We have the same issue after the codepush releases |
There is interesting analysis by @netshade @kmagiera Hi, could you explain please the reason for checking Do you have a plan to fix this issue or maybe any workarounds? What do you think about this advice #1675 (comment) |
I was able to resolve this issue in my project. The problem is that This means that if any RN-GestureHandler components begin initializing before a To solve this, you have to make sure there are no instances of RN-GestureHandler in the process of loading before a In our case, when our app loads we begin a codepush sync. While the codepush is in any of these states, we render a simple View with no gesture handlers or react-navigation are mounted: Only after the codepush is completely finished, it's safe to mount any react-navigation components. |
I have the same problem with code push in production. What I don't understand is that it is not systematic and in staging we are not able to reproduce it. |
It's not systematic because it's a race condition between 'attachGestureHandler' and codepush/ReactNativeInstanceHandler. If the gesture handler wins, then there is no crash. If you try it on an older Android phone, you should be able to reproduce it. I have a Samsung galaxy J3 and can reproduce it fairly often. |
Does anyone have steps that we can follow to consistently reproduce this bug? (ideally in an emulator) |
+1 |
We have a lot of these crashes but we do not use codepush so while it seems to be triggered by a codepush restart it can also happen in apps that do not use codepush at all. |
We're facing the same issue with OTA updates by expo-updates. It's happening since we upgraded react native to 0.66 |
we found a way to test this out. In our case, our codePush installMode uses the
Hope this helps |
The error doesn't say "Could not find" but "Could find". |
@systemride have you discovered any issues related to your workaround? |
This next one is more of a question for the maintainers: why is it desirable to throw an error in this case? |
So far we have not discovered any other issues to our workaround but it's still something we want to revisit. Also maybe worth noting... that while we don't use codepush, we do use react-native-restart which might do something similar to codepush. |
+1 |
same problem here, any solution? |
We're facing the same issue with OTA updates by expo-updates. It's happening since we upgraded react native to 0.66 |
@kmagiera maybe this is a question that you can answer, since it seems that you may have written this code originally: why does this library throw an error in this case? |
We have the same issue here, any updates? |
We're facing the same issue with OTA updates by expo-updates. It's happening since we upgraded react native to 0.66 |
We're facing the same issue with OTA updates by expo-updates. It's happening since we upgraded react native to 0.66 |
0.66.2 + react-native-gesture-handler + CodePush same issues |
`tryInitializeHandlerForReactRootView` was causing crashes, especially with combination with CodePush. `RNGestureHandlerEnabledRootView` was deprecated in version 2.0.0 in favor of `GestureHandlerRootView` component and this PR removes implementation of `RNGestureHandlerEnabledRootView` and code responsible for interactions with it. Adds a new page in docs explaining how to migrate to `GestureHandlerRootView`. Potentially fixes #1675.
Thank you, @j-piasecki ❤️ Has anyone had time to try #1936 as a patch? |
hi @LFMAKER @brduck are you guys find a way to solve this on expo? |
are there any solutions? |
any solution??? RN 0.69 |
Thank you! "react-native": "0.67.2", Version numbers stayed the same and I don't have the code from step 3. So I only implemented steps 1 and 2 |
Description
We are seeing the following crash on Android:
Screenshots
Steps To Reproduce
I was not able to reproduce it consistently, but it seems to happen after the app goes to foreground.
Package versions
The text was updated successfully, but these errors were encountered: