microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.98k stars 28.78k forks source link

TypeScript language server exited with error #207998

Open CuteNikki opened 6 months ago

CuteNikki commented 6 months ago

Type: Bug

I have no idea how to reproduce this, but it's getting really annoying... It keeps crashing like every few minutes for no reason at all. TypeScript language server exited with error. Error message is: write EPIPE. Source: TypeScript and JavaScript Language Features

also gives me The JS/TS language service crashed. Source: TypeScript and JavaScript Language Features

VS Code version: Code - Insiders 1.88.0-insider (9ccb0fa738a2f7a1c5328800c9fe18f4dd5b4f8a, 2024-03-18T05:49:11.301Z) OS version: Windows_NT x64 10.0.22631 Modes: Remote OS version: Linux x64 5.4.0-173-generic

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 5 3600X 6-Core Processor (12 x 3800)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.91GB (9.02GB free)| |Process Argv|--crash-reporter-id 6e60ae21-3bbe-4909-8cb6-1a9f457f94c2| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|SSH: 162.248.100.93| |OS|Linux x64 5.4.0-173-generic| |CPUs|Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz (1 x 2499)| |Memory (System)|0.94GB (0.15GB free)| |VM|100%|
Extensions (13) Extension|Author (truncated)|Version ---|---|--- es7-react-js-snippets|dsz|4.4.3 auto-rename-tag|for|0.1.10 discord-vscode|icr|5.8.0 remote-ssh|ms-|0.109.0 remote-ssh-edit|ms-|0.86.0 remote-explorer|ms-|0.4.3 material-icon-theme|PKi|4.34.0 errorlens|use|3.16.0 npm-intellisense|chr|1.4.5 path-intellisense|chr|2.8.5 vscode-eslint|dba|2.4.4 prettier-vscode|esb|10.1.0 indent-rainbow|ode|8.3.1 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 vsaa593cf:30376535 py29gd2263:30784851 c4g48928:30535728 962ge761:30841072 pythongtdpath:30726887 welcomedialog:30812478 pythonidxpt:30768918 pythonnoceb:30776497 asynctok:30898717 dsvsc013:30777762 dsvsc014:30777825 dsvsc015:30821418 pythontestfixt:30866404 pythonregdiag2:30926734 pyreplss1:30879911 pythonmypyd1:30859725 pythoncet0:30859736 h48ei257:30986171 pythontbext0:30879054 accentitlementst:30870582 dsvsc016:30879898 dsvsc017:30880771 dsvsc018:30880772 d6fi2104:30968146 pydisww1:30991133 cppperfnew:30980852 8082a590:30961435 fegfb526:30952798 bg6jg535:30979844 ccp2r3:30958153 pythonait:30973460 7ghi1836:30988844 ```
mjbvz commented 6 months ago

Please try collecting the TS Server log from the crashed instance:

  1. Set "typescript.tsserver.log": "verbose"
  2. Restart VS Code and reproduce the problem
  3. Open the TypeScript section of the output panel
  4. At the very top, find the first line that prints to path to the semantic error log file. It should look something like:

    [Info  - 19:54:59.247] <semantic> Log file: /Users/matb/Library/Application Support/Code - Insiders/logs/20200213T104930/exthost55/vscode.typescript-language-features/tsserver-log-ZT2zau/tsserver.log

    That file contains the typescript logs.

Look through that log file for the first error or stack trace you see. If you can share the log, I can also take a look to see if anything stands out

⚠️Warning: The TypeScript log may include information from your workspace, including file paths and source code. If you have any concerns about posting this publicly on Github, just let me know and we can arrange something else. On our side, we only use these logs to investigate issues like this

CuteNikki commented 6 months ago
  1. Open the TypeScript section of the output panel

After following step 1 and 2, I can't seem to find the TypeScript section in the output panel

CuteNikki commented 6 months ago

It seems I just had to wait a little, the TypeScript option appeared after scrolling through about 50 times and restarting a few times.

Now I don't really see any error or I might just be blind... Can I just send you the file?

Nikhil-101 commented 6 months ago

Same thing happening to me again and again...any solution??

mjbvz commented 6 months ago

@CuteNikki Do you see a dropdown link this on the right side of output?

Image

CuteNikki commented 6 months ago

@CuteNikki Do you see a dropdown link this on the right side of output?

Image

Yeah, as I said, I found it. It just took me a while because it didn't show up. I don't see anything in the log though. Can I send the file to someone to take a look at it?

CuteNikki commented 6 months ago

@mjbvz Just started coding some more and the server immediately crashed with this error: image Now I did check the log right below the error and it ends at 21:20:08 but the error happened at 21:20:09! The next log starts at 21:20:10, completely skipping the error... So I don't really know what to do at this point.

This time it said "SIGKILL" but most of the time it says "write EPIPE" I can wait for that to happen and then check the logs again.

CuteNikki commented 6 months ago

Just as a follow up, while writing that comment, the TS Server crashed 4 more times with the same error, not leaving a log again.

CuteNikki commented 6 months ago

I have noticed that I also get the error "SIGTERM"... So now we got "write EPIPE", "SIGTERM" and "SIGKILL"

liquidg3 commented 5 months ago

I'm seeing the SIGTERM also. I added "typescript.tsserver.log": "verbose", and now I'm seeing what I think @CuteNikki saw where Typescript is not showing in the Output dropdown.

Also, the Command Palette (cmd+shift+p) also doesn't show any typescript related commands (e.g. Restart Typescript Server).

The issue I was originally researching was that my Quick Fixes (blue lightbulb) were gone, I'm assuming this is why.

Here are some other deets:

Version: 1.89.0
Commit: b58957e67ee1e712cebf466b995adf4c5307b2bd
Date: 2024-05-01T02:10:13.496Z (1 day ago)
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0

I'm going to try the preview build and see if it works there when I get a chance.

Thanks!

nvuhung commented 3 months ago

Hi @liquidg3 , did you fix the problem? On my side it also happened. Tried reinstalling vscode and downgrading vscode, typeScript version. It looks like the typescript language service could not be loaded.

image
vs-code-engineering[bot] commented 1 month ago

Hey @mjbvz, this issue might need further attention.

@CuteNikki, you can help us out by closing this issue if the problem no longer exists, or adding more information.

CuteNikki commented 1 month ago

Hey @mjbvz, this issue might need further attention.

@CuteNikki, you can help us out by closing this issue if the problem no longer exists, or adding more information.

I haven't had this issue recently. But I believe it only happened when I was connected via ssh to a remote server which I also haven't done since then. I could be wrong and this also happened locally but I'm unsure about that. It has been a while since I opened this issue.