Vscode-ng-language-service: The Angular Language Service server crashed 5 times

Created on 24 Mar 2017  Â·  13Comments  Â·  Source: angular/vscode-ng-language-service

Hi.

i installed the vscode-ng-language-service 0.0.12 Experimental Release on both my mac and windows computers. i have been getting the same issue with both of them

angular crash

it has been doing this for a while now. the plugin seem not to be working.

how can i resolve this

thank you

bug tracking in angular

Most helpful comment

hi. i just installed the Experimental Release 0.1.0 and everything was working but then it crashed again.

here is the error message:

/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:47960
        var constructor = type.members['__constructor'];
                                      ^

TypeError: Cannot read property '__constructor' of undefined
    at TypeScriptSymbolQuery.getTemplateRefContextType (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:47960:39)
    at TypeScriptSymbolQuery.getTemplateContext (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:47935:36)
    at ExpressionDiagnosticsVisitor.visitVariable (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:47029:52)
    at VariableAst.visit (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:16446:24)
    at visit (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:16681:37)
    at /Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:16683:42
    at Array.forEach (native)
    at templateVisitAll (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:16682:10)
    at visit (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:44866:30)
    at /Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:44827:13
[Error - 2:20:17 PM] Connection to server got closed. Server will not be restarted.

All 13 comments

Can you try removing the '_' from the indicated line so it reads var staticSymbol = this.reflector.getStaticSymbol(sourceFile.fileName, classDeclaration.name.text);

ive removed the '_' and reloaded vscode but the autocomplete is not working still.

this is what i can see in the output console:-

getTemplateRefrences: 0ms
getTemplateRefrences: 0ms
getTemplateRefrences: 0ms
getTemplateRefrences: 0ms
getTemplateRefrences: 0ms
getTemplateRefrences: 0ms
updated: ng - 107ms
getCompletions: 0ms
getHoverAt: 0ms

That is a separate issue.

Has the language service ever worked for this project?

This is a new project so no. But now doesn't work on any of the other projects it use to work on

Sent from my iPhone

On 24 Mar 2017, at 20:51, Chuck Jazdzewski notifications@github.com wrote:

That is a separate issue.

Has the language service ever worked for this project?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Does restoring the _ make it work again on the other projects?

No mate. It still not working.
Not sure why but since I put the latest release, it does not work. I try to install the older version but still the same issue. Is there a new release coming soon. I'm on the latest typescript version. Any advice would help as the service was amazing before

Sent from my iPhone

On 24 Mar 2017, at 21:23, Chuck Jazdzewski notifications@github.com wrote:

Does restoring the _ make it work again on the other projects?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Most likely it is because the tsconfig.json now contains something that 2.1.5 typescript doesn't understand.

This error happen to me, I'm using version 0.1.0

hi. i just installed the Experimental Release 0.1.0 and everything was working but then it crashed again.

here is the error message:

/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:47960
        var constructor = type.members['__constructor'];
                                      ^

TypeError: Cannot read property '__constructor' of undefined
    at TypeScriptSymbolQuery.getTemplateRefContextType (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:47960:39)
    at TypeScriptSymbolQuery.getTemplateContext (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:47935:36)
    at ExpressionDiagnosticsVisitor.visitVariable (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:47029:52)
    at VariableAst.visit (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:16446:24)
    at visit (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:16681:37)
    at /Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:16683:42
    at Array.forEach (native)
    at templateVisitAll (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:16682:10)
    at visit (/Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:44866:30)
    at /Users/Kwakes/.vscode/extensions/Google.ng-template-0.1.0/server/node_modules/@angular/language-service/bundles/language-service.umd.js:44827:13
[Error - 2:20:17 PM] Connection to server got closed. Server will not be restarted.

Try replacing that line with var constructor = type.members && type.members['__consturctor'];

Moving this to a new issue (#53) as the original issue was resolved. It is now crashing in a new location.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings