Android Question BadToken error

Discussion in 'Android Questions' started by imgsimonebiliato, Sep 10, 2015.

  1. imgsimonebiliato

    imgsimonebiliato Well-Known Member Licensed User

    Hello,

    i got this error when i try do some request with httputils

    Code:
    android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@41d8df40 is not valid; is your activity running?
        at android.view.ViewRootImpl.setView(ViewRootImpl.java:
    664)
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:
    248)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:
    69)
        at android.app.Dialog.show(Dialog.java:
    281)
        at anywheresoftware.b4a.debug.Debug.wait(Debug.java:
    211)
        at anywheresoftware.b4a.debug.Debug.reachBP(Debug.java:
    260)
        at anywheresoftware.b4a.debug.Debug.ShouldStop(Debug.java:
    232)
        at it.android.imgspa.and_IMGStore.screalist._hc_responsesuccess(screalist.java:
    262)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    525)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    175)
        at anywheresoftware.b4a.BA$
    3.run(BA.java:320)
        at android.os.Handler.handleCallback(Handler.java:
    800)
        at android.os.Handler.dispatchMessage(Handler.java:
    100)
        at android.os.Looper.loop(Looper.java:
    194)
        at android.app.ActivityThread.main(ActivityThread.java:
    5391)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    525)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    833)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    600)
        at dalvik.system.NativeStart.main(Native Method)
    java.lang.RuntimeException: android.view.WindowManager$BadTokenException: Unable 
    to add window -- token android.os.BinderProxy@41d8df40 is not valid; is your activity running?

        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    201)
        at anywheresoftware.b4a.BA$
    3.run(BA.java:320)
        at android.os.Handler.handleCallback(Handler.java:
    800)
        at android.os.Handler.dispatchMessage(Handler.java:
    100)
        at android.os.Looper.loop(Looper.java:
    194)
        at android.app.ActivityThread.main(ActivityThread.java:
    5391)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    525)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    833)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    600)
        at dalvik.system.NativeStart.main(Native Method)
    Caused by: android.view.WindowManager$BadTokenException: Unable 
    to add window -- token android.os.BinderProxy@41d8df40 is not valid; is your activity running?
        at android.view.ViewRootImpl.setView(ViewRootImpl.java:
    664)
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:
    248)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:
    69)
        at android.app.Dialog.show(Dialog.java:
    281)
        at anywheresoftware.b4a.debug.Debug.wait(Debug.java:
    211)
        at anywheresoftware.b4a.debug.Debug.reachBP(Debug.java:
    260)
        at anywheresoftware.b4a.debug.Debug.ErrorCaught(Debug.java:
    145)
        at it.android.imgspa.and_IMGStore.screalist._hc_responsesuccess(screalist.java:
    282)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:
    525)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    175)
        ... 
    10 more
    What's?

    I'm not trying to open a Msgbox Dialog
     
  2. eurojam

    eurojam Well-Known Member Licensed User

  3. imgsimonebiliato

    imgsimonebiliato Well-Known Member Licensed User

  4. Erel

    Erel Administrator Staff Member Licensed User

    Which version of B4A are you using? Try to switch to Debug (Rapid).
     
  5. eurojam

    eurojam Well-Known Member Licensed User

    Nothing, you are not providing very much information about your problem,then the only thing is to guess something....:(
     
    DonManfred likes this.
  6. imgsimonebiliato

    imgsimonebiliato Well-Known Member Licensed User

    Ehm my bad.. I found an old Msgbox into a service module..
    Sorry!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice