React-native-splash-screen: Not attached to Window Manager

Created on 10 Jul 2017  Â·  7Comments  Â·  Source: crazycodeboy/react-native-splash-screen

Hey,
from time to time I get the following error in our logs:

java.lang.IllegalArgumentException View=com.android.internal.policy.PhoneWindow$DecorView{ffbac5a V.E...... R.....I. 0,0-720,1280} not attached to window manager 
    WindowManagerGlobal.java:451 android.view.WindowManagerGlobal.findViewLocked
    WindowManagerGlobal.java:377 android.view.WindowManagerGlobal.removeView
    WindowManagerImpl.java:140 android.view.WindowManagerImpl.removeViewImmediate
    Dialog.java:701 android.app.Dialog.dismissDialog
    Dialog.java:684 android.app.Dialog.dismiss
    SplashScreen.java:58 com.cboy.rn.splashscreen.SplashScreen$2.run
    Handler.java:739 android.os.Handler.handleCallback
    Handler.java:95 android.os.Handler.dispatchMessage
    Looper.java:148 android.os.Looper.loop
    ActivityThread.java:7331 android.app.ActivityThread.main
    Method.java:-2 java.lang.reflect.Method.invoke
    ZygoteInit.java:1230 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
    ZygoteInit.java:1120 com.android.internal.os.ZygoteInit.main

Android 6.0.1 / Samsung

Any idea how I could fix this issue?

Most helpful comment

I'm seeing something similar in my production crash reports from time to time.

org.devio.rn.splashscreen.SplashScreen$2.run
java.lang.IllegalArgumentException: View=DecorView@2592c44[] not attached to window manager

android.view.WindowManagerGlobal.findViewLocked WindowManagerGlobal.java:509
android.view.WindowManagerGlobal.removeView WindowManagerGlobal.java:399
android.view.WindowManagerImpl.removeViewImmediate WindowManagerImpl.java:123
android.app.Dialog.dismissDialog Dialog.java:381
android.app.Dialog.dismiss Dialog.java:360
org.devio.rn.splashscreen.SplashScreen$2.run SplashScreen.java:66
android.os.Handler.handleCallback Handler.java:869
android.os.Handler.dispatchMessage Handler.java:101
android.os.Looper.loop Looper.java:206
android.app.ActivityThread.main ActivityThread.java:6735
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.Zygote$MethodAndArgsCaller.run Zygote.java:240
com.android.internal.os.ZygoteInit.main ZygoteInit.java:845

Judging from telemetry, it appears to be happening at the time of calling SplashScreen.hide() within the react native part of the app. This likely leaves the user stuck on the splash screen until they force close the app.

So far it has exhibited itself on two devices:

  • WP2 - Android 8.0.0
  • P9 - Android 7.0
Environment:
  OS: macOS 10.14.1
  Node: 10.9.0
  Yarn: 1.9.4
  npm: 6.4.1
  Watchman: 4.9.0
  Xcode: Xcode 10.1 Build version 10B61
  Android Studio: 3.2 AI-181.5540.7.32.5056338

Packages: (wanted => installed)
  react: 16.0.0 => 16.0.0
  react-native: ^0.51.0 => 0.51.1

All 7 comments

Interestingly we have exactly the same issue for:
Samsung SM-G900F // Android 6.0.1

Same here .like @bdart we have the issue for :Samsung SM-G900F / Android 6.0.1

I have the same issue for:
Manufacturer: Xiaomi
Model: Redmi Note 3
Board: Msm8952
Android API: 23
Android OS: 6.0.1
Brand: Xiaomi
RAM: 2.78GB
Orientation: Portrait
rn splash screen: v3.0.1

+1

This error happens on several devices (older)

We also have this issue? Did someone already find the origin? Any help appreciated

I'm seeing something similar in my production crash reports from time to time.

org.devio.rn.splashscreen.SplashScreen$2.run
java.lang.IllegalArgumentException: View=DecorView@2592c44[] not attached to window manager

android.view.WindowManagerGlobal.findViewLocked WindowManagerGlobal.java:509
android.view.WindowManagerGlobal.removeView WindowManagerGlobal.java:399
android.view.WindowManagerImpl.removeViewImmediate WindowManagerImpl.java:123
android.app.Dialog.dismissDialog Dialog.java:381
android.app.Dialog.dismiss Dialog.java:360
org.devio.rn.splashscreen.SplashScreen$2.run SplashScreen.java:66
android.os.Handler.handleCallback Handler.java:869
android.os.Handler.dispatchMessage Handler.java:101
android.os.Looper.loop Looper.java:206
android.app.ActivityThread.main ActivityThread.java:6735
java.lang.reflect.Method.invoke Method.java
com.android.internal.os.Zygote$MethodAndArgsCaller.run Zygote.java:240
com.android.internal.os.ZygoteInit.main ZygoteInit.java:845

Judging from telemetry, it appears to be happening at the time of calling SplashScreen.hide() within the react native part of the app. This likely leaves the user stuck on the splash screen until they force close the app.

So far it has exhibited itself on two devices:

  • WP2 - Android 8.0.0
  • P9 - Android 7.0
Environment:
  OS: macOS 10.14.1
  Node: 10.9.0
  Yarn: 1.9.4
  npm: 6.4.1
  Watchman: 4.9.0
  Xcode: Xcode 10.1 Build version 10B61
  Android Studio: 3.2 AI-181.5540.7.32.5056338

Packages: (wanted => installed)
  react: 16.0.0 => 16.0.0
  react-native: ^0.51.0 => 0.51.1
Was this page helpful?
0 / 5 - 0 ratings

Related issues

summerPsyche picture summerPsyche  Â·  5Comments

luskin picture luskin  Â·  4Comments

jassonha21 picture jassonha21  Â·  3Comments

jetre219 picture jetre219  Â·  4Comments

Dineshchitta picture Dineshchitta  Â·  5Comments