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
I wanted to register a Revolut bank card. I entered a wrong bank card expiration date accidentally. After the 3DS verification process, the Revolut sent me back an "Whops, you entered the wrong expiry date for your card" message. But the the sdk crashed here-> assert(false, "Calling completion with invalid state")
The method name: confirmSetupIntent in the STPPaymentHandler class
Assertion failed: Calling completion with invalid state: file Stripe/STPPaymentHandler.swift, line 351
inProgress = true
weak var weakSelf = self
// wrappedCompletion ensures we perform some final logic before calling the completion block.
let wrappedCompletion: STPPaymentHandlerActionSetupIntentCompletionBlock = {
status, setupIntent, error in
guard let strongSelf = weakSelf else {
return
}
// Reset our internal state
strongSelf.inProgress = false
if status == .succeeded {
// Ensure the .succeeded case returns a PaymentIntent in the expected state.
if let setupIntent = setupIntent,
error == nil,
setupIntent.status == .succeeded
{
completion(.succeeded, setupIntent, nil)
} else {
assert(false, "Calling completion with invalid state")
completion(
.failed, setupIntent,
error ?? strongSelf._error(for: .intentStatusErrorCode, userInfo: nil))
}
} else {
completion(status, setupIntent, error)
}
}
Code to reproduce
In the Summary section, I added the code where it crashed. If you need more info, feel free to ask.
iOS version
iOS 14.4.1
Installation method
Pod
SDK version
21.3.1
Other information
I can always reproduce this issue with a Revolut card. If you need more info, feel free to ask.
The text was updated successfully, but these errors were encountered:
Thanks for filing this, and sorry for the trouble! We'll fix this in the next SDK update.
Asserts are generally compiled out in release mode, so this shouldn't impact your production app — your customer will instead receive an error if the expiration date is invalid.
Summary
I wanted to register a Revolut bank card. I entered a wrong bank card expiration date accidentally. After the 3DS verification process, the Revolut sent me back an "Whops, you entered the wrong expiry date for your card" message. But the the sdk crashed here->
assert(false, "Calling completion with invalid state")
The method name: confirmSetupIntent in the STPPaymentHandler class
Assertion failed: Calling completion with invalid state: file Stripe/STPPaymentHandler.swift, line 351
Code to reproduce
In the Summary section, I added the code where it crashed. If you need more info, feel free to ask.
iOS version
iOS 14.4.1
Installation method
Pod
SDK version
21.3.1
Other information
I can always reproduce this issue with a Revolut card. If you need more info, feel free to ask.
The text was updated successfully, but these errors were encountered: