Closed samtgarson closed 4 years ago
Having this same issue with app running NS 5.4 / Vuex 3.1.1 and other latest packages. If devtools not running app behaves just fine.
Same here, on simply using vue init nativescript-vue/vue-cli-template
to create the project, then tns run ios --hmr
, opening devTools in Chrome & updating any file.
Same here. It worked in the previous project (about 1 month ago), but it doesn't work in the new one. Same error. iOS emulator.
Got this to work.
Steps:
1) Open package.json
and remove next packages: @vue/devtools, nativescript-socketio, nativescript-toasty, nativescript-vue-devtools
2) rm -rf node_modules
3) npm i
4) npm i --save @vue/devtools nativescript-toasty nativescript-socketio nativescript-vue-devtools
5) rm -rf platforms
6) tns run ios --bundle
I did the same things before but used npm i --save-dev
instead of npm i --save
.
Dev tools shouldn't be used in production dependencies.
I was having the same issues. I tried removing the unsupported plugins as well as creating new app from scratch. Neither worked.
What resolved it for me was uninstalling and then re-installing the NativeScript preview app on my iPhone. (note: I avoided adding additionally plugins such as dev-tools etc so not sure if it would have worked wit them installed)
@hraynaud - this worked for me as well. I'd installed "preview" about 2 months ago, and the App Store didn't show 'update' available, but there was version released a week ago (1.25.0?). Removing and reinstalling preview seemed to work.
is there any update on this issue?
development machine os: macOS Catalina Version 10.15.2
Component nativescript has 6.3.3 version and is up to date. Component tns-core-modules has 6.3.2 version and is up to date. Component tns-android has 6.3.1 version and is up to date. Component tns-ios has 6.3.0 version and is up to date.
comment out and then start the app. ( tns run ios --bundle )
main.ts
if(TNS_ENV !== 'production') {
//Vue.use(VueDevtools)
}
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x104b89d50 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2 0x104bd13b0 -[TNSRuntime executeModule:referredBy:]
3 0x1043fd5d8
4 0x194d44e18 <redacted>
JavaScript stack trace:
handleCopy(file:///app/webpack:/home/akryum/Projects/vue-devtools/node_modules/@vue-devtools/app-backend/src/hook.js:419:0)
at file:///app/webpack:/home/akryum/Projects/vue-devtools/node_modules/@vue-devtools/app-backend/src/hook.js:101:0
at on(file:///app/webpack:/home/akryum/Projects/vue-devtools/node_modules/@vue-devtools/app-backend/src/hook.js:47:0)
at emit(file:///app/webpack:/home/akryum/Projects/vue-devtools/node_modules/@vue-devtools/app-backend/src/hook.js:81:0)
at devtoolPlugin(file:///node_modules/vuex/dist/vuex.esm.js:54:19)
at Store(file:///node_modules/vuex/dist/vuex.esm.js:357:18)
at ./store.ts(file:///app/store.ts:6:30)
at __webpack_require__(file:///app/webpack/bootstrap:750:0)
at fn(file:///app/webpack/bootstrap:120:0)
at file:///app/bundle.js:300:58
at ./main.ts(file:///app/bundle.js:314:34)
at __webpack_require__(file:///app/webpack/bootstrap:750:0)
at checkDeferredModules(file:///app/webpack/bootstrap:43:0)
at webpackJsonpCallback(file:///app/webpack/bootstrap:30:0)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation([native code])
at [native code]
at asyncFunctionResume([native code])
at [native code]
at promiseReactionJob([native code])
JavaScript error:
file:///app/webpack:/home/akryum/Projects/vue-devtools/node_modules/@vue-devtools/app-backend/src/hook.js:419:0: JS ERROR ReferenceError: Can't find variable: HTMLElement
*** JavaScript call stack:
(
)
*** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: ReferenceError: Can't find variable: HTMLElement
at
handleCopy(file:///app/webpack:/home/akryum/Projects/vue-devtools/node_modules/@vue-devtools/app-backend/src/hook.js:419:0)
at file:///app/webpack:/home/akryum/Projects/vue-devtools/node_modules/@vue-devtools/app-backend/src/hook.js:101:0
at on(file:///app/webpack:/home/akryum/Projects/vue-devtools/node_modules/@vue-devtools/app-backend/src/hook.js:47:0)
at emit(file:///app/webpack:/home/akryum/Projects/vue-devtools/node_modules/@vue-devtools/app-backend/src/hook.js:81:0)
at devtoolPlugin(file:///node_modules/vuex/dist/vuex.esm.js:54:19)
at Store(file:///node_modules/vuex/dist/vuex.esm.js:357:18)
at ./store.ts(file:///app/store.ts:6:30)
at __webpack_require__(file:///app/webpack/bootstrap:750:0)
at fn(file:///app/webpack/bootstrap:120:0)
at file:///app/bundle.js:300:58
at ./main.ts(file:///app/bundle.js:314:34)
at __webpack_require__(file:///app/webpack/bootstrap:750:0)
at checkDeferredModules(file:///app/webpack/bootstrap:43:0)
at webpackJsonpCallback(file:///app/webpack/bootstrap:30:0)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation([native code])
at [native code]
at asyncFunctionResume([native code])
at [native code]
at promiseReactionJob([native code])
', reason: '(null)'
*** First throw call stac<\M-b\M^@\M-&>
NativeScript caught signal 6.
Native Stack:
1 0x104bcffd4 sig_handler(int)
2 0x194c57424 <redacted>
3 0x194c5a8b8 pthread_kill
4 0x194beaa74 abort
5 0x194d023c8 __cxa_bad_cast
6 0x194d025c0 <redacted>
7 0x194c69308 <redacted>
8 0x194d0f634 <redacted>
9 0x194d0ef58 __cxa_get_exception_ptr
10 0x194d0ef10 <redacted>
11 0x194c69158 <redacted>
12 0x104b8a21c NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
13 0x104bd13b0 -[TNSRuntime executeModule:referredBy:]
14 0x1043fd5d8
15 0x194d44e18 <redacted>
For anyone using Vuex this answer fixed my issue https://stackoverflow.com/a/58753786/12997343
App runs fine in every case (even when the plugin is enabled) unless
vue-devtools
electron app is running, in which case it crashes every time.Not sure how much more context I can give, please let me know what more help I can give—finding this environment pretty tough to debug so far.
This worked previously, but since doing a significant upgrade of dependencies after a few months (
nativescript-vue
to 2.0.0, and other minor version bumps) this integration explodes consistently.Full app can be found here.
Appreciate any help you can provide, this is making it much harder to build an app!
Relevant
main.js
:Relevant dependencies:
Full crash log: