Code Monkey home page Code Monkey logo

nativescript-vue-devtools's Introduction

nativescript-vue-devtools's People

Contributors

anthonny avatar charles-salmon avatar joshmossas avatar rigor789 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nativescript-vue-devtools's Issues

App crashes immediately on launch when devtools is open

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:

import Vue from 'nativescript-vue'
import VueDevtools from 'nativescript-vue-devtools'

if (TNS_ENV !== 'production' && global.VUE_DEVTOOLS) {
  Vue.use(VueDevtools)
}

Relevant dependencies:

{
  "nativescript-vue": "^2.0.0",
  "tns-core-modules": "^5.3.2",
  "tns-ios": "^5.3.1",
  "nativescript-dev-webpack": "^0.21.2",
  "nativescript-socketio": "^3.2.1",
  "nativescript-toasty": "^1.3.0",
  "nativescript-vue-devtools": "^1.2.0"
}

Full crash log:

Successfully synced application com.samgarson.whatnext on device 39343DEC-018A-4986-A7EE-082112CE7038.
CONSOLE LOG file:///app/vendor.js:14220:24: [ReferenceError: Can't find variable: SocketManager]
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1   0x110454d3b NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool, bool)
2   0x110482e80 NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
3   0x110d9f656 ffi_closure_unix64_inner
4   0x110da007a ffi_closure_unix64
5   0x114007f34 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
6   0x114007b32 __CFRunLoopDoTimer
7   0x11400739a __CFRunLoopDoTimers
8   0x114001a1c __CFRunLoopRun
9   0x114000e11 CFRunLoopRunSpecific
10  0x11acfc1dd GSEventRunModal
11  0x11554981d UIApplicationMain
12  0x110d9febd ffi_call_unix64
13  0x12b7e9cd0
JavaScript stack trace:
1   srcBackendJs@file:///app/vendor.js:3904:2237
2   __webpack_require__@file:///app/vendor.js:663:31
3   @file:///app/vendor.js:678:35
4   ../node_modules/@vue/devtools/build/backend.js@file:///app/vendor.js:678:88
5   __webpack_require__@file:///app/bundle.js:76:34
6   connect@file:///app/vendor.js:6981:24
7   setupDevtools@file:///app/vendor.js:14205:23
8   invoke@file:///app/vendor.js:39812:26
9   tick@file:///app/vendor.js:39760:20
10  UIApplicationMain@[native code]
11  _start@file:///app/vendor.js:28702:22
12  run@file:///app/vendor.js:28744:9
13  $start@file:///app/vendor.js:27378:18
14  $start@file:///app/vendor.js:14237:25
15  @file:///app/bundle.js:2886:10
16  ./main.js@file:///app/bundle.js:2890:34
17  __webpack_require__@file:///app/bundle.js:76:34
18  checkDeferredModules@file:///app/bundle.js:45:42
19  @file:///app/bundle.js:149:38
20  anonymous@file:///app/bundle.js:150:12
21  evaluate@[native code]
22  moduleEvaluation@[native code]
23  promiseReactionJob@[native code]
24  require@[n<…>
JavaScript error:
file:///app/vendor.js:3904:2237: JS ERROR TypeError: undefined is not an object (evaluating 'socket.on')
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: TypeError: undefined is not an object (evaluating 'socket.on')
at
1   srcBackendJs@file:///app/vendor.js:3904:2237
2   __webpack_require__@file:///app/vendor.js:663:31
3   @file:///app/vendor.js:678:35
4   ../node_modules/@vue/devtools/build/backend.js@file:///app/vendor.js:678:88
5   __webpack_require__@file:///app/bundle.js:76:34
6   connect@file:///app/vendor.js:6981:24
7   setupDevtools@file:///app/vendor.js:14205:23
8   invoke@file:///app/vendor.js:39812:26
9   tick@file:///app/vendor.js:39760:20
10  UIApplicationMain@[native code]
11  _start@file:///app/vendor.js:28702:22
12  run@file:///app/vendor.js:28744:9
13  $start@file:///app/vendor.js:27378:18
14  $start@file:///app/vendor.js:14237:25
15  @file:///app/bundle.js:2886:10
16  ./main.js@file:///app/bundle.js:2890:34
17  __webpack_require__@file:///app/bundle.js:76:34
18  checkDeferredModules@file:///app/bundle.js:45:42
19  @file:///app/bundle.js:149:38
2<…>

`tns preview` crashes when the app uses `nativescript-vue-devtools`

Environment

  • nativescript: 6.0.3
  • nativescript-vue: 2.4.0
  • Preview app version: 1.23.0

Describe the bug
Using the nativescript-vue-devtools plugin with tns preview causes the app to crash with the following error:

com.tns.NativeScriptException: Error calling module function 
TypeError: Cannot read property 'on' of undefined
File: "file:///data/data/org.nativescript.preview/files/app/vendor.js, line: 3254, column: 2359

StackTrace: 
	Frame: function:'srcBackendJs', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 3254, column: 2360
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 12, column: 27
	Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 27, column: 16
	Frame: function:'../node_modules/@vue/devtools/build/backend.js', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 27, column: 88
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 751, column: 30
	Frame: function:'fn', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 121, column: 20
	Frame: function:'connect', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 6334, column: 5
	Frame: function:'setupDevtools', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 7418, column: 16
	Frame: function:'Vue.$start', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 7446, column: 7
	Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 330, column: 4
	Frame: function:'./main.js', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 335, column: 30
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 751, column: 30
	Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 44, column: 23
	Frame: function:'webpackJsonpCallback', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 31, column: 19
	Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 2, column: 57
	Frame: function:'require', file:'', line: 1, column: 266

To Reproduce
Execute:

vue init nativescript-vue/vue-cli-template devtools-test-project
cd devtools-test-project
tns preview

Make sure that nativescript-vue-devtools is used:
app/main.js

import VueDevtools from 'nativescript-vue-devtools';

Vue.use(VueDevtools);

...

Expected behavior
Debugging with nativescript-vue-devtools should work with tns preview.

Additional context
The nativescript-vue-devtools package uses nativescript-socketio which has native dependencies, but isn't part of the NativeScript Preview application. That might be the reason for the error.

Vuex

Is vuex supposed to be shown when used? For me it just says "No Vuex Store detected".

Planning

This is an issue for tracking / planning what needs to be done in this plugin.

  • Figure out how exactly Vue communicates with the devtools (window.__VUE_DEVTOOLS_GLOBAL_HOOK__ I believe is where the hook needs to be injected)
  • Figure out the best / easiest way to get websockets working with ns

Idea: we could replace window.__VUE_DEVTOOLS_GLOBAL_HOOK__ using rollup in nativescript-vue core, with something like

try { 
  require('nativescript-vue-devtools')
} catch(e) {
  Vue.config.debug && console.log('to use devtools install nativescript-vue-devtools blah blah') 
}

Nothing happens when I run npx vue-devtools

I'm following the official documentation.
When I type npx vue-devtools in my project folder, nothing happens, no error returned, nothing.

I also tried a new project, nothing happens too...

package.json:

"dependencies": {
    "@vue/devtools": "^5.3.3",
    "nativescript-socketio": "^3.3.1",
    "nativescript-theme-core": "~1.0.6",
    "nativescript-toasty": "^3.0.0-alpha.2",
    "nativescript-ui-sidedrawer": "^8.0.1",
    "nativescript-vue": "~2.4.0",
    "nativescript-vue-devtools": "^1.2.0",
    "tns-core-modules": "~6.1.0",
    "vue-i18n": "^8.17.0"
  },
"devDependencies": {
    "@babel/core": "~7.1.0",
    "@babel/preset-env": "~7.1.0",
    "babel-loader": "~8.0.0",
    "nativescript-dev-webpack": "~1.2.0",
    "nativescript-vue-template-compiler": "~2.4.0",
    "node-sass": "^4.7.1",
    "vue-loader": "~15.4.0"
  }

app.js:

import VueDevtools from 'nativescript-vue-devtools'
import Vue from 'nativescript-vue'
import i18n from './assets/lang'

// Pages
import WelcomePage from './pages/Welcome'

Vue.use(VueDevtools)

// Load plugins
require('./plugins')

// Load filters
require('./utils/filters')

new Vue({

    template: `
        <Frame>
            <WelcomePage />
        </Frame>`,

    components: {
        WelcomePage
    },

    i18n
}).$start()

System info:
OS: Debian 10.3 Buster
Node.js: v.10.20.1
npm: 6.14.4
npx: 6.14.4

ReferenceError: document is not defined

Hello, there!

Woke up with this random error.
If I remove the import (import VueDevtools from "nativescript-vue-devtools";) and remote the line(Vue.use(VueDevtools);) then I can use my application. Otherwise, this error is blocking.

Versions:

  • "nativescript-vue": "~2.9.0",
  • "nativescript-vue-devtools": "^1.5.1",
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
System.err: ReferenceError: document is not defined
System.err: File: (webpack-internal:///../app-backend-core/lib/hook.js:19:22)
System.err:
System.err: StackTrace:
System.err: injectToIframes(:19:23)
System.err: 	at installHook(:42:5)
System.err: 	at eval(:7:56)
System.err: 	at ./src/hook.js(file: app/webpack:/@nativescript/template-blank-vue-ts/node_modules/@vue/devtools/build/hook.js:39:0)
System.err: 	at __nested_webpack_require_79423__(file: app/webpack:/@nativescript/template-blank-vue-ts/node_modules/@vue/devtools/build/hook.js:63:0)
System.err: 	at (file: app/webpack:/@nativescript/template-blank-vue-ts/node_modules/@vue/devtools/build/hook.js:98:36)
System.err: 	at ./node_modules/@vue/devtools/build/hook.js(file: app/webpack:/@nativescript/template-blank-vue-ts/node_modules/@vue/devtools/build/hook.js:100:10)
System.err: 	at __webpack_require__(file: app/webpack:/@nativescript/template-blank-vue-ts/webpack/bootstrap:19:0)
System.err: 	at ./node_modules/@vue/devtools/index.js(file: app/webpack:/@nativescript/template-blank-vue-ts/node_modules/@vue/devtools/index.js:1:0)
System.err: 	at __webpack_require__(file: app/webpack:/@nativescript/template-blank-vue-ts/webpack/bootstrap:19:0)
System.err: 	at ./node_modules/nativescript-vue-devtools/dist/index.js(file:///data/data/org.xxx/files/app/vendor.js:89883:71)
System.err: 	at __webpack_require__(file: app/webpack:/@nativescript/template-blank-vue-ts/webpack/bootstrap:19:0)
System.err: 	at ./app/app.ts(file:///data/data/org.xxx/files/app/bundle.js:15:83)
System.err: 	at __webpack_require__(file: app/webpack:/@nativescript/template-blank-vue-ts/webpack/bootstrap:19:0)
System.err: 	at __webpack_exec__(file:///data/data/org.xxx/files/app/bundle.js:21957:39)
System.err: 	at (file:///data/data/org.xxx/files/app/bundle.js:21958:143)
System.err: 	at __webpack_require__.X(file: app/webpack:/@nativescript/template-blank-vue-ts/webpack/runtime/startup entrypoint:6:0)
System.err: 	at (file:///data/data/org.xxx/files/app/bundle.js:21958:47)
System.err: 	at (file:///data/data/org.xxx/files/app/bundle.js:21963:3)
System.err: 	at require(:1:266)
System.err:
System.err:
System.err: ReferenceError: document is not defined
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function
System.err: ReferenceError: document is not defined
System.err: File: (webpack-internal:///../app-backend-core/lib/hook.js:19:22)

Vue Devtools stuck on vue logo. Error: Toasty Text is not set.

I'm trying to run vue devtools. After I have it running and waiting for connection, I do tns run android and it seems like it almost is about to load my components, but instead the devtools window just shows a vue logo in the middle of the window. Th console gives the following error:

[Error: Toasty Text is not set.]

crash IO module not found found

Hello and thank you for your work !!

i tried a fresh install of vue and nativescript. I tried to install via documentation nativescript-vue-devtools

and i have this

System.err: 	Frame: function:'', file:'file:///data/data/org.nativescript.klit/files/app/starter.js', line: 2, column: 1
System.err: 	Frame: function:'require', file:'', line: 1, column: 266
System.err: 
System.err: 
System.err: ReferenceError: io is not defined
System.err: File: "<unknown>, line: 1, column: 265
System.err: 
System.err: StackTrace: 
System.err: 	Frame: function:'../node_modules/nativescript-socket.io/socketio.js', file:'file:///data/data/org.nativescript.klit/files/app/vendor.js', line: 23553, column: 16
System.err: 	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.klit/files/app/bundle.js', line: 752, column: 30
System.err: 	Frame: function:'fn', file:'file:///data/data/org.nativescript.klit/files/app/bundle.js', line: 122, column: 20
System.err: 	Frame: function:'io', file:'file:///data/data/org.nativescript.klit/files/app/vendor.js', line: 23865, column: 28
System.err: 	Frame: function:'./src/backend.js', file:'file:///data/data/org.nativescript.klit/files/app/vendor.js', line: 19983, column: 18
System.err: 	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.klit/files/app/vendor.js', line: 59, column: 23

platform: linux
command: npm install --save @vue/devtools@beta nativescript-toast nativescript-socket.io nativescript-vue-devtools
and
npm install -g @vue/devtools@beta

bot not working

"dependencies": {
    "@vue/devtools": "^5.0.0-beta.3",
    "io": "^1.0.0",
    "nativescript-socket.io": "^0.9.0",
    "nativescript-theme-core": "^1.0.4",
    "nativescript-toast": "^1.4.6",
    "nativescript-vue": "^2.0.0",
    "nativescript-vue-devtools": "^1.1.0",
    "socket.io": "^2.1.1",
    "tns-core-modules": "^4.2.1"
  },
  "devDependencies": {
    "@babel/core": "^7.0.0",
    "@babel/preset-env": "^7.0.0",
    "babel-loader": "^8.0.2",
    "clean-webpack-plugin": "^0.1.19",
    "copy-webpack-plugin": "^4.5.2",
    "css-loader": "^1.0.0",
    "lazy": "1.0.11",
    "nativescript-dev-webpack": "0.17.0-2018-09-27-191217-06",
    "nativescript-vue-template-compiler": "^2.0.0",
    "nativescript-worker-loader": "~0.9.1",
    "node-sass": "^4.9.3",
    "raw-loader": "~0.5.1",
    "resolve-url-loader": "~3.0.0",
    "sass-loader": "^7.1.0",
    "uglifyjs-webpack-plugin": "~2.0.1",
    "vue-loader": "^15.4.2",
    "webpack": "^4.19.1",
    "webpack-bundle-analyzer": "~3.0.2",
    "webpack-cli": "^3.1.0",
    "webpack-sources": "~1.3.0"
  },

i run vue-devtools and after tnr run android --hmr

Thank you for your helps :)

Failed to find module nativescript-vue-devtools

Following the docs juts gives me this...

com.tns.NativeScriptException:

Error calling module function

Error calling module function

Error: com.tns.NativeScriptException: Failed to find module: "nativescript-vue-devtools", relative to: app/tns_modules/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1162)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:6566)
android.app.ActivityThread.access$1900(ActivityThread.java:267)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1963)
android.os.Handler.dispatchMessage(Handler.java:109)
android.os.Looper.loop(Looper.java:207)
android.app.ActivityThread.main(ActivityThread.java:7470)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
File: ", line: 1, column: 265

StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'nativescript-vue-devtools', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 562, column: 18
Frame: function:'webpack_require', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 76, column: 30
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 484, column: 83
Frame: function:'./main.js', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 522, column: 30
Frame: function:'webpack_require', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 76, column: 30
Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 45, column: 23
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 149, column: 18
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 152, column: 10
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/starter.js', line: 2, column: 1
Frame: function:'require', file:'', line: 1, column: 266

Error: com.tns.NativeScriptException: Failed to find module: "nativescript-vue-devtools", relative to: app/tns_modules/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1162)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:6566)
android.app.ActivityThread.access$1900(ActivityThread.java:267)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1963)
android.os.Handler.dispatchMessage(Handler.java:109)
android.os.Looper.loop(Looper.java:207)
android.app.ActivityThread.main(ActivityThread.java:7470)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
File: ", line: 1, column: 265

StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'nativescript-vue-devtools', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 562, column: 18
Frame: function:'webpack_require', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 76, column: 30
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 484, column: 83
Frame: function:'./main.js', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 522, column: 30
Frame: function:'webpack_require', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 76, column: 30
Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 45, column: 23
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 149, column: 18
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 152, column: 10
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/starter.js', line: 2, column: 1
Frame: function:'require', file:'', line: 1, column: 266

Error: com.tns.NativeScriptException: Failed to find module: "nativescript-vue-devtools", relative to: app/tns_modules/
com.tns.Module.resolvePathHelper(Module.java:146)
com.tns.Module.resolvePath(Module.java:55)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:624)
com.tns.Runtime.run(Runtime.java:616)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1162)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:6566)
android.app.ActivityThread.access$1900(ActivityThread.java:267)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1963)
android.os.Handler.dispatchMessage(Handler.java:109)
android.os.Looper.loop(Looper.java:207)
android.app.ActivityThread.main(ActivityThread.java:7470)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)
File: ", line: 1, column: 265

StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'nativescript-vue-devtools', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 562, column: 18
Frame: function:'webpack_require', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 76, column: 30
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 484, column: 83
Frame: function:'./main.js', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 522, column: 30
Frame: function:'webpack_require', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 76, column: 30
Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 45, column: 23
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 149, column: 18
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 152, column: 10
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/starter.js', line: 2, column: 1
Frame: function:'require', file:'', line: 1, column: 266

at com.tns.Runtime.runModule(Native Method)
at com.tns.Runtime.runModule(Runtime.java:624)
at com.tns.Runtime.run(Runtime.java:616)
at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1162)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6566)
at android.app.ActivityThread.access$1900(ActivityThread.java:267)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1963)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:7470)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)

Dependency nativescript-socket.io does not seem to work with nativescript-vue 2.0

Switching to nativescript-socketio did help me to get it compile and work. With nativescript-socket.io when building clean project from template with devtools enabled I get:

Failed to build plugin nativescript-socket.io :
Error: Command gradlew.bat failed with exit code 1 Error output:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':lintClassPath'.
> Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Unable to connect to devtool

Hi, I am trying out nativescript vue, following the starter guide in the official documentation and creating a new app using the vue init command and trying to connect to the dev tool.

I had no problem viewing the app on android emulator, however, I was unable to get the dev tool connected. I was stuck with Waiting for connection... with steps to add script at the top of the page you want to debug.

