DebugOverlay-Android icon indicating copy to clipboard operation
DebugOverlay-Android copied to clipboard

java.lang.ClassCastException: android.os.BinderProxy

Open ashishislive opened this issue 8 years ago • 1 comments

       Process: clean.messaging.bits.com.bitsmessaging:sync, PID: 4805
       java.lang.ClassCastException:  android.os.BinderProxy cannot be cast to 
       com.ms_square.debugoverlay.DebugOverlayService$LocalBinder
                                                                                           at 
      com.ms_square.debugoverlay.DebugOverlay$1.onServiceConnected(DebugOverlay.java:172)
                                                                                           at 
     android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1274)
                                                                                           at 
     android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1291)
                                                                                           at 
     android.os.Handler.handleCallback(Handler.java:815)
                                                                                           at 
     android.os.Handler.dispatchMessage(Handler.java:104)
                                                                                           at android.os.Looper.loop(Looper.java:207)
                                                                                           at 
     android.app.ActivityThread.main(ActivityThread.java:5740)
                                                                                           at java.lang.reflect.Method.invoke(Native 
       Method)
                                                                                           at 
     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
                                                                                           at 
                com.android.internal.os.ZygoteInit.main(ZygoteInit.java:766)

I'm using sync adapter. Force closing when sync triggered..

ashishislive avatar Jan 10 '18 16:01 ashishislive

@SpiralDeveloper Thanks for reporting this issue. The DebugOverlay currently does not work across processes. The crash is happening because you are running the sync adapter code in a separate process. For the time being, please install the DebugOverlay in the main app process only within your Application class.

you can probably refer to the last answer at https://stackoverflow.com/questions/6954027/detecting-if-youre-in-the-main-process-or-the-remote-service-process-in-applica.

If it does not work, I can provide a code snippet for the workaround.

Manabu-GT avatar Jan 12 '18 07:01 Manabu-GT