IllegalStateException when open single API request information on release build.
volic opened this issue · 6 comments
✍️ Describe the bug
I cannot export or see the API call information. The chucker is crashing with the release build with R8.
java.lang.IllegalStateException: TypeToken must be created with a type argument: new TypeToken<...>() {}; When using code shrinkers (ProGuard, R8, ...) make sure that generic signatures are preserved.
at se.a.e(SourceFile:41)
at se.a.<init>(SourceFile:2)
at com.chuckerteam.chucker.internal.data.entity.HttpTransaction$b.<init>(SourceFile:1)
at com.chuckerteam.chucker.internal.data.entity.HttpTransaction.getParsedRequestHeaders(SourceFile:11)
at com.chuckerteam.chucker.internal.data.entity.HttpTransaction.getRequestHeadersString(SourceFile:3)
at com.chuckerteam.chucker.internal.ui.transaction.TransactionPayloadFragment$processPayload$2.invokeSuspend(SourceFile:49)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:12)
at kotlinx.coroutines.s0.run(SourceFile:129)
at kotlinx.coroutines.scheduling.CoroutineScheduler.q(SourceFile:1)
at kotlinx.coroutines.scheduling.CoroutineScheduler$c.d(SourceFile:15)
at kotlinx.coroutines.scheduling.CoroutineScheduler$c.p(SourceFile:29)
at kotlinx.coroutines.scheduling.CoroutineScheduler$c.run(SourceFile:1)
💣 Steps to reproduce
- Go to Chucker from the notification panel
- Click on any specific API call or try to export all requests
🔧 Expected behavior
The information about API calls is accessible and not crashing.
📷 Screenshots
:android: Tech info
- Device: Android Pixel 6
- OS: 14
- Chucker version: 4.0.0
📄 Additional context
This feels like a misconfiguration of yours with Proguard.
You should not use Proguard on debug builds (where Chucker is included)
Thank you for your quick response. We use the Chucker in release (named qa builds) builds. We use them for QA purposes where our testers can observe and extract the API data for bug tickets. Is there no way to use the Chucker in release builds?
We use the Chucker in release (named qa builds) builds. We use them for QA purposes where our testers can observe and extract the API data for bug tickets. Is there no way to use the Chucker in release builds
Well you can but then you'll have to configure proguard so that it doens't strip or obfuscate the classes you see in the stacktrace
@cortinico would you mind adding consumer rules for proguard?
We have the same use case as volic, where we have a separate flavor for QA.
@cortinico would you mind adding consumer rules for proguard?
Happy to receive a PR that adds them 👍
Thank you