javiersantos / javiersantos/BottomDialogs
android.view.WindowManager$BadTokenException: Unable to add window
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 632
- Forks
- 114
- PR merge metrics
- No merged PRs in 30d
Description
android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@3646f1de is not valid; is your activity running? at android.view.ViewRootImpl.setView(ViewRootImpl.java:579) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85) at android.app.Dialog.show(Dialog.java:298) at com.github.javiersantos.bottomdialogs.BottomDialog.show(BottomDialog.java:40) at com.github.javiersantos.bottomdialogs.BottomDialog$Builder.show(BottomDialog.java:302) at com.ashhwa.bestforwaste.ui.RequestPickupFirstActivity$1.onSuccess(RequestPickupFirstActivity.java:134) at com.ashhwa.bestforwaste.apimanager.ServerHandler$1.onResponse(ServerHandler.java:63) at com.ashhwa.bestforwaste.apimanager.ServerHandler$1.onResponse(ServerHandler.java:56) at com.android.volley.toolbox.JsonRequest.deliverResponse(JsonRequest.java:65) at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
I am getting this crash when i press back button before generation of the dialog. like there is an api and its data will be shown in dialog. but before the api calls get completed i press the back button and quite the activity now when the api call finishes app crashes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with BottomDialog.java:40 and BottomDialog.java:302 in the stack trace, then trace the asynchronous callback from RequestPickupFirstActivity.java:134 through ServerHandler.java:63. Reproduce the back-button flow and verify that a completed request after the activity closes no longer crashes while attempting to show the dialog.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100