Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tap To Pay] Reader has been disconnected unexpectedly on Android devices #693

Open
ThanJack opened this issue May 9, 2024 · 13 comments
Open
Assignees
Labels
native sdk issue coming from native Terminal SDKs ttp

Comments

@ThanJack
Copy link

ThanJack commented May 9, 2024

Describe the bug
After putting the Android app in the background for some time, then reopening the app to do the first Tap to Pay transaction causes the following issue happens:

[Stripe terminal]: didReportUnexpectedReaderDisconnect { message: 'Reader has been disconnected unexpectedly',
  code: 'UNEXPECTED_ERROR.UNEXPECTED_SDK_ERROR' }

It happened after after creating the Payment Intent by the createPaymentIntent function and before the collectingPaymentMethod function executes. Then the collectingPaymentMethod function throws this error, which causes the transaction to fail:

{ code: 'INTEGRATION_ERROR.NOT_CONNECTED_TO_READER',
  message: 'LocalMobile reader is not connected' }

To Reproduce
Steps to reproduce the behavior:

  1. Put app to the background for a while (eg. more than 2 hours).
  2. Reopen the app, start the first transaction.
  3. Tap To Pay screen appears, try to tap a card.
  4. The issue above happens.

Expected behavior

The Reader should not be disconnected unexpectedly when doing the transaction.

Stripe Terminal React Native SDK version

  • ^0.0.1-beta.17
  • ^0.0.1-beta.18

Smartphone (please complete the following information):

  • Device: Google Pixel 3a
  • OS: Android 12
@tzecheng
Copy link

tzecheng commented May 9, 2024

Hi,
It also happens on a Pixel 4, running Android 13.
Note that the error is random. We left the app in the background over multiple periods, sometimes the payment works on re-opening the app, sometimes the above error happens.

@nazli-stripe nazli-stripe self-assigned this May 13, 2024
@nazli-stripe
Copy link
Collaborator

@tzecheng and @ThanJack can you share account and serial numbers so we can investigate?

@tzecheng
Copy link

Hi @nazli-stripe , I can't find the account and serial numbers when the payment is cancelled.

The latest has id: pi_3PF7CwEcr8OExvfT1zxs98vO

Attached bugfender screen shot
android cancelled 4.pdf

Hope that helps. Thanks.

@KillianLarcher
Copy link

It also happens on a Pixel 4, running Android 13.
Note that the error is random. We left the app in the background over multiple periods, sometimes the payment works on re-opening the app, sometimes the above error happens.

Same problem here on Samsung Tab Active 3, running Android 13.

@nazli-stripe
Copy link
Collaborator

This appears to be a potential issue with our native Android SDK, we are investigating internally. Will update this ticket with new information

@nazli-stripe nazli-stripe added the native sdk issue coming from native Terminal SDKs label May 24, 2024
@tzecheng
Copy link

tzecheng commented May 26, 2024

Hi @nazli-stripe ,

This is one of the latest instances where there is a serial number it it helps:
serialNumber: '7808ed1a-4ea0-4f73-9c83-5a7bc28a04f4'

@tzecheng
Copy link

tzecheng commented Jun 6, 2024

Here's another serial number:
serialNumber: 'b7c812c4-0237-4b3b-9366-cc9318004df0'

@KillianLarcher
Copy link

Any news? @nazli-stripe

@tzecheng
Copy link

tzecheng commented Jul 3, 2024

Hello, @nazli-stripe ,
Any progress on this?

@tzecheng
Copy link

Hi there,
Here's is a screenshot of latest failure,
Serial number: 6b16a116-d082-4568-af55-34e1104bdf3a

Android bg failure

@tzecheng
Copy link

tzecheng commented Sep 9, 2024

Hi there,

Have tried with
^0.0.1-beta.19 and ^0.0.1-beta.20

Problem is still there.
Latest serialNumber: '2e941d93-52cb-4eea-a3db-9fbe1ecd1c13'
Screenshot 2024-09-09 at 4 45 54 PM

@nabilfreeman
Copy link

nabilfreeman commented Sep 12, 2024

We are also experiencing this. The only solution so far has been to disconnect and reconnect the reader every time we want to initiate Tap to Pay. It looks like the library is unable to monitor the connection state of the reader in background and auto reconnect properly.

@tzecheng
Copy link

Hi there,
Have updated to v0.0.1-beta.22, but this problem still appears occasionally.
Latest serial no:
Screenshot 2024-10-24 at 11 46 23 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
native sdk issue coming from native Terminal SDKs ttp
Projects
None yet
Development

No branches or pull requests

5 participants