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

Notification handler 'textDocument/didOpen' failed with message: Cannot read property 'token' of undefined #52

Closed
chrissena opened this issue Mar 26, 2017 · 8 comments

Comments

@chrissena
Copy link

I have installed the latest version of vscode- ng-language-service (0.1.0) but for some reason it does not work at all. when I open any file nothing appears to happen. However when I look at the output i see...

image

I am using typescript 2.2.1 and angular-cli 1.0.0.
Any ideas as to what is causing this?
Thanks

@chuckjaz
Copy link
Contributor

I am not sure. I don't use token in my server but I note that the vscode modues I use use this. I will change this diagnostic to include the stack in the next release to be able to debug this more.

Do you have a repository I can clone that reproduces this?

@chrissena
Copy link
Author

I've just installed version 0.1.1 and still getting the error. I will see if I can try and create a repo later this week.

This is the new output with stack i'm getting in the latest version.
image

@chuckjaz
Copy link
Contributor

chuckjaz commented Apr 4, 2017

I believe I see the issue. Can you put a return statement just after the call to .reportError(syntaxError("Invalid " + ... in language-service.umd.js?

@chuckjaz
Copy link
Contributor

chuckjaz commented Apr 4, 2017

angular/angular#15759

@martinmcwhorter
Copy link

I am seeing a similar error:

Search path: c:/dev/some-app/src/app/...
Config file name: c:/dev/some-app/tsconfig.json
Failed on type {"filePath":"c:/dev/some-app/src/app/layout/menu/menu.component.ts","name":"MenuComponent","members":[]} with error TypeError: Cannot read property 'forEach' of undefined
[Error - 5:17:24 PM] Notification handler 'textDocument/didOpen' failed with message: Cannot read property 'forEach' of undefined

Let me know if this is unrelated and I can open a new issue.

@chuckjaz
Copy link
Contributor

chuckjaz commented Apr 5, 2017

@martinmcwhorter This appears to be a different issue. Can you open a new issue?

@chuckjaz
Copy link
Contributor

chuckjaz commented Apr 5, 2017

Fixed in 0.1.2

@chuckjaz chuckjaz closed this as completed Apr 5, 2017
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants