No ChallengeStatusReceiver for transaction id
Before I have submitted the issue
[x] I have read an installation guide
[x] I know that for an iOS I need to install pods because I've read the installation guide
[x] I have read a linking guide and checked that everything is OK like in manual linking guide
[x] I know that before using tipsi-stripe I need to set options for my app as described in usage guide
The problem
My React Native app is crashing when some users try to add a payment method in production. This is happening on Android only. I cannot reproduce it in debug. I'm getting this mysterious error report in Sentry and after some Googling I have no idea what this error means:
No ChallengeStatusReceiver for transaction id
d.q.a.g1.i.d: No ChallengeStatusReceiver for transaction id
at d.q.a.g1.l.s.a
at d.q.a.g1.l.q.c
at d.q.a.g1.l.q.b
at d.q.a.g1.l.y$a.onPostExecute
at android.os.AsyncTask.finish(AsyncTask.java:755)
at android.os.AsyncTask.access$900(AsyncTask.java:192)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:772)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8167)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
I have also posted the issue in the stripe android repo: https://github.com/stripe/stripe-android/issues/3616
I give more details about the flow where I suspect this is happening in the "Code To Reproduce Issue" section bellow 👇
Environment
tipsi-stripeversion: 9.0.0- Last
tipsi-stripeversion where the issue was not reproduced (if applicable): NA - iOS or Android: Android
- OS version: Most of our users are on Android 10 and 11 so that's where we see the most logs. But it's happening also on:
5.0.2,6.0.1,7.0,71.1,8.0.0,8.1.0,9,10,11 - React-Native version: 0.63.4
- (Android only)
com.google.firebase:firebase-coreversion: NA - (Android only)
com.google.android.gms:play-services-baseversion: NA =>com.google.firebase:firebase-coreandcom.google.android.gms:play-services-baseare not mentioned in the tipsi-stripe install docs. Are they required?
Links to logs and sources
For Android, please provide the following sections from android/app/build.gradle:
- android.compileSdkVersion: 29
- android.buildToolsVersion: 29.0.2
- android.defaultConfig.minSdkVersion: 21
- android.defaultConfig.targetSdkVersion: 29
- android.defaultConfig.multiDexEnabled: true
Screenshots, GIFs (Must to have)
NA
Code To Reproduce Issue (Good To Have)
I'm pretty sure this error is happening when calling stripe.confirmSetupIntent(). This method presents an authentication "challenge" if the user's bank requires it.
The flow I'm using now is:
- user enter payment details:
const createPaymentMethodParams = {
"billingDetails":{
"name":"First Last"
},
"card":{
"cvc":"333",
"expMonth":12,
"expYear":23,
"number":"4111111111111111"
}
}
-
Call the backend, which creates a setup intent with
confirmation_method=manual. This returns aclient_secret -
"Create" the payment method with
createPaymentMethod, which returns payment method id.
const paymentMethodData = await
stripe.createPaymentMethod(createPaymentMethodParams)
- Finally, confirm the setup intent (this is the step which sometimes crashes):
// confirm the setup intent:
// - if authentication is required user will be redirected to auth flow
// - if no authentication is required this directly returns paymentMethodId
const { status, paymentMethodId } = await stripe.confirmSetupIntent({
clientSecret: intent.client_secret, // previously obtained from backend
paymentMethodId: paymentMethodData.id,
})
The most relevant result I found on Google was this https://adyen.github.io/adyen-3ds2-android/com/adyen/threeds2/ChallengeStatusReceiver.html It refers to a 3DS sdk (as in "3-D Secure"), which would make sense to see at this stage when the user is required to authenticate. However I'm really not sure I'm on the right track...