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.

Scan failed with unknown error (errorCode=-99)

See original GitHub issue

Expected behavior

The user’s device is able to scan for beacons after updating to 2.13.1.

Actual behavior

The user’s device can’t start scanning for beacons at all since updating to 2.13.1.

Steps to reproduce this behavior

Unclear, since I don’t have access to this device. However, it seems to be a hardware limitation of that particular model or series, based on some prior investigations.

Mobile device model and OS version

Samsung Galaxy J (SC-02F), 5.0

Android Beacon Library version

2.13.1


First of all, thank you for the great work on this library!

We have received a report from one of our users, who can’t scan for beacons at all with their device after updating to the latest version of our app, which increased its AltBeacon dependency from 2.9.2 to the version mentioned above. Prior to the update, we can see that they were able to detect beacons correctly. The user’s application logs show the vague error code -99 repeatedly, which causes the scan to not start.

It was pretty trivial to find a bit more information about this error, which led to a similar issue on another BLE SDK’s Issues page. The description of the maintainer fits the device in question here, since it’s also a Samsung device running on a similar API level, and they tracked it down to limitations regarding the scanning filters on this kind of device. They recommend to check for started scans that aren’t stopped properly. However, since altbeacon abstracts the repeated start/stop cycles away with its start/stopRangingBeaconsInRegion API, I’m at a loss trying to figure out where the integration might fail. I can verify that the application only calls each of those methods exactly once, and the intermediate scan operations are performed by the SDK itself.

I’m attaching an excerpt of the user’s logs related to BLE. Unfortunately, I can’t ask the user to provide more detailed logs with enabled verbose logging, so I’m aware that this might not be much to go off of.

2018-05-15 15:24:38.064 BLE (i): This is Android 5.0. We are using new scanning APIs
2018-05-15 15:24:38.095 BLE (i): beaconService version 2.13.1 is starting up on the main process
2018-05-15 15:24:38.143 BLE (w): Cannot find match for this device. Using default
2018-05-15 15:24:38.145 BLE (w): Cannot find match for this device. Using default
2018-05-15 15:24:38.149 BLE (i): binding
2018-05-15 15:24:38.965 BLE (i): start ranging received
2018-05-15 15:24:39.117 BLE (e): Scan failed with unknown error (errorCode=-99)
2018-05-15 15:24:41.142 BLE (e): Scan failed with unknown error (errorCode=-99)
2018-05-15 15:24:41.452 BLE (e): Scan failed with unknown error (errorCode=-99)
2018-05-15 15:24:42.456 BLE (e): Scan failed with unknown error (errorCode=-99)
2018-05-15 15:24:43.548 BLE (e): Scan failed with unknown error (errorCode=-99)
(...)

A few more pieces of information about our configuration:

  • BluetoothMedic#enablePowerCycleOnFailures()
  • BeaconManager#setForegroundBetweenScanPeriod(100)
  • BeaconManager#setScannerInSameProcess(true)
  • BeaconManager#addRangeNotifier() hooks in 1 listener

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
davidgyoungcommented, Jul 4, 2018

Hi, @mannodermaus. I just published a 2.15 release that includes this change.

0reactions
mannodermauscommented, Jul 4, 2018

@davidgyoung, I wanted to reach out again to inquire about any plans to publish this change in the next version of the library. Do you have a timeline for when we can expect to use this fix in a stable release?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Software Deployment failure - Unknown Error Code
Software Deployment fails with an error message - 'Unknown Error'
Read more >
Update Manager fails to scan a host with an unknown error ...
Scan Entity <name of host> VMware vCenter Update Manager had an unknown failure. Check Tasks and Events tab and logs for more details....
Read more >
Patch scan failed with Unknown error - Kaseya HelpDesk
Patch scan failed with Unknown error · 1. Check if there is a Group Policy applied to a machine that set the BITS...
Read more >
List of Error Codes without Messages - Canon - User Manuals
If you do not know the PIN, contact the administrator. Cause 2. Reception of print jobs with unknown IDs or remote scan jobs...
Read more >
Exit codes - Synopsys Detect - Black Duck Software
Exit Code Key Value Description SUCCESS 0 Detect exited successfully. FAILURE_POLICY_VIOLATION 3 Detect found policy violations. FAILURE_UNKNOWN_ERROR 100 Detect encountered an unknown error.
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