android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Vlasis Alexopoulos
, 1 year ago
Unable to add window -- token null is not valid; is your activity running?
via Stack Overflow by Jamal
, 2 years ago
Unable to add window -- token null is not valid; is your activity running?
via Stack Overflow by Sushant kumar
, 11 months ago
Unable to add window -- token null is not valid; is your activity running?
via Stack Overflow by Sushant kumar
, 11 months ago
Unable to add window -- token null is not valid; is your activity running?
via Stack Overflow by Alpaca
, 2 years ago
Unable to add window -- token null is not valid; is your activity running?
via GitHub by al3azp
, 1 year ago
Unable to add window -- token android.os.BinderProxy@246832c is not valid; is your activity running?
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:567)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:246)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.widget.MediaController.show(MediaController.java:338)
at android.widget.MediaController.show(MediaController.java:298)
at android.webkit.HTML5VideoFullScreen$FullScreenMediaController.show(HTML5VideoFullScreen.java:391)
at android.webkit.HTML5VideoFullScreen.onPrepared(HTML5VideoFullScreen.java:225)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:1975)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.