question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

startDeviceScan error - "Cannot start scanning operation" on Android (Samsung Galaxy only)

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
pixelfoundry-devcommented, Dec 11, 2020

@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?

2reactions
salmazovcommented, Apr 6, 2021

Have the same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

startDeviceScan error - "Cannot start scanning operation" on ...
I have built a RN app using this library. It works fine on the Galaxy Tab A I develop on but for some...
Read more >
[bleerror: cannot start scanning operation] - You.com | The AI ...
On Galaxy S10 startDeviceScan method returns the following error. ... error - "Cannot start scanning operation" on Android (Samsung Galaxy only)#738.
Read more >
Cannot Start Scanning Operation Error - CoachCare - Zendesk
STEP #2: Go to Bluetooth. STEP #3: Turn Bluetooth Off for about 15 seconds then Turn Bluetooth On.
Read more >
RxBLELibraries/react-native-ble - Gitter
Hello guys. I have read that older verdions of the ble plx lib had problems where no backpressure handling has been applied on...
Read more >
React-Native-BLE-plx : how to get all scanned device list of ...
scan ([], 10, true, { matchMode: 1, scanMode: 2, }) .then(Results => { // Success code console.log('Scan started'); }) .catch(error => console.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found