microsoft / vscode

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

The TypeScript language service died unexpectedly 5 times in the last 5 Minutes #123576

Closed ukalwa closed 3 years ago

ukalwa commented 3 years ago

Issue Type: Bug

My project uses TypeScript + Yarn 2 PlugNPlay module resolution.

VS Code version: Code 1.56.0 (cfa2e218100323074ac1948c885448fdf4de2a7f, 2021-05-04T22:06:21.189Z) OS version: Darwin x64 19.6.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2200)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|3, 3, 2| |Memory (System)|16.00GB (0.12GB free)| |Process Argv|--crash-reporter-id cf6baafa-f3a9-4ff6-b9df-13fcaaa611fb| |Screen Reader|no| |VM|0%|
Extensions (38) Extension|Author (truncated)|Version ---|---|--- sort-imports|ama|6.2.6 vscode-zipfs|arc|2.3.0 svelte-intellisense|ard|0.7.1 markdown-preview-github-styles|bie|0.2.0 better-toml|bun|0.3.2 npm-intellisense|chr|1.3.1 bracket-pair-colorizer-2|Coe|0.2.0 vscode-markdownlint|Dav|0.40.4 vscode-eslint|dba|2.1.20 gitlens|eam|11.4.1 prettier-vscode|esb|6.4.0 vscode-diff|fab|1.4.1 vscode-firefox-debug|fir|2.9.4 gc-excelviewer|Gra|3.0.41 vscode-peacock|joh|3.9.1 code-coverage|mar|1.2.3 rainbow-csv|mec|1.8.1 dotenv|mik|1.0.1 vscode-docker|ms-|1.12.1 python|ms-|2021.5.829140558 vscode-pylance|ms-|2021.5.1 jupyter|ms-|2021.6.811652604 remote-containers|ms-|0.177.0 remote-ssh|ms-|0.65.4 remote-ssh-edit|ms-|0.65.4 remote-wsl|ms-|0.56.2 vscode-remote-extensionpack|ms-|0.20.0 vsliveshare|ms-|1.0.4131 debugger-for-chrome|msj|4.12.12 debugger-for-edge|msj|1.0.15 indent-rainbow|ode|7.5.0 docthis|oou|0.8.2 material-icon-theme|PKi|4.6.0 quicktype|qui|12.0.46 partial-diff|ryu|1.4.3 vscode-nginx-format|tec|0.0.6 gitmoji-vscode|Vtr|1.0.6 vscode-nginx|wil|0.7.2 (3 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 pythonvspyt639:30300192 pythontb:30283811 vspre833cf:30267465 pythonptprofiler:30281270 vshan820:30294714 pythondataviewer:30285071 vscus158cf:30286554 vscgsv2ct:30294353 ```
vscodebot[bot] commented 3 years ago

(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

mjbvz commented 3 years 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

mjbvz commented 3 years ago

/needsMoreInfo

ukalwa commented 3 years ago

Hello @mjbvz , I followed the instructions you specified above and I can now see the log file path. But when I try to open it, I see that the file doesn't exist. I can see multiple log files get created according to the typescript output but none of them were created.

/Users/test/Library/Application Support/Code/logs/20210512T000804/exthost1/vscode.typescript-language-features/tsserver-log-MNhkPK/tsserver.log
mjbvz commented 3 years ago

With a TypeScript file open, try running the TypeScript: Open TS Server log command. This should open a file with the logs in it (note that this would be the logs from the current session and not the crashed instance)

Does that command work?