dotintent / FlutterBleLib

Bluetooth Low Energy library for Flutter with support for simulating peripherals
Apache License 2.0
531 stars 195 forks source link

could not find callback wrapper on Android #572

Open azakost opened 3 years ago

azakost commented 3 years ago

Error occur when calling startPeripheralScan() function.

D/BluetoothLeScanner( 5266): could not find callback wrapper E/flutter ( 5266): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: BleError (Error code: 600, ATT error code: null, iOS error code: null, Android error code: null, reason: Scan failed because application registration failed (code 6), internal message: null, device ID: null, service UUID: null, characteristic UUID: null, descriptor UUID: null)

Same thing with an example app. Sometimes it works, but mostly throwing this kind of error.

Any ideas how to fix this?

ChrisMarxDev commented 3 years ago

I am currently struggling with the same error on Android. Some fixes that I encountered while searching for a solution were:

I am still experiencing this error, but maybe these fixes help you.

mikolak commented 3 years ago

Have you requested the necessary runtime permission? From Android 10 you need ACCESS_FINE_LOCATION.