3

Recently started getting crashes due to java.lang.SecurityException: Binder invocation to an incorrect interface in our app which only happens on 6.0 and 6.0.1 OS. The stack trace is pulled from a crash reporting service and could not be replicated locally on any of the Android 6 devices.

The app uses a 'Service' which calls 'startForeground' and the stack trace seems to point to that method call.

java.lang.SecurityException: Binder invocation to an incorrect interface
        at android.os.Parcel.readException(Parcel.java:1620)
        at android.os.Parcel.readException(Parcel.java:1573)
        at android.app.ActivityManagerProxy.setServiceForeground(ActivityManagerNative.java:4487)
        at android.app.Service.startForeground(Service.java:652)
        at com.anghami.audio.MusicService.J(MusicService.java:3517)
        at com.anghami.audio.MusicService.b(MusicService.java:2676)
        at com.anghami.audio.MusicService.F(MusicService.java:2647)
        at com.anghami.audio.MusicService.a(MusicService.java:2421)
        at com.anghami.audio.MusicService_.a(MusicService_.java:21)
        at com.anghami.audio.MusicService_$4.a(MusicService_.java:214)
        at org.androidannotations.api.a$a.run(BackgroundExecutor.java:401)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
        at java.lang.Thread.run(Thread.java:818)
Ziad Halabi
  • 964
  • 11
  • 31

1 Answers1

7

The problem occurred when .Aidl file in client side were placed in wrong location. the .Aidl file must be placed in a package of the same name as server side in the client's src folder.

SamiAzar
  • 1,260
  • 13
  • 29