Android Question [CRASH] Admob Consent Manager: WindowManager$BadTokenException

jmon

Well-Known Member
Licensed User
Hello,

I recently integrated Admob Consent Manager form in my apps. I received an error, so far affecting 1 user. I wonder if it's critical and will affect more users:

Fatal Exception: android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@f93f5be is not valid; is your activity running?
at android.view.ViewRootImpl.setView(ViewRootImpl.java:958)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:381)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:100)
at android.app.Dialog.show(Dialog.java:420)
at com.google.ads.consent.ConsentForm.show(ConsentForm.java:343)
at anywheresoftware.b4a.admobwrapper.ConsentManager$2.onConsentFormLoaded(ConsentManager.java:113)
at com.google.ads.consent.ConsentForm.handleLoadComplete(ConsentForm.java:275)
at com.google.ads.consent.ConsentForm.access$1(ConsentForm.java:266)
at com.google.ads.consent.ConsentForm$2.handleUrl(ConsentForm.java:103)
at com.google.ads.consent.ConsentForm$2.shouldOverrideUrlLoading(ConsentForm.java:123)
at xf.b(SourceFile:104)
at org.chromium.android_webview.AwContentsClientBridge.shouldOverrideUrlLoading(SourceFile:172)
at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(SourceFile)
at org.chromium.base.SystemMessageHandler.handleMessage(SourceFile:9)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

I implemented the consent manager following the tutorial, and it works with no problem on my devices. But I am not living in EU, so I can only do the test using the debug features.

Thanks
Jo
 
Top