To Reproduce:

  1. create a new nativescript vue app from scratch following https://nativescript-vue.org/en/docs/getting-started/quick-start/
  2. Run npm install --save @vue/devtools@beta nativescript-toast nativescript-socket.io nativescript-vue-devtools
  3. Add the import in main.js
    import VueDevtools from 'nativescript-vue-devtools' Vue.use(VueDevtools)
  4. Run vue-devtools in one terminal
  5. Run rm -rf platforms && tns run android --bundle on another terminal

Vuex never changes and crashes the app when clicking on a mutation

I can connect to the Vue devtools fine. Every table seems to work at first. However when look at the vuex tab no mutation never show and when you click on the "Base State" mutation that is there by default the app crashes with the following error in the console. file:///app/webpack:/src/util.js:376:0 JS ERROR ReferenceError: Can't find variable: window NativeScript caught signal 11.

Following the docs I get "Reference Error: io is not defined"

Followed the docs exactly.

Left with this:

An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: 

Error calling module function 

Error calling module function 

ReferenceError: io is not defined
File: "file:///data/data/org.nativescript.application/files/app/vendor.js, line: 30885, column: 15

StackTrace: 
	Frame: function:'../node_modules/nativescript-socket.io/socketio.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 30885, column: 16
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'io', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32065, column: 28
	Frame: function:'srcBackendJs', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 19983, column: 18
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 59, column: 23
	Frame: function:'push.../node_modules/@vue/devtools/build/backend.js.../../node_modules/vue/dist/vue.runtime.esm.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 251, column: 10
	Frame: function:'../node_modules/@vue/devtools/build/backend.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 253, column: 3
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'connect', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 23001, column: 5
	Frame: function:'setupDevtools', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32058, column: 16
	Frame: function:'Vue.$start', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32076, column: 7
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4411, column: 4
	Frame: function:'./main.js', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4416, column: 30
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 45, column: 23
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 149, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 152, column: 10
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/starter.js', line: 2, column: 1
	Frame: function:'require', file:'', line: 1, column: 266


