stripe / stripe-android

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

Fatal Exception: java.lang.RuntimeException Unable to start activity ComponentInfo{com.imile.oasis/com.stripe.android.stripe3ds2.views.ChallengeActivity}: java.lang.IllegalArgumentException: Required value was null. #5316

Open changjiashuai opened 2 years ago

changjiashuai commented 2 years ago

The crash log is from firebase, and my own recipient has not been able to reproduce it. Please confirm whether there is a problem with the SDK.

Summary

Caused by java.lang.IllegalArgumentException Required value was null. com.stripe.android.stripe3ds2.views.ChallengeViewArgs$Companion.create (ChallengeViewArgs.kt:34) com.stripe.android.stripe3ds2.views.ChallengeActivity$viewArgs$2.invoke (ChallengeActivity.kt:84) com.stripe.android.stripe3ds2.views.ChallengeActivity$viewArgs$2.invoke (ChallengeActivity.kt:83) kotlin.SynchronizedLazyImpl.getValue (LazyJVM.kt:74) com.stripe.android.stripe3ds2.views.ChallengeActivity.getViewArgs (ChallengeActivity.kt:83) com.stripe.android.stripe3ds2.views.ChallengeActivity.onCreate (ChallengeActivity.kt:98) android.app.Activity.performCreate (Activity.java:8400) android.app.Activity.performCreate (Activity.java:8380) android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1323) android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4243) android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4474) android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:93) android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:149) android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:103) android.app.ActivityThread$H.handleMessage (ActivityThread.java:2696) android.os.Handler.dispatchMessage (Handler.java:109) android.os.Looper.loop (Looper.java:228) android.app.ActivityThread.main (ActivityThread.java:9016) java.lang.reflect.Method.invoke (Method.java) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:614) com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1129)

设备 品牌:HUAWEI 型号:NAM-AL00 屏幕方向: 横向 可用 RAM: 2.32 GB 可用磁盘空间: 76.46 GB 操作系统 版本:Android 11 屏幕方向: 横向 是否已取得 root 权限:否

Dependency Versions

api "com.stripe:stripe-android:20.5.0"

kotlin: 1.6.20 stripe-android: 20.5.0 Android Gradle Plugin: 4.2.2 Gradle: 6.7.1

SDK classes

   ......
   paymentSheet.presentWithPaymentIntent(
        clientSecret,
        PaymentSheet.Configuration(
            merchantDisplayName = merchantName,
            customer = customerConfig
        )
    )
michelleb-stripe commented 2 years ago

@changjiashuai

I apologize you experiencing issues with the 3DS2 authentication. I suspect this is an issue when android kills the process or the activity. We will take a look.

In the meantime we have the ability to add your merchant so that customers always uses a web flow instead of the native flow in the SDK. If you are interested you can send an email to: 3ds2-mobile-fallback@stripe.com

changjiashuai commented 2 years ago

Can I only use web flow? Do you have any fix plans now? @michelleb-stripe

michelleb-stripe commented 2 years ago

@changjiashuai This work is in our backlog, but I don't have a date on when it will be fixed.

changjiashuai commented 2 years ago

Got it. I'll observe it first. If there are many such problems, I'll contact you and change it to web flow.

michelleb-stripe commented 2 years ago

@changjiashuai If you decide you would like to use the web flow just send an email to 3ds2-mobile-fallback@stripe.com.

jameswoo-stripe commented 2 years ago

Hi @changjiashuai are you still observing any issues on your end?

SudoPlz commented 10 months ago

We just noticed the same issue using @stripe/stripe-react-native@0.25.0 (not sure what stripe-android version that's using below the hood) but judging from this line it looks like it's between [20.19.2, 20.20.0[