AOT compatibility
See original GitHub issueHello,
I’m switching to AOT compilation on my project including the barcode scanner plugin.
With JIT, the barcode scanner works fine but with AOT compilation, I have this error when the component calling the plugin is initialized :
***** Fatal JavaScript exception - application has been terminated. ***** Native stack trace: 1 0x10069f764 NativeScript::FFICallbackNativeScript::ObjCMethodCallback::ffiClosureCallback(ffi_cif*, void*, void**, void*) 2 0x100f292cc ffi_closure_SYSV_inner 3 0x100f2c1b4 .Ldo_closure 4 0x191e67d30 <redacted> 5 0x191e67cb0 <redacted> 6 0x191e52128 <redacted> 7 0x191f83ea0 <redacted> 8 0x19203ced4 <redacted> 9 0x1923f2628 <redacted> 10 0x1923ee6c0 <redacted> 11 0x18bf2a0c0 <redacted> 12 0x18bf27cf0 <redacted> 13 0x18bf28180 <redacted> 14 0x18be562b8 CFRunLoopRunSpecific 15 0x18d90a198 GSEventRunModal 16 0x191e9d7fc <redacted> 17 0x191e98534 UIApplicationMain 18 0x100f2c044 ffi_call_SYSV 19 0x100f28e0c ffi_call_int 20 0x100f28924 ffi_call 21 0x1006614fc NativeScript::FFICall::call(JSC::ExecState*) 22 0x100c93888 JSC::LLInt::setUpCall(JSC::ExecState*, JSC::Instruction*, JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) 23 0x100c9bf08 llint_entry 24 0x100c9bf18 llint_entry 25 0x100c9bf18 llint_entry 26 0x100c9bf18 llint_entry 27 0x100c9bf18 llint_entry 28 0x100c9bf18 llint_entry 29 0x100c9bf18 llint_entry 30 0x100c957f8 vmEntryToJavaScript 31 0x100c35294 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*) JavaScript stack trace: 1 __tryOrUnsub@file:///app/vendor.js:9274:22 2 next@file:///app/vendor.js:9219:34 3 _next@file:///app/vendor.js:9172:30 4 next@file:///app/vendor.js:9136:23 5 next@file:///app/vendor.js:19272:29 6 emit@file:///app/vendor.js:34698:80 7 checkStable@file:///app/vendor.js:21549:44 8 onLeave@file:///app/vendor.js:21625:25 9 onInvoke@file:///app/vendor.js:21587:34 10 invoke@file:///app/vendor.js:57183:42 11 run@file:///app/vendor.js:57077:49 12 zonedCallback@file:///app/vendor.js:56004:27 13 notify@file:///app/vendor.js:12823:31 14 onSelectedIndexPropertyChanged@file:///app/vendor.js:43902:20 15 _trySetNativeValue@file:///app/vendor.js:8603:43 16 _onPropertyChanged@file:///app/vendor.js:8566:32 17 _onPropertyChanged@file:///app/vendor.js:79782:49 18 _setValueInternal@file:///app/vendor.js:3215:36 19 _setValue@file:///app/vendor.js:3041:31 20 set@file:///app/vendor.js:83454:27 21 selected@file:///app/vendor.js:43980:18 22 UIApplicationMain@[native code] 23 start@file:///app/vendor.js:16359:26 24 bootstrapApp@file:///app/vendor.js:55618:28 25 bootstrapModuleFactory@file:///app/vendor.js:55599:26 26 @file:///app/bundle.js:77839:139 27 webpack_require@file:///app/vendor.js:53:34 28 webpackJsonpCallback@file:///app/vendor.js:25:42 29 anonymous@file:///app/bundle.js:2:13 30 evaluate@[native code] 31 moduleEvaluation@[native code] 32 @[native code] 33 promiseReactionJob@[native code] 34 require@[native code] 35 anonymous@file:///app/starter.js:2:8 36 evaluate@[native code] 37 moduleEvaluation@[native code] 38 @[native code] 39 promiseReactionJob@[native code] JavaScript error: file:///app/vendor.js:9274:22: JS ERROR Error: Token must be defined!
npm ERR! Darwin 16.4.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” “start-ios-bundle”
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ start-ios-bundle: tns run ios --bundle --disable-npm-install
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start-ios-bundle script ‘tns run ios --bundle --disable-npm-install’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tns run ios --bundle --disable-npm-install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /Users/dev/Documents/dev/myclap/clients/mobile_clapeur/npm-debug.log
Can you help me figure out how to do ?
Thanks
Bobby
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
@iwoogy you can try this:
@tscislo Can you give the latest version a spin? And a question: is there a particular reason why you want to use dependency injection instead of doing simply
new BarcodeScanner()
? It’s not that DI will gain you anything in this case IMO.