stripe-terminal-react-native
stripe-terminal-react-native copied to clipboard
Can't reconnect local reader on iOS when going background on enter pin screen
Describe the bug
We are using EXPO to run the app. During the tests, we noticed that when the phone is going into the background on the enter pin screen we are not able to re-connect to the reader. We check both ^0.0.1-beta.13
and ^0.0.1-beta.14
.
On ^0.0.1-beta.13
we are getting Could not execute connectReader because the SDK is busy with another command: processPayment.
On ^0.0.1-beta.14
connect to reader method hangs forever.
To Reproduce Steps to reproduce the behavior:
- Type *.03 amount (test stripe mode)
- Start the TTP payment process which follows the example app
- Tap the card
- Go into the background when the pin screen is visible
Expected behavior SDK should clear the state so we can easily reconnect when the app goes back active
Stripe Terminal React Native SDK version
- ^0.0.1-beta.14
- ^0.0.1-beta.13
Smartphone (please complete the following information):
- Device: iPhone XS
- OS: 16.6
Additional context
It's working fine when going into the background on any other scenario, like on the tap the card
, etc. Also, I was trying to find any method that could cancel
processPayment
(version 13) or confirmPaymentIntend
(version 14) but was not able to find any.
hey @dakkor71 did you get a chance to check this behavior on beta.15
? what are you experiencing for that?
We were able to track this down as an issue with the underlying Terminal iOS SDK. Unfortunately it's not possible to fix this within the RN SDK, and will need to wait for an update to the iOS SDK. I'll update this issue when that happens
@nazli-stripe No, I didn't test it on beta.15
. I'm glad that you found the root problem and hope you will fix this issue soon. Thanks!
hey @dakkor71 can you test this on beta.16? this issue was fixed in iOS 3.4.0, which is the version beta.16 is built with
Hey @nazli-stripe!
Need to update EXPO to 50 and will let you know ;)
Cheers!
@dakkor71 are you running into this issue on beta.17?
@nazli-stripe Thanks for releasing beta.17
. Now we are able to proceed with the EXPO update. It could take some time because we have to adjust our app to a new version but I will let you know ASAP.
Cheers
It's still not working fine or maybe I'm doing something wrong:
I can see in the logs:
LOG [Stripe terminal]: didRequestReaderInput ["tapCard"]
LOG [Stripe terminal]: didChangePaymentStatus ready
LOG [Stripe terminal]: didChangePaymentStatus processing
I can see enter pin screen and then I'm clicking side button and going into background
LOG [Stripe terminal]: didChangePaymentStatus notReady
LOG [Stripe terminal]: didChangeConnectionStatus notConnected
Then going back into active state and I can still see the discoveredReaders
and connectedReader
returned from the useStripeTerminal
hook.
- If I try to
retry
payment using the sameconnectedReader
it hangs oncollectPaymentMethod
- If I will try to
connectLocalMobileReader
using reader fromdiscoveredReaders
it hangs - If I try calling
disconnectReader
it hangs
hey @dakkor71 sorry for the delay here, and thanks for reporting it. We still have it identified as an issue with the native iOS SDK and are tentatively aiming to have it fixed in the 3.9.0 release