ReferenceError: io is not defined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'../node_modules/nativescript-socket.io/socketio.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 30885, column: 16
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'io', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32065, column: 28
	Frame: function:'srcBackendJs', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 19983, column: 18
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 59, column: 23
	Frame: function:'push.../node_modules/@vue/devtools/build/backend.js.../../node_modules/vue/dist/vue.runtime.esm.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 251, column: 10
	Frame: function:'../node_modules/@vue/devtools/build/backend.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 253, column: 3
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'connect', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 23001, column: 5
	Frame: function:'setupDevtools', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32058, column: 16
	Frame: function:'Vue.$start', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32076, column: 7
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4411, column: 4
	Frame: function:'./main.js', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4416, column: 30
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 45, column: 23
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 149, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 152, column: 10
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/starter.js', line: 2, column: 1
	Frame: function:'require', file:'', line: 1, column: 266


ReferenceError: io is not defined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'../node_modules/nativescript-socket.io/socketio.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 30885, column: 16
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'io', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32065, column: 28
	Frame: function:'srcBackendJs', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 19983, column: 18
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 59, column: 23
	Frame: function:'push.../node_modules/@vue/devtools/build/backend.js.../../node_modules/vue/dist/vue.runtime.esm.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 251, column: 10
	Frame: function:'../node_modules/@vue/devtools/build/backend.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 253, column: 3
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'connect', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 23001, column: 5
	Frame: function:'setupDevtools', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32058, column: 16
	Frame: function:'Vue.$start', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32076, column: 7
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4411, column: 4
	Frame: function:'./main.js', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4416, column: 30
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 45, column: 23
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 149, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 152, column: 10
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/starter.js', line: 2, column: 1
	Frame: function:'require', file:'', line: 1, column: 266


	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5876)
	at android.app.ActivityThread.access$1100(ActivityThread.java:199)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6669)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: com.tns.NativeScriptException: 

