React-native-ble-plx: startDeviceScan error - "Cannot start scanning operation" on Android (Samsung Galaxy only)

Created on 5 Sep 2020  路  3Comments  路  Source: Polidea/react-native-ble-plx

I have built a RN app using this library. It works fine on the Galaxy Tab A I develop on but for some reason on my Samsung Galaxy S9+ the startDeviceScan method returns the following error:
{"message":"Cannot start scanning operation","errorCode":600,"attErrorCode":null,"iosErrorCode":null,"androidErrorCode":null,"reason":"Scan failed because application registration failed (code 6)","name":"BleError","line":24096,"column":28,"sourceURL":"http://localhost:8081/index.bundle?platform=android&dev=true&minify=false"}

I've reviewed all comments on the required permissions etc. I'm using RN 0.62, build versions below:
ext { buildToolsVersion = "29.0.2" minSdkVersion = 21 compileSdkVersion = 29 targetSdkVersion = 29 androidXCore = "1.0.2" }

The permissions in AndroidManfiest.xml are:
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/> <uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/> <uses-permissionandroid:name="android.permission.FOREGROUND_SERVICE"/>`

And I have also manually requested as well through:
const granted = await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION, { title: 'Permission Localisation Bluetooth', message: 'Requirement for Bluetooth', buttonNegative: 'Cancel', buttonPositive: 'OK', } );

I have basically created a fresh basic app to test and am only calling the startDeviceScan to recreate this error. Like I mentioned before, the tablet works perfectly in all of the above situations, it is only my S9+ mobile that is throwing the error.

bug stale

Most helpful comment

@paulclark94 hi, i get the same error here, it worked for some minutes, then i cannot make it working again. This is really strange issue. Have you resolved it?

All 3 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@paulclark94 hi, i get the same error here, it worked for some minutes, then i cannot make it working again. This is really strange issue. Have you resolved it?

Have the same issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nriccar picture nriccar  路  3Comments

JordanKlaers picture JordanKlaers  路  5Comments

juanjo-ramos picture juanjo-ramos  路  3Comments

SlavaInstinctools picture SlavaInstinctools  路  4Comments

haohcraft picture haohcraft  路  5Comments