question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

java.lang.IllegalStateException: Expect view tag to be set on CodePush restart

See original GitHub issue

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:

IllegalStateException
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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:18
  • Comments:31 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
tylorrcommented, Nov 20, 2019

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.

3reactions
mrigocommented, Sep 16, 2019

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…

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.IllegalStateException: Expect view tag to be set on ...
java.lang.IllegalStateException: Expect view tag to be set on CodePush restart ... My app is running react-native 0.60.4 and react-native-gesture-handler 1.3.0.
Read more >
Releasing CodePush updates using the App Center CLI
How to use and set up the App Center CLI to release CodePush updates. ... View the app, its collaborators, deployments, and release...
Read more >
Trying to remove a view index above child count 0 view tag: 1
My problem seems to be fixed after removing all state changes from UPDATE_INSTALLED case. e.g. codePushStatusDidChange(status: number): void { ...
Read more >
Become a React Native DevOps developer with App Center ...
Depends on your CodePush configuration, your app will either prompt users with an update dialog or silently download a new JS bundle file...
Read more >
caused by: org.gradle.internal.metaobject ... - You.com
Try updating your build.gradle file to the following and see if it works. ... (1 m 37 s 348 ms) Caused by: java.lang....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found