Error calling module function 

Error calling module function 

ReferenceError: io is not defined
File: "file:///data/data/org.nativescript.application/files/app/vendor.js, line: 30885, column: 15

StackTrace: 
	Frame: function:'../node_modules/nativescript-socket.io/socketio.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 30885, column: 16
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'io', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32065, column: 28
	Frame: function:'srcBackendJs', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 19983, column: 18
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 59, column: 23
	Frame: function:'push.../node_modules/@vue/devtools/build/backend.js.../../node_modules/vue/dist/vue.runtime.esm.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 251, column: 10
	Frame: function:'../node_modules/@vue/devtools/build/backend.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 253, column: 3
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'connect', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 23001, column: 5
	Frame: function:'setupDevtools', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32058, column: 16
	Frame: function:'Vue.$start', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32076, column: 7
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4411, column: 4
	Frame: function:'./main.js', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4416, column: 30
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 45, column: 23
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 149, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 152, column: 10
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/starter.js', line: 2, column: 1
	Frame: function:'require', file:'', line: 1, column: 266


ReferenceError: io is not defined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'../node_modules/nativescript-socket.io/socketio.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 30885, column: 16
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'io', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32065, column: 28
	Frame: function:'srcBackendJs', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 19983, column: 18
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 59, column: 23
	Frame: function:'push.../node_modules/@vue/devtools/build/backend.js.../../node_modules/vue/dist/vue.runtime.esm.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 251, column: 10
	Frame: function:'../node_modules/@vue/devtools/build/backend.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 253, column: 3
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'connect', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 23001, column: 5
	Frame: function:'setupDevtools', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32058, column: 16
	Frame: function:'Vue.$start', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32076, column: 7
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4411, column: 4
	Frame: function:'./main.js', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4416, column: 30
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 45, column: 23
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 149, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 152, column: 10
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/starter.js', line: 2, column: 1
	Frame: function:'require', file:'', line: 1, column: 266


