stripe / stripe-android

Stripe Android SDK
https://stripe.com/docs/mobile/android
MIT License
1.25k stars 635 forks source link

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mtailor.android/com.stripe.android.payments.bankaccount.ui.CollectBankAccountActivity}: java.lang.IllegalArgumentException: Required value was null. #5787

Open Tatev98 opened 1 year ago

Tatev98 commented 1 year ago

I have not been able to reproduce this crash but here is the log from firebase. There were also 2 more crashes, maybe they are connected https://github.com/stripe/stripe-android/issues/5786 https://github.com/stripe/stripe-android/issues/5316 Please confirm whether there is a problem with the SDK.

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mtailor.android/com.stripe.android.payments.bankaccount.ui.CollectBankAccountActivity}: java.lang.IllegalArgumentException: Required value was null. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2951) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6718) 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)

Caused by java.lang.IllegalArgumentException: Required value was null. at com.stripe.android.payments.bankaccount.ui.CollectBankAccountActivity$viewModelFactory$2.invoke(CollectBankAccountActivity.kt:29) at com.stripe.android.payments.bankaccount.ui.CollectBankAccountActivity$viewModelFactory$2.invoke(CollectBankAccountActivity.kt:29) at com.stripe.android.payments.bankaccount.ui.CollectBankAccountViewModel$Factory.create(CollectBankAccountViewModel.kt:184) at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:97) at androidx.lifecycle.AbstractSavedStateViewModelFactory.create(AbstractSavedStateViewModelFactory.java:87) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:187) at androidx.lifecycle.ViewModelProvider.get(ViewModelProvider.kt:153) at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:53) at androidx.lifecycle.ViewModelLazy.getValue(ViewModelLazy.kt:35) at com.stripe.android.payments.bankaccount.ui.CollectBankAccountActivity.getViewModel(CollectBankAccountActivity.kt:34) at com.stripe.android.payments.bankaccount.ui.CollectBankAccountActivity.initConnectionsPaymentsProxy(CollectBankAccountActivity.kt:52) at com.stripe.android.payments.bankaccount.ui.CollectBankAccountActivity.onCreate(CollectBankAccountActivity.kt:38) at android.app.Activity.performCreate(Activity.java:7144) at android.app.Activity.performCreate(Activity.java:7135) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6718) 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)

Device Brand:Google Model:Pixel 3 XL Orientation: Portrait RAM free: 6.66 GB Disk free: 14.83 GB

Operating System Version:Android 9 Orientation: Portrait Rooted:No

Dependency Versions

kotlin: 1.6.10 stripe-android: 20.15.1 Android Gradle Plugin: 7.2.2 Gradle: 7.3.3

SDK classes

PaymentSheet flowController.configureWithSetupIntent( paymentClientSecret, config, ::onConfigured )

tillh-stripe commented 1 year ago

Hi @Tatev98, thanks for reporting this. We’ll have a look and let you know what we find.

jaynewstrom-stripe commented 2 months ago

Hi @Tatev98 we've made some recent changes that should prevent this. Are you still seeing this in the latest SDK version?