My app is running react-native 0.60.4 and react-native-gesture-handler 1.3.0. It also uses react-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:
Expect view tag to be set for com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView{3cdcdcc V.E...... ........ 0,0-1440,2392}
com.swmansion.gesturehandler.react.RNGestureHandlerRootHelper in <init> at line 45
com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView in initialize at line 49
com.swmansion.gesturehandler.react.RNGestureHandlerModule$2 in execute at line 603
com.facebook.react.uimanager.UIViewOperationQueue$UIBlockOperation in execute at line 530
com.facebook.react.uimanager.UIViewOperationQueue$1 in run at line 844
com.facebook.react.uimanager.UIViewOperationQueue in flushPendingBatches at line 952
com.facebook.react.uimanager.UIViewOperationQueue in access$2200 at line 44
com.facebook.react.uimanager.UIViewOperationQueue$2 in runGuarded at line 910
com.facebook.react.bridge.GuardedRunnable in run at line 24
android.os.Handler in handleCallback at line 873
android.os.Handler in dispatchMessage at line 99
android.os.Looper in loop at line 193
android.app.ActivityThread in main at line 6718
java.lang.reflect.Method in invoke
com.android.internal.os.RuntimeInit$MethodAndArgsCaller in run at line 495
com.android.internal.os.ZygoteInit in main at line 858
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 is Swipeable.
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",
Most helpful comment
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.