bug: Fail at com.getcapacitor.Splash$2.run: android.view.WindowManager$BadTokenException
See original GitHub issueBug Report
Thank you all for your great work! I hope you can help me.
I’m getting this fail my Google Play Console, mostly on SDKs 29, 28 but also on 23 and 24:
android.view.WindowManager$BadTokenException:
at android.view.ViewRootImpl.setView (ViewRootImpl.java:806)
at android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:356)
at android.view.WindowManagerImpl.addView (WindowManagerImpl.java:94)
at com.getcapacitor.Splash$2.run (Splash.java:276)
at android.os.Handler.handleCallback (Handler.java:873)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:193)
at android.app.ActivityThread.main (ActivityThread.java:6746)
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:858)
Capacitor Version
Latest Dependencies:
@capacitor/cli: 2.4.6
@capacitor/core: 2.4.6
@capacitor/android: 2.4.6
@capacitor/electron: 2.4.6
@capacitor/ios: 2.4.6
Installed Dependencies:
@capacitor/core 2.2.1
@capacitor/cli 2.2.1
@capacitor/ios 2.2.1
@capacitor/android 2.2.1
@capacitor/electron not installed
Platform(s)
- Android
Other Technical Details
npm --version
output: 6.14.4
node --version
output: v12.17.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
"android.view.WindowManager$BadTokenException ...
This helped me out massively. I was trying to create a dialog from within another dialog and just having "AlertDialog.Builder(this);" was giving an...
Read more >Troubleshooting Android Issues
This error may occur when using the run command if the JAVA_HOME environment variable is not set. To resolve, set JAVA_HOME as an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I also have this issue logged on sentry. Although it seems to be very very rare.
Versions:
Will update to latest version and see if there are more logs.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.