-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Infinite loop of "The TypeScript language service died unexpectedly" #9215
Comments
@Andy-MS where did you get 2.0.0 from. npm install typescript@2.0.0 doesn't install any usable typescript package. |
EDIT: I am now again able to reproduce the problem in an empty directory with a new file |
@Andy-MS does a non empty file work. If so does the status line in the right corner give some hint about the TS version used ? And just to be super sure. You neither have a tsdk setting in the user nor in the workspace settings. |
@Andy-MS I have no clue why this happens since this works for me without problems. Did you choose a special install location for VS Code ? If not does |
Yes, that folder exists for me with the same files listed. And I can run:
|
OK. if you add a workspace setting and restart code afterwards do you still see the problem ? "typescript.tsdk": "C:\\Program Files (x86)\\Microsoft VS Code\\resources\\app\\extensions\\typescript\\server\\typescript\\lib" |
Yes, with that as the only line in my |
@Andy-MS I have no idea what is going on. You have the correct version of the tsserver. Do you still see this with VS Code 1.4. If so, can I give you instruction on how to debug this? |
I still get it with 1.4. I'd be happy to try debugging it. |
Thanks for offering your help. You need to do the following:
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5870,
"address": "localhost",
"restart": false,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": null
}
|
I see line 176 getting hit (this is the one after |
That means the node process exits with error number 7. Still no clue why :-( |
Since you see |
Despite the message, the error happens within a few seconds of running |
@Andy-MS. Very strange :-(. The easiest to track this down is to run and debug VS Code from source. How to do so is documented here: https://github.com/Microsoft/vscode/wiki/How-to-Contribute#build-and-run-from-source. Would you be willing to set this up. Otherwise I will add additional options to the next build to ease this. |
Sorry, but I was unable to build on Windows (using the latest c++ devtools from visual studio gives errors with oniguruma) and the problem does not happen on linux, so it'll have to wait until the next build. |
@Andy-MS that looks like the problem we started seeing when upgrading the C/C++ tooling with VS Update 3. We have worked around it by updating the node-gyp package npm is using to version 3.4.0. (We are currently blocked from upgrading npm itself to >=3.9, the latest comes with the fixed node-gyp.). |
@Andy-MS can you still reproduce this? |
@dbaeumer I am also facing the same issue. I have noticed that if VS Code is ran as administrator, the problem goes away. In every other case, it goes into the infinite loop. I am using VS Code v1.7.2, Node v5.9.0, tsc v2.0.10 on Windows 10. |
@Sayan751 strange. Works for me using an non administrator account. One idea to better understand this is the following:
Does that help? |
I can't reproduce this any more with VSCode 1.7.2. I just get a message "Info | Version mismatch! global tsc (2.2.0-dev.20161118) != VS Code's language service (2.0.10). Inconsistent compile..." |
@Andy-MS the version mismatch points to the fact that your global tsc version is 2.2.0-dev.20161118 and the VSC version is 2.0.10. Since you don't have the tsdk setting pointing to 2.2.0-dev.20161118 it might happend that running tsc in the terminal produces different errors than the language service inside VS Code (because they are different version). You can disable that check by pressing the 'Don't check again' button. |
@dbaeumer I confirm, that this helps. Thank you for that.
I think this is the workaround for now. |
@Sayan751 good to hear. Now we need to understand why TS is not running from the installation directory. Is there anything special. Have you installed VS Code into a special location ? |
@dbaeumer I can't remember changing any default option during installation. On my machine the installation path is "C:\Program Files (x86)\Microsoft VS Code\Code.exe" |
@Sayan751 is there anything in the TypeScript Output Channel (Ctrl+Shift+U) select TypeScript from the drop down? |
@dbaeumer When I use the default
However, when I override the default
and along with that the infinite loop of the pop-up stops. |
@Sayan751 could you do the following in advance:
Can you provide the content of the log file. |
@dbaeumer Please find the logs attached. |
@Sayan751 surprisingly there is nothing that points to a crash in the log. If I give you instructions would you be able to debug this a little. I have no clue why this is happening. |
@mhegazy any idea how we could find out why the tsserver exits without being ask to do so. |
@Sayan751 thanks for the logs. Will have a look. When you have time to help me with that please ping. |
@dbaeumer ping |
Closing since it sounds like the original issue has been resolved. If you seeing a similar problem with VSCode 1.9+, please open a new bug and we will investigate. Thanks |
Steps to Reproduce:
empty.ts
The error message "The TypeScript language service died unexpectedly 5 times in the last 5 Minutes. Please consider to open a bug report." repeatedly pops up.
My
settings.json
is an empty object.The problem can be solved by adding
"typescript.tsdk": "C:\\Program Files\\nodejs\\node_modules\\typescript\\lib"
tosettings.json
. My globaltsc --version
is2.0.0
.The text was updated successfully, but these errors were encountered: