You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When unsubscribing from an Observable returned by BLE.startScanWithOptions(), which should implicitly call BLE.stopScan(), I get the following error on Android:
Error: Error: Uncaught (in promise): TypeError: callback.success.apply is not a function
TypeError: callback.success.apply is not a function
at Object.callbackFromNative (cordova.js:293)
Doing some debugging in Chrome, it looks like cordova.callbacks[callbackId] contains
"{"success":[],"fail":{"reportDuplicates":true}}"
which happen to be the arguments as passed to startScanWithOptions(), and not the success/failure callbacks for BLE.stopScan(), as apparently expected.
AFAIK, clearWithArgs: true would pass the arguments of the decorated function to the clearFunction, too. However, BLE.stopScan() does not expect any arguments (except for success/failure callbacks), so this is likely the cause for this.
Note that the same (clearWithArgs: true) also applies to BLE.startScan(), but I'm not using this and so I cannot verify that the same error occurs.
The text was updated successfully, but these errors were encountered:
When unsubscribing from an Observable returned by
BLE.startScanWithOptions()
, which should implicitly callBLE.stopScan()
, I get the following error on Android:Doing some debugging in Chrome, it looks like
cordova.callbacks[callbackId]
containswhich happen to be the arguments as passed to
startScanWithOptions()
, and not the success/failure callbacks forBLE.stopScan()
, as apparently expected.Having a look at the BLE plugin source (https://github.com/driftyco/ionic-native/blob/master/src/plugins/ble.ts#L218) , the following seems suspicious:
AFAIK,
clearWithArgs: true
would pass the arguments of the decorated function to theclearFunction
, too. However,BLE.stopScan()
does not expect any arguments (except for success/failure callbacks), so this is likely the cause for this.Note that the same (
clearWithArgs: true
) also applies toBLE.startScan()
, but I'm not using this and so I cannot verify that the same error occurs.The text was updated successfully, but these errors were encountered: