stripe/stripe-terminal-ios

SCPCancelable completion is not getting called

Opened this issue · 4 comments

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

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.

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.

Is this solved? I am getting the same behaviour

@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.