Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server crash on 0.6.1 var symbol = container.locals.get(node.text); #127

Closed
pdanpdan opened this issue Apr 20, 2017 · 16 comments
Closed

Server crash on 0.6.1 var symbol = container.locals.get(node.text); #127

pdanpdan opened this issue Apr 20, 2017 · 16 comments
Labels

Comments

@pdanpdan
Copy link

pdanpdan commented Apr 20, 2017

[Error - 8:21:07 PM] Request textDocument/completion failed.
  Message: Request textDocument/completion failed with message: Cannot read property 'get' of undefined
  Code: -32603 
C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:23318
                var symbol = container.locals.get(node.text);
                                             ^

TypeError: Cannot read property 'get' of undefined
    at isNameOfExportsOrModuleExportsAliasDeclaration (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:23318:46)
    at bindStaticPropertyAssignment (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:23396:17)
    at bindWorker (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:23079:29)
    at bind (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:22974:13)
    at visitNode (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:14662:20)
    at Object.forEachChild (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:14725:21)
    at bindEachChild (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:21771:16)
    at bindChildrenWorker (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:21852:21)
    at bindChildren (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:21746:17)
    at bind (C:\Users\H195849\.vscode-insiders\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:22985:21)
@octref
Copy link
Member

octref commented Apr 20, 2017

Can you help me finding a repro? Try it on some public vue projects like https://github.com/vuejs/vue-hackernews-2.0 or https://github.com/vuejs-templates/webpack and see if the server crashes? If not, can you try to put some code from your codebase to a template project and manage to crash vetur's Language Server?

This is what @The-Smallest did and was extremely helpful for me to fix the previous crash:

image

@MWallin
Copy link

MWallin commented Apr 20, 2017

It crashes for me to:

C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:23318
                var symbol = container.locals.get(node.text);
                                             ^

TypeError: Cannot read property 'get' of undefined
    at isNameOfExportsOrModuleExportsAliasDeclaration (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:23318:46)
    at bindStaticPropertyAssignment (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:23396:17)
    at bindWorker (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:23079:29)
    at bind (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:22974:13)
    at bindConditionalExpressionFlow (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:22441:13)
    at bindChildrenWorker (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:21837:21)
    at bindChildren (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:21746:17)
    at bind (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:22985:21)
    at visitNode (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:14662:20)
    at Object.forEachChild (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.1\client\server\node_modules\typescript\lib\typescript.js:14725:21)
[Info  - 21:18:08] Connection to server got closed. Server will restart.

I tried downloading the repo https://github.com/vuejs/vue-hackernews-2.0 and that doesn't crash.

I tried doeing what The-Smallest did with a new webpack-simple template and a bad import and that doesn't crash it.

Here is a repo with my project that crashes, https://github.com/MWallin/WonderfulQuotes

Hope this helps!

@MWallin
Copy link

MWallin commented Apr 20, 2017

Okay, I've done some more digging on this now and I think that the problem isn't really with vetur or the vue language server exactly.

The project I'm working on is part of an online course and the package.json file I use is part of an assignement from the course. The content was ass follows:

"devDependencies": {
   "babel-core": "^6.0.0",
   "babel-loader": "^6.0.0",
   "babel-preset-es2015": "^6.0.0",
   "cross-env": "^3.0.0",
   "css-loader": "^0.25.0",
   "file-loader": "^0.9.0",
   "vue-loader": "^9.7.0",
   "webpack": "2.1.0-beta.25",
   "webpack-dev-server": "2.1.0-beta.0"
 }

I thought it funny that a new project worked so I updated with the following:

  "devDependencies": {
    "babel-core": "^6.0.0",
    "babel-loader": "^6.0.0",
    "babel-preset-latest": "^6.0.0",
    "cross-env": "^3.0.0",
    "css-loader": "^0.25.0",
    "file-loader": "^0.9.0",
    "vue-loader": "^11.1.4",
    "vue-template-compiler": "^2.2.1",
    "webpack": "^2.2.0",
    "webpack-dev-server": "^2.2.0"
  }

And blam, no more crashing. Don't really know why, just that it works now...

@shjyh
Copy link

shjyh commented Apr 21, 2017

same. and i use the lastest version of all dependencies, but server still crash.
and strangely enough, the error does not happen immediately when the ide startup, but crash after a few minutes

@Ringes
Copy link

