stripe / stripe-android

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

3DS verification crashes when using production cards on production Stripe[BUG] #5498

Closed VinuPolly-Bonnet closed 2 months ago

VinuPolly-Bonnet commented 2 years ago

Summary

I recently updated the stripe android SDK to 20.11.0, haven't updated in a long time (was 17.2.0). When using this new SDK all test cards works on staging using Stripe's staging cards including the (4000 0027 6000 3184), which is used to check 3DS versification browser. But when checking the prod version and adding a real bank card, the 3DS window pops up, but crashes immediately afterwards.

Code to reproduce

paymentLauncher.confirm(confirmPaymentIntentParams)

Crashlog

Fatal Exception: java.lang.NoSuchMethodError: No virtual method onPrepareMenu(Landroid/view/Menu;)V in class Landroidx/core/view/MenuHostHelper; or its super classes (declaration of 'androidx.core.view.MenuHostHelper' appears in /data/app/~~KSPIrKA1KMScj0R6TMzh7Q==/com.bonnet-laNG1f_Im3Vu5zVnq_vgZw==/base.apk) at androidx.activity.ComponentActivity.onPreparePanel(ComponentActivity.java:498) at androidx.appcompat.view.WindowCallbackWrapper.onPreparePanel(WindowCallbackWrapper.java:99) at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onPreparePanel(AppCompatDelegateImpl.java:3148) at androidx.appcompat.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:459) at androidx.appcompat.app.ToolbarActionBar$1.run(ToolbarActionBar.java:58) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8669) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Android version

Tested on:

  1. (s22 ultra) running on Android 12
  2. (Redmi Note 9) running on Android 10

Installation method

Gradle

Dependency Versions

kotlin: 1.6.21 stripe-android: 20.11.0 Android Gradle Plugin: 7.1.2

SDK classes

com.stripe:stripe-android:20.11.0

brnunes-stripe commented 2 years ago

Hi @VinuPolly-Bonnet, thanks for filing the issue! Just to confirm, your app is written in Kotlin, right? Does your app declare any dependency on androidx.core:core-ktx or androidx.core:core? If so, which versions?

VinuPolly-Bonnet commented 2 years ago

Hi @brnunes-stripe Yes the app is written in Kotlin, and also I use the androidx.core:core-ktx as below implementation 'androidx.core:core-ktx:1.9.0-alpha01'

Thanks

jameswoo-stripe commented 1 year ago

Hi @VinuPolly-Bonnet, I tested this using a release version of the example app from this repo using live mode. Were you able to resolve this issue?

VinuPolly-Bonnet commented 1 year ago

Hi @jameswoo-stripe, not yet, I have just updated the Gradle and the Kotlin version to 1.7.10, will be posting a result soon. Thanks

jameswoo-stripe commented 1 year ago

@VinuPolly-Bonnet any updates on your side?

VinuPolly-Bonnet commented 1 year ago

@jameswoo-stripe I am afraid I am getting the same issue, tested it a while back, will be running another series of compatibility tests soon, would update you here.

Thanks

jaynewstrom-stripe commented 2 months ago

@VinuPolly-Bonnet We haven't heard from you in a bit, so we're going to close this issue. Please reopen if needed!