stripe-terminal-react-native icon indicating copy to clipboard operation
stripe-terminal-react-native copied to clipboard

Bluetooth unexpectedly disconnected during operation.

Open EliasLeguizamon123 opened this issue 2 years ago • 2 comments

Describe the bug Error when connect to Reader via Bluetooth, i can discovers readers successfully and save in state:

[Stripe terminal]: didUpdateDiscoveredReaders Array [
  Object {
    "availableUpdate": null,
    "baseUrl": null,
    "batteryLevel": null,
    "bootloaderVersion": null,
    "configVersion": null,
    "deviceSoftwareVersion": "unknown",
    "deviceType": "MyReader",
    "serialNumber": "12345678910",
    ...
  },
]

But when i want to connect to my reader here, stripe terminal shows this message:


[Stripe terminal]: didChangeConnectionStatus connecting
[Stripe terminal]: didChangeConnectionStatus notConnected
[Stripe terminal]: didReportUnexpectedReaderDisconnect Object {
  "code": "UNEXPECTED_ERROR.UNEXPECTED_SDK_ERROR",
  "message": "Reader has been disconnected unexpectedly",
}
connectBluetoothReader error Object {
  "code": "READER_ERROR.BLUETOOTH_DISCONNECTED",
  "message": "Bluetooth unexpectedly disconnected during operation.",
}

To Reproduce

  1. Download my repo
  2. Set your URL and api key of stripe
  3. Set your location ID
  4. run expo run:android
  5. wait 5 seconds after app init and click on button Search here to search readers
  6. click in button Connect here and see in console this error

Expected behavior Connect my Android Device with my Reader via Bluetooth

Environment:

  1. React Native "0.69.
  2. React "18.0.
  3. Expo "~46.0.
  4. @stripe/stripe-terminal-react-native "^0.0.1-beta.
  5. Linux ZorinOS (Ubuntu Distro)
  6. Motorola Moto e(7)

Additional context I'm using Expo and Android device to develop this code (also i using Wisepad 3 reader), this error appears in console when i tap in button Connect Here

EliasLeguizamon123 avatar Aug 22 '22 20:08 EliasLeguizamon123

hey there, i am having the exact same issue, did you find any solution?

abdulrafeh857 avatar Sep 20 '22 17:09 abdulrafeh857

Hi @abdulrafeh857, i don't find any solution yet

EliasLeguizamon123 avatar Sep 21 '22 11:09 EliasLeguizamon123

Hi @EliasLeguizamon123 -- can you try with the latest release (v0.0.1-beta.11)? If you are still encountering problems, can you try reproducing with the example application? I am not able to reproduce this problem using the latest release and the example application.

billfinn-stripe avatar Jan 04 '23 18:01 billfinn-stripe

Same problem here. Reader directly disconnects after connecting - also with version 0.0.1-beta.11. The interesting part: this is only happening on certain devices. On others (especially newer models) it is working as expected.

henvo avatar Jan 26 '23 14:01 henvo

Hi @henvo -- were you able to reproduce with the example application provided in this repo? Can you list which devices are exhibiting this problem?

We did see an issue [0] that certain Samsung devices did have a firmware bug in Android 13 that was fixed in a December 2022 firmware update.

[0] https://github.com/stripe/stripe-terminal-android/issues/280

billfinn-stripe avatar Jan 26 '23 14:01 billfinn-stripe

Closing this due to inactivity. Feel free to reopen or create a new issue if your issue has not been addressed.

billfinn-stripe avatar Apr 27 '23 19:04 billfinn-stripe