23

I'm running into this RuntimeException and having a hard time debugging it:

W/Binder﹕ Caught a RuntimeException from the binder stub implementation.
com.google.android.gms.common.internal.safeparcel.zza$zza: Expected object header. Got 0x1 Parcel: pos=136 size=284
        at com.google.android.gms.common.internal.safeparcel.zza.zzJ(Unknown Source)
        at com.google.android.gms.wearable.internal.zzf.zzfv(Unknown Source)
        at com.google.android.gms.wearable.internal.zzf.createFromParcel(Unknown Source)
        at com.google.android.gms.wearable.internal.zzah$zza.onTransact(Unknown Source)
        at android.os.Binder.execTransact(Binder.java:446)

It doesn't seem to specify where the exception is coming from. This is an Android Wear app that periodically records audio and transfers it to the phone.

I would appreciate any ideas on where I should be looking at or how I should be debugging this.

Thank you.

  • I am running into the same error. Have you found a solution? – FCA Sep 30 '15 at 21:42
  • Try to upgrade a GogglePlayService on device to latest version. hopefully will solve the problem. Remember to clean your project before running – Murtaza Khursheed Hussain Nov 03 '15 at 05:43
  • Did anyone found the solution for this problem. It happens for me when I restart the android wear app :( – Jayasagar Nov 27 '15 at 08:40
  • sounds like a version mismatch between the application that's sending the data (over the binder) and the application that's receiving the data. – benzaita Jan 01 '16 at 19:34
  • An Android stub implementation is a piece of code that is supposed to be found elsewhere but is necessary for the code to compile. The stub itself is a placeholder that only throws an Exception because it should never actually be used. Find out why the stub is called instead of the real code. Version mismatch as mentioned above seems probable because then the code will compile, but during runtime only the stub will be found and executed. Correct me if I am wrong here please. – JohnyTex Jun 04 '16 at 23:36

1 Answers1

1

I had a similar error using Google Fit History API for data transfer. In that case it was a failed binder Transaction (JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = ...)). It didn't crash the app but the data transfer didn't work. What fixed it for me was reducing the amount of data being sent at once. Sending the data in multiple smaller chunks is what I do now.

For sending large amounts of data from your wearable to your phone you might want to use the Channel API. I use it to transfer MP3 files with sizes from 5 to 10MB without any problems.

Emanuel Seidinger
  • 1,272
  • 1
  • 12
  • 21