Error on some Android phone

I got this error message affecting some Android users in production. Any idea if this is expo splash screen related or should I be looking elsewhere?

java.lang.IllegalStateException: 
  at android.view.ViewGroup.addViewInner (ViewGroup.java:5038)
  at android.view.ViewGroup.addView (ViewGroup.java:4869)
  at android.view.ViewGroup.addView (ViewGroup.java:4809)
  at android.view.ViewGroup.addView (ViewGroup.java:4782)
  at expo.modules.splashscreen.SplashScreenController$showSplashScreen$2.run (SplashScreenController.kt:33)
  at android.app.Activity.runOnUiThread (Activity.java:6347)
  at expo.modules.splashscreen.SplashScreenController.showSplashScreen (SplashScreenController.kt:32)
  at expo.modules.splashscreen.SplashScreenController.showSplashScreen$default (SplashScreenController.kt:31)
  at expo.modules.splashscreen.SplashScreenController$handleRootView$1.onChildViewRemoved (SplashScreenController.kt:116)
  at android.view.ViewGroup.dispatchViewRemoved (ViewGroup.java:4939)
  at android.view.ViewGroup.removeViewInternal (ViewGroup.java:5388)
  at android.view.ViewGroup.removeViewAt (ViewGroup.java:5310)
  at com.facebook.react.uimanager.ViewGroupManager.removeViewAt (ViewGroupManager.java:68)
  at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren (NativeViewHierarchyManager.java:457)
  at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute (UIViewOperationQueue.java:205)
  at com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:779)
  at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches (UIViewOperationQueue.java:888)
  at com.facebook.react.uimanager.UIViewOperationQueue.access$2200 (UIViewOperationQueue.java:42)
  at com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded (UIViewOperationQueue.java:846)
  at com.facebook.react.bridge.GuardedRunnable.run (GuardedRunnable.java:29)
  at android.os.Handler.handleCallback (Handler.java:873)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:201)
  at android.app.ActivityThread.main (ActivityThread.java:6810)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)

Any hint would be really helpful.

Cheers!

1 Like

Hey @hackandroll,

The logs seem to indicate that the SplashScreen module could be the culprit. Have you been able to discern any patterns with those users that are affected? Such as same hardware, OS version, etc?

Cheers,
Adam

Getting the same error, doesn’t seem like it depends on hardware/OS:

Found this issue https://github.com/expo/expo/issues/7821
Trying to set "fallbackToCacheTimeout": 0 in app.json to see if avoiding reloads helps.

Same problem here.
image

java.lang.IllegalStateException: 
  at android.view.ViewGroup.addViewInner (ViewGroup.java:5857)
  at android.view.ViewGroup.addView (ViewGroup.java:5678)
  at android.view.ViewGroup.addView (ViewGroup.java:5618)
  at android.view.ViewGroup.addView (ViewGroup.java:5591)
  at expo.modules.splashscreen.SplashScreenController$showSplashScreen$2.run (SplashScreenController.java:12)
  at android.app.Activity.runOnUiThread (Activity.java:6424)
  at expo.modules.splashscreen.SplashScreenController.a (SplashScreenController.java:20)
  at expo.modules.splashscreen.SplashScreenController.a (SplashScreenController.java:6)
  at expo.modules.splashscreen.SplashScreenController$handleRootView$1.onChildViewRemoved (SplashScreenController.java:28)
  at android.view.ViewGroup.dispatchViewRemoved (ViewGroup.java:5753)
  at android.view.ViewGroup.removeViewInternal (ViewGroup.java:6211)
  at android.view.ViewGroup.removeViewAt (ViewGroup.java:6133)
  at com.facebook.react.uimanager.ViewGroupManager.removeViewAt (ViewGroupManager.java:3)
  at com.facebook.react.uimanager.NativeViewHierarchyManager.a (NativeViewHierarchyManager.java:149)
  at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute (UIViewOperationQueue.java:16)
  at com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:72)
  at com.facebook.react.uimanager.UIViewOperationQueue.i (UIViewOperationQueue.java:53)
  at com.facebook.react.uimanager.UIViewOperationQueue.access$2400 (UIViewOperationQueue.java)
  at com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded (UIViewOperationQueue.java:2)
  at com.facebook.react.bridge.GuardedRunnable.run (GuardedRunnable.java)
  at android.os.Handler.handleCallback (Handler.java:873)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:216)
  at android.app.ActivityThread.main (ActivityThread.java:7258)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:975)

Hey all,

If you’re still experiencing these errors, can you let me know what SDK version your apps are running?

1 Like

Expo CLI 3.23.3 environment info:
System:
OS: Windows 10 10.0.18362
Binaries:
Node: 14.4.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Users\Myself\AppData\Roaming\npm\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ^38.0.8 => 38.0.8
react: ~16.11.0 => 16.11.0
react-dom: ~16.11.0 => 16.11.0
react-native: ~0.62.2 => 0.62.2
react-native-web: ~0.11.7 => 0.11.7

package.json
“expo-splash-screen”: “~0.4.0”,

Getting same error for some users in production for bare project:
java.lang.IllegalStateException:
at android.view.ViewGroup.addViewInner (ViewGroup.java:5958)
at android.view.ViewGroup.addView (ViewGroup.java:5777)
at android.view.ViewGroup.addView (ViewGroup.java:5717)
at android.view.ViewGroup.addView (ViewGroup.java:5690)
at expo.modules.splashscreen.SplashScreenController$showSplashScreen$2.run (SplashScreenController.kt:33)
at android.app.Activity.runOnUiThread (Activity.java:6972)
at expo.modules.splashscreen.SplashScreenController.showSplashScreen (SplashScreenController.kt:32)
at expo.modules.splashscreen.SplashScreenController.showSplashScreen$default (SplashScreenController.kt:31)
at expo.modules.splashscreen.SplashScreenController$handleRootView$1.onChildViewRemoved (SplashScreenController.kt:116)
at android.view.ViewGroup.dispatchViewRemoved (ViewGroup.java:5854)
at android.view.ViewGroup.removeViewInternal (ViewGroup.java:6312)
at android.view.ViewGroup.removeViewAt (ViewGroup.java:6234)
at com.facebook.react.uimanager.ViewGroupManager.removeViewAt (ViewGroupManager.java:68)
at com.facebook.react.uimanager.NativeViewHierarchyManager.manageChildren (NativeViewHierarchyManager.java:457)
at com.facebook.react.uimanager.UIViewOperationQueue$ManageChildrenOperation.execute (UIViewOperationQueue.java:205)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run (UIViewOperationQueue.java:779)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches (UIViewOperationQueue.java:888)
at com.facebook.react.uimanager.UIViewOperationQueue.access$2200 (UIViewOperationQueue.java:42)
at com.facebook.react.uimanager.UIViewOperationQueue$2.runGuarded (UIViewOperationQueue.java:846)
at com.facebook.react.bridge.GuardedRunnable.run (GuardedRunnable.java:29)
at android.os.Handler.handleCallback (Handler.java:883)
at android.os.Handler.dispatchMessage (Handler.java:100)
at android.os.Looper.loop (Looper.java:237)
at android.app.ActivityThread.main (ActivityThread.java:7814)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1068)

package.json :
“expo-splash-screen”: “^0.2.3”,

So the error is occurring on both version 0.2.3 and 0.4.0?

1 Like

Yes sir, and probably in all other versions as well.

This error is ocurring a LOT. I’m really worried about it.

So… any fixes for this?