ChuckerTeam / chucker

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

TransactionPayloadFragment.kt line 102 error #935

Open jDilshodbek opened 1 year ago

jDilshodbek commented 1 year ago

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object kotlin.Pair.component1()' on a null object reference

   at com.chuckerteam.chucker.internal.ui.transaction.TransactionPayloadFragment.onViewCreated$lambda-2(TransactionPayloadFragment.kt:102)
   at com.chuckerteam.chucker.internal.ui.transaction.TransactionPayloadFragment.$r8$lambda$T903xsqZYw_77gb8vnhfSzuuVAk()
   at com.chuckerteam.chucker.internal.ui.transaction.TransactionPayloadFragment$$ExternalSyntheticLambda1.onChanged(:4)
   at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
   at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
   at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
   at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
   at com.chuckerteam.chucker.internal.support.LiveDataUtilsKt.combineLatest$lambda-2$lambda-0(LiveDataUtils.kt:21)
   at com.chuckerteam.chucker.internal.support.LiveDataUtilsKt.$r8$lambda$mOyt4m3D7rz_Sl6O-_wkqyiVEGQ()
   at com.chuckerteam.chucker.internal.support.LiveDataUtilsKt$$ExternalSyntheticLambda2.onChanged(:8)
   at androidx.lifecycle.MediatorLiveData$Source.onChanged(MediatorLiveData.java:155)
   at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
   at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
   at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
   at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
   at androidx.lifecycle.LiveData$1.run(LiveData.java:93)
   at android.os.Handler.handleCallback(Handler.java:873)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:193)
   at android.app.ActivityThread.main(ActivityThread.java:6762)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
vbuberen commented 1 year ago

Please provide data according to the template provided to you while opening the issue.

jDilshodbek commented 1 year ago

Please provide data according to the template provided to you while opening the issue.

I have recently added chucker library into my project with implementation "com.github.chuckerteam.chucker:library:3.5.2" and my chukcer setup inside okhttpClient val chuckerCollector = ChuckerCollector( context = MyApp.context, showNotification = true, retentionPeriod = RetentionManager.Period.ONE_HOUR ) @Suppress("MagicNumber") val chuckerInterceptor = ChuckerInterceptor.Builder(MyTaxiDriver.context) .collector(chuckerCollector) .maxContentLength(250_000L) .redactHeaders(emptySet()) .alwaysReadResponseBody(false) .build() builder.addInterceptor(chuckerInterceptor)

and I got this crash report from Firebase reports

cortinico commented 1 year ago

and I got this crash report from Firebase reports

You should not be shipping Chucker in production releases, that's why we have the -no-op artifact. Why are you getting crash reports on Firebase for it?

jDilshodbek commented 1 year ago

and I got this crash report from Firebase reports

You should not be shipping Chucker in production releases, that's why we have the -no-op artifact. Why are you getting crash reports on Firebase for it?

We test network requests in production environment if they are working properly

cortinico commented 1 year ago

We test network requests in production environment if they are working properly

Sorry but I don't understand this statement. Your final users will be able to open Chucker (which is a debug tool) if you ship it in production.