androidPluto / pluto

Android Pluto is a on-device debugging framework for Android applications, which helps intercept Network calls, capture Crashes & ANRs, manipulate application data on-the-go, and much more.
https://androidpluto.com
Apache License 2.0
673 stars 67 forks source link

Unable to open pluto Logs. Crash when using Pluto+ Hilt+ Kotlin #296

Open Duna opened 11 months ago

Duna commented 11 months ago

Describe the bug The pluto crashes when clicking on overlay Bug or Network

To Reproduce Steps to reproduce the behavior:

  1. Go to pluto screen
  2. Open logger
            Pluto.Installer(this)
                .addPlugin(PlutoNetworkPlugin())
                .addPlugin(PlutoLoggerPlugin())
                .install()

Logs:

2023-12-04 11:56:17.408 16983-16983 AndroidRuntime          com.fortect.av                       E  FATAL EXCEPTION: main
                                                                                                    Process: com.fortect.av, PID: 16983
                                                                                                    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fortect.av/com.pluto.ui.container.PlutoActivity}: android.view.InflateException: Binary XML file line #12 in com.fortect.av:layout/pluto___activity_pluto: Binary XML file line #12 in com.fortect.av:layout/pluto___activity_pluto: Error inflating class fragment
                                                                                                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3635)
                                                                                                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
                                                                                                        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
                                                                                                        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
                                                                                                        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
                                                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                        at android.os.Looper.loopOnce(Looper.java:201)
                                                                                                        at android.os.Looper.loop(Looper.java:288)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:7839)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
                                                                                                    Caused by: android.view.InflateException: Binary XML file line #12 in com.fortect.av:layout/pluto___activity_pluto: Binary XML file line #12 in com.fortect.av:layout/pluto___activity_pluto: Error inflating class fragment
                                                                                                    Caused by: android.view.InflateException: Binary XML file line #12 in com.fortect.av:layout/pluto___activity_pluto: Error inflating class fragment
                                                                                                    Caused by: kotlin.UninitializedPropertyAccessException: lateinit property session has not been initialized
                                                                                                        at com.mocklets.pluto.Pluto.getSession$pluto_release(Pluto.kt:24)
                                                                                                        at com.mocklets.pluto.ui.BaseFragment.setupPager(BaseFragment.kt:41)
                                                                                                        at com.mocklets.pluto.ui.BaseFragment.onViewCreated(BaseFragment.kt:31)
                                                                                                        at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3128)
                                                                                                        at androidx.fragment.app.FragmentStateManager.ensureInflatedView(FragmentStateManager.java:394)
                                                                                                        at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:260)
                                                                                                        at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:142)
                                                                                                        at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:136)
                                                                                                        at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:248)
                                                                                                        at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:227)
                                                                                                        at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1073)
                                                                                                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1001)
                                                                                                        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
                                                                                                        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127)
                                                                                                        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
                                                                                                        at android.view.LayoutInflater.inflate(LayoutInflater.java:686)
                                                                                                        at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
                                                                                                        at com.pluto.databinding.PlutoActivityPlutoBinding.inflate(PlutoActivityPlutoBinding.java:45)
                                                                                                        at com.pluto.databinding.PlutoActivityPlutoBinding.inflate(PlutoActivityPlutoBinding.java:39)
                                                                                                        at com.pluto.ui.container.PlutoActivity.onCreate(PlutoActivity.kt:33)
                                                                                                        at android.app.Activity.performCreate(Activity.java:8051)
                                                                                                        at android.app.Activity.performCreate(Activity.java:8031)
                                                                                                        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
                                                                                                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
                                                                                                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3792)
                                                                                                        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
                                                                                                        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
2023-12-04 11:56:17.408 16983-16983 AndroidRuntime          com.fortect.av                       E      at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
                                                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
                                                                                                        at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                        at android.os.Looper.loopOnce(Looper.java:201)
                                                                                                        at android.os.Looper.loop(Looper.java:288)
                                                                                                        at android.app.ActivityThread.main(ActivityThread.java:7839)
                                                                                                        at java.lang.reflect.Method.invoke(Native Method)
                                                                                                        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Expected behavior Not crashing when openning logs

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Duna commented 11 months ago

Pluto v.2.2.0