stripe / stripe-terminal-ios

Stripe Terminal iOS SDK
https://stripe.com/docs/terminal/sdk/ios
Other
95 stars 61 forks source link

SCPCancelable completion is not getting called #103

Open hanumanAbacus opened 2 years ago

hanumanAbacus commented 2 years ago

Summary

Call of cancel on SCPCancelable, completion is not called

Code to reproduce

iOS version

14

Installation method

pod

SDK version

2.0.1

Other information

Call processPayment tap to card to authorise disconnect the bluetooth on iPad the terminal shows disconnected turn on the bluetooth on iPad, the terminal reconnects call cancel on collectPaymentMethod SCPCancelable object. The completion is not called back, either with error or nil

bric-stripe commented 2 years ago

thanks for the report, I'd expect those steps to immediately call back with an error of SCPErrorCancelFailedAlreadyCompleted. will try to reproduce and get this fixed.

bric-stripe commented 1 year ago

hey, reviewing stale issues and realized this one can still happen, though I think the repro steps mentioned should be working now. But from reviewing the code there are still cases where cancelable's could send a message to an instance that was nil'd and would never call the completion. Created an internal ticket to better track this but still not sure when it would be prioritized.

MMavrisPaleBlue commented 1 year ago

Is this solved? I am getting the same behaviour

bric-stripe commented 1 year ago

@MMavrisPaleBlue no this is still an open issue that hasn't been prioritized. Are you hitting it with the same repro steps from the summary? Or different repro steps? What version? The repro steps from the summary should be fixed in newer versions but there are still edge cases where the completion may not be called if the command that provided the completion had already completed.