Closed jakemmarsh closed 2 years ago
same issue for react native 0.59.5 react-native-code-push 5.6.0 react-native-gesture-handler 1.1.0
@jakemmarsh Follow this comment https://github.com/facebook/react-native/issues/25924#issuecomment-517894044
for react-native version > 0.60 you are missing the androidx support for the react native gesture handler as react-native gesture handler is not upgraded yet for androidx support.
@HarshitMadhav error also exists for version 0.59.5, below 0.60
@capslock35 because by default androidx is enabled and this react-native gesture handler doesnt have the support for androidx till now. Run the command gradlew app:dependencies
in android folder to know which libraries of your project are using androidx
Any update for this, happening to me on react native 0.59.10
?
@Asleepace read out my last comment
@HarshitMadhav androidx is only on react native 0.60+
but I'm using a lower version and this still occurs on some android devices. Seems to be a race condition.
No, somehow your project might be using the updated androidx support third party library. run gradlew app:dependencies
to check which library is using androidx and try running the project removing that library and then installing the android library only.
Hello, I've the same problem here, using react native 0.60.5, I've this error:
Expect view tag to be set for com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView
I'm using jetifier but still having this issue..
We are also facing the same issue. We are using Reacr-native 60.4 and also using code-push
@HarshitMadhav we are using RN 0.60.4 and also code push. RN 0.60.4 uses androidx. How to resolve this issue for RN 0.60.4? also we noticed this issue only after code push update
We're also facing this issue. I can't say definitely that the issue appears after Code Push update, but I see logs for users, that haven't installed the update yet.
RN: 0.59.10 RNGH: 1.4.1
Check that your view is a real view, a react component, and that the view is the only thing currently on the screen. I've added an alert("ok") for testing the startup of the app in the index.js file (shame on me) and the alert was the view on the screen at the startup of the app, so react native gesture was searching for the tag on an alert and not on a component...
We are seeing this issue with the following versions, we also run jetifier on postinstall
"react-native": "0.61.2"
"react-native-gesture-handler": "1.4.1"
"react-native-code-push": "5.6.0"
Any suggestion on a path forward?
facing the same issue in RN 61.4
"react-native": "0.61.4",
"react-navigation": "4.0.10",
"react-navigation-stack": "1.10.3",
"react-navigation-tabs": "2.5.6",
"react-native-gesture-handler": "1.5.0",
@jakemmarsh how did you end up working around this bug?
@schumannd unfortunately I didn't. Priorities have shifted but the bug was still occurring last I knew.
My issue was caused by attempting to navigate to a different screen while CodePush was trying to restart. Stopping that fixed the issue for me.
Hello, any updates for this? The same issue is still happening with the following versions:
"react-native": "0.61.5",
"react-native-code-push": "6.2.0",
"react-native-gesture-handler": "1.6.1",
"react-navigation": "4.3.9"
Same issue as danut-t with :
"react-native": "0.61.5",
"react-native-code-push": "6.2.0",
"react-native-gesture-handler": "1.6.1",
"react-navigation": "4.3.9"
We're getting this error as a crash for prod builds.
I can confirm it's after a CodePush sync
has been fired
Same issue
"react-native": "0.61.5", "react-native-code-push": "6.2.1", "react-native-gesture-handler": "1.6.1", "react-navigation": "4.4.0"
Same issue
"react-native": "0.63.2", "react-native-code-push": "6.3.0", "react-native-gesture-handler": "1.7.0", "@react-navigation/native": "5.7.3"
Same issue in our production app hope someones provide a solution: react-native: 062.2 "react-native-gesture-handler": "version": "1.7.0", "react-navigation": "version": "4.3.9",
Trying to navigate when codePush.restartApp()
cannot reproduce the error :(
Happening to me too, RN63.3, RNGestureHandler: "react-native-gesture-handler": "1.6.1", "react-native": "0.63.3",
We've got a lot of cases with such issue in Crashlytics. Mostly for Android 9, 10 and 11. "react-native-gesture-handler": "1.6.0", "react-native": "0.62.2".
@HarshitMadhav should adding "npx jetify" at the postinstall step fix such issue?
same issue here, any workarounds?
Fatal Exception: java.lang.IllegalStateException: java.lang.IllegalStateException: Expect view tag to be set for com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView{bbcb787 V.E...... ........ 0,0-1080,2400} at com.facebook.react.bridge.ReactContext.handleException(ReactContext.java:390) at com.facebook.react.bridge.ReactContext$ExceptionHandlerWrapper.handleException(ReactContext.java:397) at com.facebook.react.bridge.GuardedRunnable.run(GuardedRunnable.java:33) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7565) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Got this error on google console and there are many crashes due to it. Any solution?
I also get a fair number of crashes here. Looking at the code that triggers it here: https://github.com/software-mansion/react-native-gesture-handler/blame/master/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.java#L44-L47 , I'm trying to understand what would cause it to get into this state. The React Native code that exercises it ( https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java#L100-L107 by way of https://github.com/software-mansion/react-native-gesture-handler/blob/master/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.java#L603 ) seems to absolutely have a tag associated with the View ( otherwise, how could the exception even be reached? ), but the id
of the View is < 1. And that is also confusing to me, because my reading of that seems to indicate that any id
< 1 is invalid, but my presumption looking at Android / the view resolver is that any integer value of id
that is not View.NO_ID
( -1 , see: https://developer.android.com/reference/android/view/View?authuser=3#NO_ID ) is a valid id. However, is there some other React Native protocol that needs to be followed here? Is View id 0
special somehow and that is also being accommodated for? I'd be happy to submit a PR that is in the neighborhood of trying to address this, but would want to know that I'm not ignoring other React Native protocols that are in play here.
cc @kmagiera who wrote the original exception here, just in case you have any insight afa what might be up.
My app is running
react-native
0.60.4 andreact-native-gesture-handler
1.3.0. It also usesreact-native-code-push
5.6.0 for OTA updates.It checks for and installs any new updates on app launch. After installation, the app is restarted with the new version. Upon restart, my Android users are frequently hitting an exception:
Any previous issues I've found around this exception mention issues with
componentDidMount
state logic inside gesture handler components. However, I don't believe I'm doing any of that. The only component I'm using directly isSwipeable
.