ReferenceError: io is not defined
File: "<unknown>, line: 1, column: 265

StackTrace: 
	Frame: function:'../node_modules/nativescript-socket.io/socketio.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 30885, column: 16
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'io', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32065, column: 28
	Frame: function:'srcBackendJs', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 19983, column: 18
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 59, column: 23
	Frame: function:'push.../node_modules/@vue/devtools/build/backend.js.../../node_modules/vue/dist/vue.runtime.esm.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 251, column: 10
	Frame: function:'../node_modules/@vue/devtools/build/backend.js', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 253, column: 3
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'connect', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 23001, column: 5
	Frame: function:'setupDevtools', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32058, column: 16
	Frame: function:'Vue.$start', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 32076, column: 7
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4411, column: 4
	Frame: function:'./main.js', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 4416, column: 30
	Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 76, column: 30
	Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 45, column: 23
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 149, column: 18
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/bundle.js', line: 152, column: 10
	Frame: function:'require', file:'', line: 1, column: 266
	Frame: function:'', file:'file:///data/data/org.nativescript.application/files/app/starter.js', line: 2, column: 1
	Frame: function:'require', file:'', line: 1, column: 266


	at com.tns.Runtime.runModule(Native Method)
	at com.tns.Runtime.runModule(Runtime.java:553)
	at com.tns.Runtime.run(Runtime.java:545)
	at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1154)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5871)
	... 8 more

Android Emulator: Nexus5X (API 28)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.