Serializing to a byte array threw an IOException (should never happen)
Asked Answered
P

2

22

I have this new error from one user. This happened when I pushed the app with the new 11.0.0 Play Services.

Fatal Exception: java.lang.RuntimeException: Serializing to a byte array threw an IOException (should never happen).
       at com.google.android.gms.internal.aif.zzn(Unknown Source)
       at com.google.android.gms.internal.aez.zzKB(Unknown Source)
       at com.google.android.gms.internal.aez.zzKC(Unknown Source)
       at com.google.android.gms.internal.aez.zzKB(Unknown Source)
       at com.google.android.gms.internal.afc.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:762)
Caused by com.google.android.gms.internal.ahy: CodedOutputStream was writing to a flat byte array and ran out of space (pos 199 limit 199).
       at com.google.android.gms.internal.ahx.zze(Unknown Source)
       at com.google.android.gms.internal.ahx.zzc(Unknown Source)
       at com.google.android.gms.internal.ahx.zzc(Unknown Source)
       at com.google.android.gms.internal.ahx.zzb(Unknown Source)
       at com.google.android.gms.internal.afq.zza(Unknown Source)
       at com.google.android.gms.internal.ahx.zzJ(Unknown Source)
       at com.google.android.gms.internal.ahx.zzJ(Unknown Source)
       at com.google.android.gms.internal.afr.zza(Unknown Source)
       at com.google.android.gms.internal.aif.zzn(Unknown Source)
       at com.google.android.gms.internal.aez.zzKB(Unknown Source)
       at com.google.android.gms.internal.aez.zzKC(Unknown Source)
       at com.google.android.gms.internal.aez.zzKB(Unknown Source)
       at com.google.android.gms.internal.afc.run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
       at java.lang.Thread.run(Thread.java:762)

I have no idea were to start.

Pedicle answered 8/6, 2017 at 12:9 Comment(15)
Where this exactly happen? can you post some code?Stopgap
I don't know! This is what I get from Fabric.Pedicle
I have the same in emulator. There're multiple warnings in log: W/GooglePlayServicesUtil: Google Play services out of date. Requires 11010000 but found 10930876Extractor
I think is regarding the Firebase Perf toolsPedicle
Got the same issue, but not only with 1 user. Version rolled out to 200 users, and so far 14.2% are affected by this. Version 11.0.0 for firebase as well as play services.Falchion
Do you have Firebase Perf tools added?Pedicle
Yes. I'll see tomorrow what happens if I kick it out again.Falchion
You won't get the error anymore :))Pedicle
True, looks like it so far. Staged rollout is proceeding, so far no crashes. Well, guess that's why it's in beta.Falchion
I also see it, reported this bug to the Firebase team. Will update you on resolution.Elum
I have the same issue. It seems to be a problem only on Android N (no access to O to test)Cryo
Rumor is Firebase 11.0.1 will fix this.Cumulostratus
For those seeing this issue, please reach out to firebase.google.com/support/contact/bugs-features and include dependencies from your gradle build files if you can. Glad to see interest in Firebase Performance and appreciate your patience!Kight
11.0.1 does not fix the issue ... started a staged rollout yesterday with 11.0.1 and 22% of those users get this crash.Pasteurize
I'm an engineer from Firebase Performance Monitoring. Sorry to everyone that's encountered this issue. We've identified the issue and are working on a fix. Until the patch is released, the workarounds are: 1) Disable automated instrumentation and only use the tracing API 2) DowStarlastarlene
S
16

I'm an engineer from Firebase Performance Monitoring. Sorry to everyone that's encountered this issue. We've identified the problem and a patch is now available. Please upgrade to 11.0.2.

Starlastarlene answered 22/6, 2017 at 19:2 Comment(3)
Do we also need to update the firebase-plugins? Also, lints for updates would be greatRubricate
Updating the plugin is not needed in this case.Kight
An indicator that your SDK is out of date is a great idea. We've put that on our roadmapStarlastarlene
C
0

EDIT: Firebase 11.0.2 seems to have fixed the issue for me

Initial answer: I had the same issue on a Galasy SIII running 4.4 (CyanogenMod). I think the issue can be resolved by removing the AddTrace annotations.

However, reverting Firebase to 10.2.6 fixed the issue for me, even if using the annotations.

I have submitted a bug report to the Firebase team as asked by Eric Shieh (https://firebase.google.com/support/contact/bugs-features)

Counterweigh answered 19/6, 2017 at 10:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.