ChuckerTeam / chucker

🔎 An HTTP inspector for Android & OkHTTP (like Charles but on device)
Apache License 2.0
3.97k stars 351 forks source link

Room dependency crash on version 3.5.2 #1263

Closed passmanagerapp closed 3 months ago

passmanagerapp commented 3 months ago

:writing_hand: Describe the bug

I am using version 3.5.2 `

implementation "com.github.chuckerteam.chucker:library:3.5.2@aar"
testImplementation "com.github.chuckerteam.chucker:library:3.5.2"
stageImplementation "com.github.chuckerteam.chucker:library:3.5.2"
prodImplementation "com.github.chuckerteam.chucker:library:3.5.2"`

and my project doesn't have any Room library dependency but I get this error after I run the app: FATAL EXCEPTION: DefaultDispatcher-worker-1 (Ask Gemini) Process: com.myapp, PID: 7619 java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/room/CoroutinesRoom; at com.chuckerteam.chucker.internal.data.room.HttpTransactionDao_Impl.insert(HttpTransactionDao_Impl.java:330) at com.chuckerteam.chucker.internal.data.repository.HttpTransactionDatabaseRepository.insertTransaction(HttpTransactionDatabaseRepository.kt:32) at com.chuckerteam.chucker.api.ChuckerCollector$onRequestSent$1.invokeSuspend(ChuckerCollector.kt:62) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664) Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@c74a89d, Dispatchers.IO] Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.room.CoroutinesRoom" on path: DexPathList[[zip file "/data/app/~~EDaFn59ctXJhObxcj13TOg==/com.azerlotereya.android-frR5jHmyen1LIAniQCuCKQ==/base.apk"],nativeLibraryDirectories=[/data/app/~~EDaFn59ctXJhObxcj13TOg==/com.myapp-frR5jHmyen1LIAniQCuCKQ==/lib/arm64, /data/app/~~EDaFn59ctXJhObxcj13TOg==/com.myapp-frR5jHmyen1LIAniQCuCKQ==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) at java.lang.ClassLoader.loadClass(ClassLoader.java:637) at java.lang.ClassLoader.loadClass(ClassLoader.java:573)

:bomb: Steps to reproduce

  1. Run the project directly and you will get crash

:wrench: Expected behavior

I just want to run Chucker on Android 12+

:camera: Screenshots

:iphone: Tech info

:page_facing_up: Additional context

cortinico commented 3 months ago
  1. Run the project directly and you will get crash

Which project? The Chucker sample app?