You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using synchronous payment flow, when completing a purchase that requires 3DS, after entering 3DS verification code (correctly) and pressing submit the SDK crashes saying: "Calling completion with invalid state".
A smaller separate issue is that it also appears that due to the assertion statement within the failure code block, the app can never fail gracefully (for example, showing an error) and instead will just crash.
Code to reproduce
Try making a purchase using a 3DS test card and calling handleNextAction, performing 3DS verification and then the app should crash.
After discussing in Stripe IRC channel it appears this may be an SDK bug. The payment intent status is requiresConfirmation which we believe is correct, however, the SDK doesn't seem to allow requiresConfirmation as a success status, see:
It also seems like the assertion statement within the else block should be removed so that the SDK can complete with a failed state gracefully rather than the app crash:
assert(false,"Calling completion with invalid state")
iOS version
iOS 14.X
Installation method
Cocoapods
SDK version
21.0.1
Other information
Spoke to @karllekko about this on IRC and we both came to the conclusion that this looks like an SDK issue on there. Hopefully they can flag this internally. Thanks!
The text was updated successfully, but these errors were encountered:
Summary
Using synchronous payment flow, when completing a purchase that requires 3DS, after entering 3DS verification code (correctly) and pressing submit the SDK crashes saying: "Calling completion with invalid state".
A smaller separate issue is that it also appears that due to the assertion statement within the failure code block, the app can never fail gracefully (for example, showing an error) and instead will just crash.
Code to reproduce
Try making a purchase using a 3DS test card and calling
handleNextAction
, performing 3DS verification and then the app should crash.After discussing in Stripe IRC channel it appears this may be an SDK bug. The payment intent status is
requiresConfirmation
which we believe is correct, however, the SDK doesn't seem to allowrequiresConfirmation
as a success status, see:stripe-ios/Stripe/STPPaymentHandler.swift
Line 257 in b110232
In an older version of the SDK (when still in Obj-C) you can see
requiresConfirmation
was allowed as a success state, see:stripe-ios/Stripe/Payments/STPPaymentHandler.m
Line 147 in e55d8d1
It also seems like the assertion statement within the
else
block should be removed so that the SDK can complete with a failed state gracefully rather than the app crash:stripe-ios/Stripe/STPPaymentHandler.swift
Line 260 in b110232
iOS version
iOS 14.X
Installation method
Cocoapods
SDK version
21.0.1
Other information
Spoke to
@karllekko
about this on IRC and we both came to the conclusion that this looks like an SDK issue on there. Hopefully they can flag this internally. Thanks!The text was updated successfully, but these errors were encountered: