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

2.0.10 causes TS server to crash repeatedly #4215

Closed
Tenrys opened this issue Apr 5, 2024 · 7 comments
Closed

2.0.10 causes TS server to crash repeatedly #4215

Tenrys opened this issue Apr 5, 2024 · 7 comments

Comments

@Tenrys
Copy link

Tenrys commented Apr 5, 2024

So I just updated to 2.0.10 and VSCode 1.88.0, and I noticed that no matter what the TS version is, it seems like the TS server will crash repeatedly while the extension is enabled.

Here is what shows up in the TS output, I can't seem to find any other logs:

2024-04-05 11:12:25.253 [info] Starting TS Server
2024-04-05 11:12:25.253 [info] Using tsserver from: c:\Users\Tenri\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js
2024-04-05 11:12:25.253 [info] <syntax> Forking...
2024-04-05 11:12:25.253 [info] <syntax> Starting...
2024-04-05 11:12:25.253 [info] <semantic> Forking...
2024-04-05 11:12:25.253 [info] <semantic> Starting...
2024-04-05 11:12:27.309 [info] Killing TS Server
2024-04-05 11:12:27.347 [error] TSServer exited. Code: null. Signal: SIGTERM
2024-04-05 11:12:27.347 [info] Starting TS Server
2024-04-05 11:12:27.347 [info] Using tsserver from: c:\Users\Tenri\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js
2024-04-05 11:12:27.347 [info] <syntax> Forking...
2024-04-05 11:12:27.347 [info] <syntax> Starting...
2024-04-05 11:12:27.347 [info] <semantic> Forking...
2024-04-05 11:12:27.347 [info] <semantic> Starting...
2024-04-05 11:12:29.455 [info] Killing TS Server
2024-04-05 11:12:29.499 [error] TSServer exited. Code: null. Signal: SIGTERM
2024-04-05 11:12:29.499 [info] Starting TS Server
2024-04-05 11:12:29.499 [info] Using tsserver from: c:\Users\Tenri\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js
2024-04-05 11:12:29.499 [info] <syntax> Forking...
2024-04-05 11:12:29.499 [info] <syntax> Starting...
2024-04-05 11:12:29.499 [info] <semantic> Forking...
2024-04-05 11:12:29.499 [info] <semantic> Starting...
2024-04-05 11:12:31.681 [info] Killing TS Server
2024-04-05 11:12:31.698 [error] TSServer exited. Code: null. Signal: SIGTERM

and so on and so forth. So far, it only seems to happen with a certain project, which runs on the Quasar Framework.

It does not seem to happen with version 2.0.8. 2.0.9 and above will crash. I sometimes get an "EPIPE" error of some sort.

@Tenrys Tenrys changed the title Vue - Official causes TS server to crash repeatedly 2.0.10 causes TS server to crash repeatedly Apr 5, 2024
@johnsoncodehk
Copy link
Member

This may be related to memory usage. Please try setting "typescript.tsserver.maxTsServerMemory": 4096 to see if the problem is solved.

If this doesn't work, please provide a reproduction so we can investigate.

@Tenrys
Copy link
Author

Tenrys commented Apr 5, 2024

I went back to 2.0.10 and using that setting in my project's settings.json seems to have solved the issue indeed.

@Tenrys
Copy link
Author

Tenrys commented Apr 5, 2024

Actually, never mind. I restarted the editor and it happened again. I also just realized I had set my memory limit to 8192 previously (which I suppose doesn't work by default). I'm not sure how I could give a reproduction since a lot of my code is meant to stay private, the only details I can really give is that it's based on the Quasar Framework.

@Rastuharem
Copy link

I have the same issue, with same error message. It is most likely depends on either Vue extension or the last VSCode upgrade.
One possible solution I found, that helped is to revert version of Vue extension back to 2.0.8

Btw., extending ts server memory, as @johnsoncodehk suggested, didn't help.

@nklowns
Copy link

nklowns commented Apr 5, 2024

Hi there, I've also just updated to version 2.0.10 and VSCode 1.88.0

I also tried changing the configuration for the server's memory and it didn't work.

My project is using vue@2.7.16 with vuetify@2

The log for the Window in vscode:

2024-04-05 10:44:06.980 [error] [Extension Host] A non-recoverable error occurred while executing tsserver command: updateOpen
2024-04-05 10:44:06.980 [error] [Extension Host] Error processing request. Debug Failure. False expression.
Error: Debug Failure. False expression.
    at TextStorage.getFileTextAndSize (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177999:15)
    at TextStorage.reloadWithFileText (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177922:104)
    at TextStorage.getOrLoadText (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:178033:12)
    at TextStorage.tryUseScriptVersionCache (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:178019:12)
    at TextStorage.getSnapshot (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177950:24)
    at ScriptInfo.getLatestVersion (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:178258:22)
    at ConfiguredProject2.getScriptVersion (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:178750:25)
    at f (c:\Users\cloud\.vscode\extensions\vue.volar-2.0.10\node_modules\typescript-vue-plugin-bundle\index.js:2:30540)
    at t.getScriptSnapshot (c:\Users\cloud\.vscode\extensions\vue.volar-2.0.10\node_modules\typescript-vue-plugin-bundle\index.js:2:30429)
    at getOrCreateSourceFileByPath (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:146393:35)
    at Object.getOrCreateSourceFile (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:146389:14)
    at c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:146313:42
    at Object.getSourceFileWithCache [as getSourceFile] (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:121822:24)
    at findSourceFileWorker (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124259:23)
    at findSourceFile (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124178:20)
    at processImportedModules (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124609:11)
    at findSourceFileWorker (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124314:7)
    at findSourceFile (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124178:20)
    at processImportedModules (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124609:11)
    at findSourceFileWorker (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124314:7)
    at findSourceFile (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124178:20)
    at c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124127:22
    at getSourceFileFromReferenceWorker (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124096:26)
    at processSourceFile (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:124125:5)
    at processRootFile (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:123923:5)
    at c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:122657:41
    at forEach (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:2361:22)
    at createProgram (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:122657:5)
    at synchronizeHostDataWorker (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:146344:15)
    at synchronizeHostData (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:146240:7)
    at Object.getProgram (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:146418:5)
    at ConfiguredProject2.updateGraphWorker (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:179478:41)
    at ConfiguredProject2.updateGraph (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:179327:32)
    at ConfiguredProject2.updateGraph (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:180588:24)
    at _ProjectService.createLoadAndUpdateConfiguredProject (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:182326:13)
    at _ProjectService.assignProjectToOpenedScriptInfo (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:183427:26)
    at c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:183707:64
    at flatMap (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:2609:17)
    at _ProjectService.applyChangesInOpenFiles (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:183707:24)
    at updateOpen (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:184910:29)
    at c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:187518:69
    at IpcIOSession.executeWithRequestId (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:187510:14)
    at IpcIOSession.executeCommand (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:187518:29)
    at IpcIOSession.onMessage (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:187560:51)
    at process.<anonymous> (c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:189169:14)
    at process.emit (node:events:517:28)
    at emit (node:internal/child_process:944:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

The log for the vue language server in vscode:

[Vue Named Pipe Client] No response from server for request: containsFile
[Vue Named Pipe Client] No server found for c:/../file.vue
[Vue Named Pipe Client] Failed to connect to \\.\pipe\vue-tsp-38456

The log for the TypeScript in vscode:

2024-04-05 10:44:12.599 [info] Starting TS Server
2024-04-05 10:44:12.599 [info] Using tsserver from: c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js
2024-04-05 10:44:12.599 [info] <syntax> Forking...
2024-04-05 10:44:12.599 [info] <syntax> Starting...
2024-04-05 10:44:12.599 [info] <semantic> Forking...
2024-04-05 10:44:12.599 [info] <semantic> Starting...
2024-04-05 10:44:14.961 [info] Killing TS Server
2024-04-05 10:44:14.969 [error] TSServer errored with error. Ocorreu um erro no sistema (write EPIPE)
2024-04-05 10:44:15.005 [error] TSServer exited. Code: null. Signal: SIGTERM

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Apr 6, 2024

@nklowns It seems that you have encountered the following assert.

https://github.com/microsoft/TypeScript/blob/9ba08006460cd4e03ac2ea1b3f75a6775147dc8d/src/server/scriptInfo.ts#L274

Perhaps you have a large .vue file, and you can try adding some logs in the getFileTextAndSize function in c:\Users\cloud\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js to check.

But same, without reproduction I cannot investigate further.

@johnsoncodehk
Copy link
Member

In the next version you can disable the typescript plugin by setting "vue.server.hybridMode": false. Please refer to #4226.

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

No branches or pull requests

4 participants