Android scan not returning any device
See original GitHub issueVersion
Tell us which versions you are using:
- react-native-ble-manager v6.2.4
- react-native v ^0.55.4
- Android 8.1
Expected behavior
I have a loop that:
- connects to one of many advertising devices
- does some logic (read/write/notify)
- disconnects and move to the next device in the list.
- Once every configured time in between iteration, a scan is invoked to identify devices In case there is a communication error with one device, it is removed from the list (unless, discovered again by a new scan).
This logic should work, even if devices are shut down and restarted, or bluetooth is disabled/enabled,
Actual behavior
I don’t have steps to reproduce, but I have observed (and it may take a couple of minutes or a couple of hours), that suddenly all devices are dropped from the list after failure to communicate, and from that moment on, scan returns 0 peripherals and I fail to communicate with the devices in an endless loop. Bluetooth on/off, does not resolve this, only shutting down the application and opening it again resolves this. When this happens, another app such as light blue (on the same phone, or a different one, can identify all the peripherals correctly).
Steps to reproduce
NA Have tried to pinpoint the issue, but was not able to.
Stack trace and console log
Hint: it would help a lot if you enable the debugger (“Pause on exceptions” in the “Source” panel of Chrome dev tools) and spot the place where the error is thrown
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Top GitHub Comments
How can one close the issue where a proper solution is not found
I faced the same problem. Some device need LOCATION authority.
Solution: Open LOCATION authority in the device.