Open deepak-saralaya opened 5 years ago
@deepak-saralaya I'm having the same issue and reading the issue #181 looks like is because I'm trying execute on NativeScript Preview and barcode scanner rely on third party native libraries the are not bundled with NativeScript Preview app.
Same issue here with the default demo https://github.com/EddyVerbruggen/nativescript-barcodescanner/tree/master/demo
@hailite Care to give me a decent reproduction path?
@EddyVerbruggen please check https://play.nativescript.org/?template=play-tsc&id=CB7XFu&v=2 thanks.
@hailite Does the Preview app ship with the barcodescanner plugin? If not this is an expected result. I see you added the JS side to your playground, but the native bits are missing. Please run on a real device and see what happens.
Hello everyone! I have some error) Can help me?
> CONSOLE ERROR file:///app/tns_modules/nativescript-vue/dist/index.js:2133:20: [Vue warn]: Error in data(): "ReferenceError: Can't find variable: QRCodeReaderDelegate"
>
> found in
>
> ---> <Scan> at components/scan.vue
> <Frame>
> <Navigator>
> <App> at components/App.vue
> <Root>
> LOG from device Ipad: CONSOLE LOG '[Navigator] Failed to navigate: ReferenceError: Can\'t find variable: QRCodeReaderDelegate'
> LOG from device Ipad:
My data stracture
data() {
return {
fined: "",
search: "",
stock: "",
BarcodeScanner: require("nativescript-barcodescanner").BarcodeScanner,
lastFastSearch: "",
todos: []
};
}
I have error only in iOS devices, in android it work very good. Thank you @EddyVerbruggen
Same error for me with thoses packages versions :
"nativescript-barcodescanner": "^4.1.2",
"nativescript-vue": "~2.9.3",
It's work on Android. The issue is only on iOS.
***** Fatal JavaScript exception - application has been terminated. ***** NativeScript encountered a fatal error: Error calling module function ReferenceError: QRCodeReaderDelegate is not defined File: (file: app/webpack:/abobo/webpack/bootstrap:27:0) StackTrace: (file: app/webpack:/abobo/node_modules/nativescript-barcodescanner/barcodescanner.ios.js:426:0) at ./node_modules/nativescript-barcodescanner/barcodescanner.ios.js(file: app/webpack:/abobo/node_modules/nativescript-barcodescanner/barcodescanner.ios.js:428:1) at __webpack_require__(file: app/webpack:/abobo/webpack/bootstrap:24:0) at fn(file: app/webpack:/abobo/webpack/runtime/hot module replacement:61:0) at ./app/mixins/scan.js(file:///app/bundle.js:1101:85) at __webpack_require__(file: app/webpack:/abobo/webpack/bootstrap:24:0) at fn(file: app/webpack:/abobo/webpack/runtime/hot module replacement:61:0) at ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./app/screens/Home/index.vue?vue&type=script&lang=js&(file:///app/bundle.js:3843:70) at __webpack_require__(file: app/webpack:/abobo/webpack/bootstrap:24:0) at fn(file: app/webpack:/abobo/webpack/runtime/hot module replacement:61:0) at ./app/screens/Home/index.vue?vue&type=script&lang=js&(file:///app/bundle.js:7877:232) at __webpack_require__(file:///app/runtime.js:28:3<…>
am getting below issue on tns preview in ios
Terminating app due to uncaught exception 'NativeScript encountered a fatal error: ReferenceError: Can't find variable: QRCodeReaderDelegate at 1 @file:///app/vendor.js:479:67 2 ../node_modules/nativescript-barcodescanner/barcodescanner.js@file:///app/vendor.js:481:2 3 webpack_require@file:///app/bundle.js:76:34 4 ./app/app.component.ts@file:///app/bundle.js:222:41 5 webpack_require@file:///app/bundle.js:76:34 6 ./app/app.module.ts@file:///app/bundle.js:255:91 7 webpack_require@file:///app/bundle.js:76:34 8 ./main.ts@file:///app/bundle.js:428:92 9 webpack_require@file:///app/bundle.js:76:34 10 checkDeferredModules@file:///app/bundle.js:45:42 11 @file:///app/bundle.js:149:38 12 anonymous@file:///app/bundle.js:150:12 13 evaluate@[native code] 14 moduleEvaluation@[native code] 15 promiseReactionJob@[native code] 16 require@[native code] 17 anonymous@file:///app/starter.js:2:8 18 evaluate@[native code] 19 moduleEvaluation@[native code] 20 promiseReactionJob@[native code] ', reason: '(null)' *** First throw call stack: (0x23869bef8 0x237869a40 0x100a95544 0x100acb720 0x1006ebb78 0x10016f4f4 0x2380e4b94) libc++abi.dylib: terminating with uncaught exception of type NSException 2019-01-03 12:47:48.486 nsplaydev[37219:4273508] PlayLiveSync: Uncaught Exception