Ringes commented Apr 21, 2017

I get a crash, unfortunately no logging...after some minutes, vsc gets up to 700MB RAM and 40% processor for some time on a i5 8gb RAM machine, then get a message about the extension host terminating and needing to reload the window. I don't see any logs or anything.

@jbrodriguez
Copy link

Same issues here, high ram and cpu usage, then

[Info  - 6:28:36 AM] Connection to server got closed. Server will restart.
/Volumes/Users/user/.vscode/extensions/octref.vetur-0.6.1/client/server/node_modules/typescript/lib/typescript.js:23318
                var symbol = container.locals.get(node.text);

screen shot 2017-04-21 at 06 31 30

@octref
Copy link
Member

octref commented Apr 21, 2017

@MWallin Your project: https://github.com/MWallin/WonderfulQuotes doesn't crash for me though.

@octref octref changed the title Server still crash on 0.6.1 Server crash on 0.6.1 var symbol = container.locals.get(node.text); Apr 21, 2017
@octref
Copy link
Member

octref commented Apr 21, 2017

@MWallin
Copy link

MWallin commented Apr 21, 2017

@octref I updated the devDependencies for the project I linked to, WonderfulQuotes, by accident so it doesn't crash anymore for me either. Sorry for that!

However I have another project that crashes the same way here https://github.com/MWallin/ColorComponents.

I tried 0.6.2 and no change, it still crashes.

@octref
Copy link
Member

octref commented Apr 25, 2017

Can you upgrade to 0.6.2 (published in marketplace) and see if that fixes the problem for you?

@octref octref added the bug label Apr 25, 2017
@MWallin
Copy link

MWallin commented Apr 26, 2017

Sorry, no luck with the upgrade. I even reinstalled the extension to make sure I got the right 0.6.2 update.

This is the error message now:

C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:23318
                var symbol = container.locals.get(node.text);
                                             ^

TypeError: Cannot read property 'get' of undefined
    at isNameOfExportsOrModuleExportsAliasDeclaration (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:23318:46)
    at bindStaticPropertyAssignment (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:23396:17)
    at bindWorker (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:23079:29)
    at bind (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:22974:13)
    at bindConditionalExpressionFlow (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:22441:13)
    at bindChildrenWorker (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:21837:21)
    at bindChildren (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:21746:17)
    at bind (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:22985:21)
    at visitNode (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:14662:20)
    at Object.forEachChild (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.2\client\server\node_modules\typescript\lib\typescript.js:14725:21)
[Error - 15:19:27] Connection to server got closed. Server will not be restarted.

@octref
Copy link
Member

octref commented Apr 26, 2017

@MWallin Do you mind trying 0.6.3 on ColorComponents? There is a fix including vue-template-compiler.

This seems dubious:

WonderfulQuotes

  • Has vue-template-compiler
  • Not crashing

ColorComponents

  • Doesn't have vue-template-compiler
  • Crashing

@octref
Copy link
Member

octref commented May 1, 2017

There are fix for both vue-template-compiler and high CPU usage in 0.6.4. Feel free to open a new issue if this happens again.

@octref octref closed this as completed May 1, 2017
@MWallin
Copy link

MWallin commented May 2, 2017

Sorry for the absence.

I just tried the latest version, 0.6.4, with color components and no luck, the language server crashes again.

C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:23318
                var symbol = container.locals.get(node.text);
                                             ^

TypeError: Cannot read property 'get' of undefined
    at isNameOfExportsOrModuleExportsAliasDeclaration (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:23318:46)
    at bindStaticPropertyAssignment (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:23396:17)
    at bindWorker (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:23079:29)
    at bind (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:22974:13)
    at bindConditionalExpressionFlow (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:22441:13)
    at bindChildrenWorker (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:21837:21)
    at bindChildren (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:21746:17)
    at bind (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:22985:21)
    at visitNode (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:14662:20)
    at Object.forEachChild (C:\Users\mikae\.vscode\extensions\octref.vetur-0.6.4\client\server\node_modules\typescript\lib\typescript.js:14725:21)
[Error - 09:07:29] Connection to server got closed. Server will not be restarted.

Something is definetly not working right. But since it depends on the project I don't think its that big of a deal?

@gpopovic
Copy link

gpopovic commented May 2, 2017

@MWallin i'm also getting the same error

@octref
Copy link
Member

octref commented May 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants