Crash on okhttp3 client after updating Android app to v6.3.1

Hi there,

After updating to v6.3.1 in Android, the app crashes on okhttp3 client:

LOCATION

Cache.java line 233 in `okhttp3.Cache.update$okhttp()`
EXCEPTION
java.lang.ClassCastException
MESSAGE
dh.e0$b$a cannot be cast to dh.c$a

Checked that it does not crash for v6.2.1 version of newRelic.

More details:
Device: Pixel 6 / Realme GT - Android 11
Target SDK: 21-31
okHttp3: v4.9.1

Thanks in advance,
Javier

Hi @aetxenike thanks for bringing this to our attention. Our engineering team is aware of this issue and are currently working on ways to address it. You can subscribe to the Android agent release notes RSS feed or keep an eye on the release notes here: Android agent release notes | New Relic Documentation

1 Like

Any news on this? I saw a bunch of crash logs in play console for this.
@ aetxenike Do you have a way to reproduce it? Want to see when the crash is happening because the crashlog is so short can’t tell how much of our user base is affected

This is what I see on the dev console

java.lang.ClassCastException:
at okhttp3.Cache.update$okhttp (Cache.java:233)
at okhttp3.internal.cache.CacheInterceptor.intercept (CacheInterceptor.kt:119)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.kt:109)
at okhttp3.internal.http.BridgeInterceptor.intercept (BridgeInterceptor.kt:83)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.kt:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept (RetryAndFollowUpInterceptor.kt:76)
at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.kt:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp (RealCall.kt:201)
at okhttp3.internal.connection.RealCall$AsyncCall.run (RealCall.kt:517)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:920)

I have tried to reproduce this on the production release but was not able to. Is it like random?

New relic reports only 15 occurrences with 14 users affected while google play console is around 21.7K and 4.01K affected users.

Glad to have staged rollout so I can do damage control if needed.

Hi @SBokor No update from our end aside from my reply to @aetxenike 3 days ago. A majority of our staff is out this week due to a holiday so I don’t expect to hear any updates this week. Thank you for providing what you have seen in the dev console though. I will bring this up with our engineering team next week when we meet as this information may be invaluable for their investigation.

Hi @SBokor, this error is completely random. It happens when I switch to another Activity/Fragment on the app and it crashes more than once at the same time. Downgrading to v6.2.1 it is solved.

Thank you! I really don’t like New Relic at all but it is forced on us. Guess downside working at a big company.

Will schedule a release and revert it back. I am just having a super hard time reproducing it. We had a full regression prior to the release and it never crashed. Most of the crash logs are at like in the middle of the night so thought it is when the auto update install the apps but glad to hear that it crashes other times too!

Really appreciate your help!

A majority of our staff is out this week due to a holiday so I don’t expect to hear any updates this week.

That was my plan too until I saw all that crashes in the console.

Any updates on this?

Hi @SBokor No update as of yet. If you or @aetxenike can provide a sample app with repro steps, that can definitely speed up engineering’s investigation. If so, please let me know. I also understand that the error is occuring somewhat randomly so repro steps may be difficult to provide.