microsoft / vscode

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

Typescript extension restarting #169135

Closed deltaepsilon closed 1 year ago

deltaepsilon commented 1 year ago

Type: Bug

No idea. Typescript is restarting like crazy. I've tried rebooting. It just keeps reinitializing.

VS Code version: Code 1.74.0 (5235c6bb189b60b01b1f49062f4ffa42384f8c91, 2022-12-05T16:38:16.075Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: No Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2 Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz (16 x 3504)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off| |Load (avg)|undefined| |Memory (System)|63.65GB (40.79GB free)| |Process Argv|--crash-reporter-id ce3e5bed-8e16-43c8-bd4f-949433f3702f| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu| |OS|Linux x64 5.10.16.3-microsoft-standard-WSL2| |CPUs|11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz (16 x 3504)| |Memory (System)|31.19GB (26.99GB free)| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu| |OS|Linux x64 5.10.16.3-microsoft-standard-WSL2| |CPUs|11th Gen Intel(R) Core(TM) i9-11900K @ 3.50GHz (16 x 3504)| |Memory (System)|31.19GB (26.99GB free)| |VM|0%|
Extensions (18) Extension|Author (truncated)|Version ---|---|--- color-info|bie|0.7.0 remote-containers|ms-|0.266.1 remote-ssh|ms-|0.94.0 remote-ssh-edit|ms-|0.84.0 remote-wsl|ms-|0.72.0 vscode-remote-extensionpack|ms-|0.23.0 debugger-for-chrome|msj|4.13.0 material-icon-theme|PKi|4.22.0 vscode-mdx|uni|1.0.3 vscode-icons|vsc|12.0.1 sort-imports|ama|6.3.1 vscode-eslint|dba|2.2.6 gitlens|eam|13.1.1 prettier-vscode|esb|9.10.3 copilot|Git|1.63.7601 vscode-print|pdc|0.10.7 code-spell-checker|str|2.12.0 vsfire|tob|1.4.1 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 azure-dev_surveyone:30548225 pyindex848:30577860 nodejswelcome1:30587005 2e4cg342:30602488 gswce1:30612156 3d0df643:30613357 dbltrim-noruby:30604474 f6dab269:30613381 fim-prod:30623723 ```
mjbvz commented 1 year ago

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

jansedlon commented 1 year ago

It does. And for me, it's not restarting but it just keeps crashing after each keystroke. When I restart the TS Server, it picks up, then I save something and it stops working again. (Both stable and insiders version.) The only significant thing I did today was that I upgraded from MacOS Ventura 13.0 to 13.1

mjbvz commented 1 year 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

andreafdaf commented 1 year ago

I'm having the same issue as OP, both on the latest stable and the latest insider build (working from macOS over linux via SSH).

I've noticed that (in my case at least) using a TS version up to 4.6.x worked, when using >=4.7.x it broke. Anyway that only happened in some specific files where type complexity was very high and recursive. In the scenarios where it crashed it should've shown an error using the versions that worked. Removing the errored line prevented TS server from crashing.

Hope this is helpful, unfortunately I cannot disclose the original code nor reproduce the issue on a simpler gist.

mjbvz commented 1 year ago

Closing as we need info from the original poster to investigate

@andreafdaf If you are still seeing this with TypeScript 4.9, please open an new GitHub issue with one of the files/projects that causes the crash