stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

[BUG] App crash report on Crashlytics - CustomerSessionViewModel$Companion.getComponent - Unable to start activity ComponentInfo{mypackage/com.stripe.android.customersheet.CustomerSheetActivity}: IllegalStateException: Component could not be retrieved

Open atul-vts opened this issue 1 year ago • 0 comments

Summary

Hi Team, We've encountered a crash on Firebase Crashlytics within the Stripe SDK, as we're not directly calling this class so can't provide much information.

Code to reproduce

Fatal Exception: java.lang.RuntimeException Unable to start activity ComponentInfo{mypackage/com.stripe.android.customersheet.CustomerSheetActivity}: java.lang.IllegalStateException: Component could not be retrieved android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3635) android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3792) android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103) android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135) android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95) android.app.ActivityThread$H.handleMessage (ActivityThread.java:2210) android.os.Handler.dispatchMessage (Handler.java:106) android.os.Looper.loopOnce (Looper.java:201) android.os.Looper.loop (Looper.java:288) android.app.ActivityThread.main (ActivityThread.java:7838) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1003) Caused by java.lang.IllegalStateException Component could not be retrieved com.stripe.android.customersheet.CustomerSessionViewModel$Companion.getComponent (CustomerSessionViewModel.kt:55) com.stripe.android.customersheet.CustomerSheetViewModel$Factory.create (CustomerSheetViewModel.kt:732) androidx.lifecycle.ViewModelProvider$Factory$-CC.$default$create (ViewModelProvider.kt:83) com.stripe.android.customersheet.CustomerSheetViewModel$Factory.create androidx.lifecycle.ViewModelProvider.get (ViewModelProvider.kt:187) androidx.lifecycle.ViewModelProvider.get (ViewModelProvider.kt:153) androidx.lifecycle.ViewModelLazy.getValue (ViewModelLazy.kt:53) androidx.lifecycle.ViewModelLazy.getValue (ViewModelLazy.kt:35) com.stripe.android.customersheet.CustomerSheetActivity.getViewModel (CustomerSheetActivity.kt:36) com.stripe.android.customersheet.CustomerSheetActivity.onCreate (CustomerSheetActivity.kt:46) android.app.Activity.performCreate (Activity.java:8051) android.app.Activity.performCreate (Activity.java:8031) android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1329) android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3608) android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3792) android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103) android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135) android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95) android.app.ActivityThread$H.handleMessage (ActivityThread.java:2210) android.os.Handler.dispatchMessage (Handler.java:106) android.os.Looper.loopOnce (Looper.java:201) android.os.Looper.loop (Looper.java:288) android.app.ActivityThread.main (ActivityThread.java:7838) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1003)

Stripe SDK version

20.28.3

Android version

Android 12

Installation method

  • gradle dependency

SDK classes

  • CustomerSessionViewModel
  • CustomerSheetActivity

atul-vts avatar Feb 14 '24 10:02 atul-vts