ChuckerTeam/chucker

Crash on clicking chucker notification

loki4496 opened this issue · 7 comments

chucker is crashing when clicked on api call recording Notification

  • Device: realme 1
  • OS: android 9
  • Chucker version: 3.5.2

LOGS

2022-10-20 12:00:53.208 6438-6438/com.myapp.debug E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.myapp.debug, PID: 6438
java.lang.NoSuchMethodError: No virtual method getDefaultViewModelProviderFactory()Landroidx/lifecycle/ViewModelProvider$Factory; in class Landroidx/fragment/app/Fragment; or its super classes (declaration of 'androidx.fragment.app.Fragment' appears in /data/app/com.myapp.debug-nxWJtTo9gCSDyBXHKQ_x7g==/base.apk)
at androidx.fragment.app.FragmentViewModelLazyKt$createViewModelLazy$factoryPromise$1.invoke(FragmentViewModelLazy.kt:95)
at androidx.fragment.app.FragmentViewModelLazyKt$createViewModelLazy$factoryPromise$1.invoke(Unknown Source:0)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:52)
at androidx.lifecycle.ViewModelLazy.getValue(ViewModelProvider.kt:41)
at com.chuckerteam.chucker.internal.ui.transaction.TransactionListFragment.getViewModel(TransactionListFragment.kt:32)
at com.chuckerteam.chucker.internal.ui.transaction.TransactionListFragment.onViewCreated(TransactionListFragment.kt:64)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:892)
at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManagerImpl.java:1238)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:434)
at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManagerImpl.java:2079)
at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1869)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
at androidx.fragment.app.FragmentManagerImpl.execSingleAction(FragmentManagerImpl.java:1696)
at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:299)
at androidx.fragment.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:259)
at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1244)
at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092)
at androidx.viewpager.widget.ViewPager.onMeasure(ViewPager.java:1622)
at android.view.View.measure(View.java:23658)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6948)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1535)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:825)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:704)
at android.view.View.measure(View.java:23658)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6948)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:146)
at android.view.View.measure(View.java:23658)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6948)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1535)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:825)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:704)
at android.view.View.measure(View.java:23658)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6948)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:23658)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6948)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1535)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:825)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:704)
at android.view.View.measure(View.java:23658)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6948)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:818)
at android.view.View.measure(View.java:23658)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3292)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1957)
2022-10-20 12:00:53.209 6438-6438/com.myapp.debug E/AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2273)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1845)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8235)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:994)
at android.view.Choreographer.doCallbacks(Choreographer.java:806)
at android.view.Choreographer.doFrame(Choreographer.java:738)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:980)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:226)
at android.app.ActivityThread.main(ActivityThread.java:7178)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:503)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)

Is the crash happening consistently? Could you create a reproducer for this?
It can be related to your dependencies and I'd like to investigate more here.

@cortinico it is crashing every time when i click on notification

Library used

qaProdImplementation "com.github.chuckerteam.chucker:library:3.5.2"
releaseImplementation "com.github.chuckerteam.chucker:library-no-op:3.5.2"

qaProd is debug build Type.

also want to bring your attention on File TransactionListFragment.kt
i could not find this file in repo.

at com.chuckerteam.chucker.internal.ui.transaction.TransactionListFragment.getViewModel(TransactionListFragment.kt:32)
at com.chuckerteam.chucker.internal.ui.transaction.TransactionListFragment.onViewCreated(TransactionListFragment.kt:64)

also want to bring your attention on File TransactionListFragment.kt
i could not find this file in repo.

The file is here:
https://github.com/ChuckerTeam/chucker/blob/3.x/library/src/main/java/com/chuckerteam/chucker/internal/ui/transaction/TransactionListFragment.kt

@cortinico it is crashing every time when i click on notification

Could you create a reproducer?

also want to bring your attention on File TransactionListFragment.kt
i could not find this file in repo.

The file is here: https://github.com/ChuckerTeam/chucker/blob/3.x/library/src/main/java/com/chuckerteam/chucker/internal/ui/transaction/TransactionListFragment.kt

@cortinico it is crashing every time when i click on notification

Could you create a reproducer?

i could reproduce it too, i can always reproduce it on my Pixel 5 device with Android 12

i could reproduce it too, i can always reproduce it on my Pixel 5 device with Android 12

Can you share a reproducer project I could look into?

@cortinico any update on this?
i also tired with adding viewmodel-ktx:2.5.1 earlier using 2.3.1
still not working.

@cortinico any update on this?

The update is that I'm waiting for a reproducer :) If you or @cubecnelson can do it, I can look into it.