Nativescript-plugin-firebase: TypeError: _this.lastVisionImage.getBitmap is not a function:'onSuccess', file:'file:///node_modules/nativescript-plugin-firebase/mlkit/barcodescanning/index.js:66:0

Created on 9 Jul 2019  路  6Comments  路  Source: EddyVerbruggen/nativescript-plugin-firebase

System.err: An uncaught Exception occurred on "main" thread.
System.err: Calling js method onSuccess failed
System.err: TypeError: _this.lastVisionImage.getBitmap is not a function
System.err: Frame: function:'onSuccess', file:'file:///node_modules/nativescript-plugin-firebase/mlkit/barcodescanning/index.js:66:0
System.err: at com.tns.Runtime.callJSMethodNative(Native Method)
System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242)
System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1109)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1089)
System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1081)
System.err: at com.tns.gen.com.google.android.gms.tasks.OnSuccessListener.onSuccess(OnSuccessListener.java:19)
System.err: at com.google.android.gms.tasks.zzn.run(Unknown Source:4)
System.err: at android.os.Handler.handleCallback(Handler.java:794)
System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
System.err: at android.os.Looper.loop(Looper.java:176)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6651)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:824)

Android

Most helpful comment

I'm a bit puzzled why this happens, but I've now added a guard in order to prevent the crash.

All 6 comments

So how can I reproduce this?

Exactly after the recognition event of the code qr occurs this error, according to the video: https://drive.google.com/open?id=1F6OCqOdRLjvNvVJQphmNQX_4h-ofAHHN

This is my package:
{
"nativescript": {
"tns-android": {
"version": "6.0.0-rc-2019-06-27-172817-03"
},
"tns-ios": {
"version": "6.0.0-rc-2019-06-28-105002-01"
}
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN ",
"repository": "",
"dependencies": {
"@angular/animations": "8.0.0",
"@angular/common": "8.0.0",
"@angular/compiler": "8.0.0",
"@angular/core": "8.0.0",
"@angular/forms": "8.0.0",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "8.0.0",
"@angular/platform-browser-dynamic": "8.0.0",
"@angular/router": "8.0.0",
"@nstudio/nativescript-camera-plus": "^2.2.0",
"@tensorflow-models/coco-ssd": "^1.0.2",
"@types/moment": "^2.13.0",
"moment": "^2.24.0",
"nativescript-advanced-permissions": "^1.2.0",
"nativescript-angular": "^8.1.0-next-2019-07-05-151346-01",
"nativescript-barcodescanner": "^3.2.1",
"nativescript-camera": "^4.5.0",
"nativescript-cardview": "^3.2.0",
"nativescript-drop-down": "^5.0.2",
"nativescript-fancyalert": "^3.0.8",
"nativescript-feedback": "^1.3.9",
"nativescript-fingerprint-auth": "^7.0.1",
"nativescript-flashlight": "^2.0.1",
"nativescript-geolocation": "^5.1.0",
"nativescript-gif": "^4.0.2",
"nativescript-google-maps-sdk": "^2.7.0",
"nativescript-image-cache-it": "^5.0.0-alpha.3",
"nativescript-imagepicker": "^6.2.0",
"nativescript-iqkeyboardmanager": "^1.5.1",
"nativescript-masked-text-field": "^4.0.2",
"nativescript-ngx-fonticon": "^4.2.1",
"nativescript-numeric-keyboard": "^4.2.3",
"nativescript-permissions": "^1.3.6",
"nativescript-plugin-firebase": "^9.0.2",
"nativescript-theme-core": "^1.0.6",
"nativescript-ui-sidedrawer": "7.0.0-androidx-110619",
"reflect-metadata": "~0.1.13",
"rxjs": "^6.3.3",
"tns-core-modules": "^6.1.0-next-2019-07-03-144356-02",
"uglifyjs-webpack-plugin": "^2.1.3",
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "8.0.0",
"@nativescript/schematics": "~0.6.0",
"@ngtools/webpack": "8.0.0",
"eslint": "^6.0.1",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-angular": "^4.0.1",
"eslint-plugin-prettier": "^3.1.0",
"nativescript-dev-webpack": "1.0.0-rc-2019-07-02-161545-02",
"prettier": "^1.18.2",
"tns-platform-declarations": "6.0.0-rc-2019-06-28-175837-02",
"node-sass": "4.12.0",
"typescript": "3.4.1"
}
}

Thanks, I'll take a look.

I'm a bit puzzled why this happens, but I've now added a guard in order to prevent the crash.

Thanks for the treatment so fast.

Was this page helpful?
0 / 5 - 0 ratings