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

TS Language service keeps crashing #213588

Closed
mattjs opened this issue May 27, 2024 · 6 comments
Closed

TS Language service keeps crashing #213588

mattjs opened this issue May 27, 2024 · 6 comments
Assignees
Labels
info-needed Issue requires more information from poster upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@mattjs
Copy link

mattjs commented May 27, 2024

Type: Bug

The JS/TS language service immediately crashed 5 times. The service will not be restarted.

VS Code version: Code 1.89.1 (Universal) (dc96b83, 2024-05-07T05:14:24.611Z)
OS version: Darwin arm64 23.5.0
Modes:

System Info
Item Value
CPUs Apple M3 Max (14 x 24)
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
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 2, 2, 3
Memory (System) 36.00GB (5.01GB free)
Process Argv --crash-reporter-id 881fdd98-1165-4b95-bf84-4391c3a4a7e4
Screen Reader no
VM 0%
Extensions (7)
Extension Author (truncated) Version
vscode-tailwindcss bra 0.10.5
vscode-eslint dba 2.4.4
prettier-vscode esb 10.4.0
copilot Git 1.195.0
copilot-chat Git 0.15.2
elixir-ls Jak 0.21.3
vs-code-prettier-eslint rve 6.0.0
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaac:30438847
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
chatpanelt:31048053
dsvsc021:30996838
9c06g630:31013171
pythoncenvptcf:31049071
a69g1124:31058053
pythonprt:31056678
dwnewjupyter:31046869
26j00206:31048877

@nic-vo
Copy link

nic-vo commented May 28, 2024

I have the same issue. Wasn't related to any extension; error is caused by VSCode's internal TypeScript server, I think.

Potential workaround: lock TypeScript to anything up to 5.4.3, then restart VSCode.

This problem has popped up in a few of my repos when opened in VSCode. Common features for all those problematic repos:

  • Yarn PnP w/ @yarnpkg/sdks vscode
  • Next.js
  • TailwindCSS
  • React
  • TypeScript

As mentioned above, I found that locking TypeScript to 5.4.3, re-running @yarnpkg/sdks vscode, and restarting VSCode fixed the issue for me in all problematic repos. Luckily, none of the improvements / fixes from 5.4.4 & 5.4.5 impact my use case, but YMMV. Technically, I didn't check if the error persisted without re-running @yarnpkg/sdks vscode, so this doesn't distinguish if the error comes from TypeScript alone or TypeScript + yarn's PnP SDK

@mjbvz
Copy link
Collaborator

mjbvz commented May 28, 2024

@mattjs Are you using yarn?

@mjbvz mjbvz added the info-needed Issue requires more information from poster label May 28, 2024
@mattjs
Copy link
Author

mattjs commented May 28, 2024

Yep, I'm using [email protected]. Everything was working with the setup for some weeks and then stopped.

@mattjs
Copy link
Author

mattjs commented May 28, 2024

Heres the error log and the detailed one

2024-05-27 10:10:24.122 [info] Starting TS Server
2024-05-27 10:10:24.122 [info] Using tsserver from: /Users/mattjs/personal/metapod/.yarn/sdks/typescript/lib/tsserver.js
2024-05-27 10:10:24.122 [info] <syntax> Forking...
2024-05-27 10:10:24.122 [info] <syntax> Starting...
2024-05-27 10:10:24.122 [info] <semantic> Forking...
2024-05-27 10:10:24.122 [info] <semantic> Starting...
2024-05-27 10:10:24.302 [error] TSServer exited. Code: 1. Signal: null
Info 0    [10:12:41.982] Starting TS Server
Info 1    [10:12:41.982] Version: 5.4.5
Info 2    [10:12:41.982] Arguments: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/mattjs/personal/metapod/.yarn/sdks/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/rt/lgkklv896c3bkzwx9zb0kwzm0000gn/T/vscode-typescript501/e1329c237ffbcb4c796c/tscancellation-057189836a3a0f7ca237.tmp* --logVerbosity verbose --logFile /Users/mattjs/Library/Application Support/Code/logs/20240526T193704/window1/exthost/vscode.typescript-language-features/tsserver-log-OKrjsj/tsserver.log --locale en --noGetErrOnBackgroundUpdate --canUseWatchEvents --validateDefaultNpmLocation --useNodeIpc
Info 3    [10:12:41.982] Platform: darwin NodeVersion: v18.18.2 CaseSensitive: true
Info 4    [10:12:41.982] ServerMode: undefined hasUnknownServerMode: undefined
Info 5    [10:12:41.984] Binding...
Info 6    [10:12:41.985] FileWatcher:: Added:: WatchInfo: /Users/mattjs/personal/metapod/.pnp.cjs 250 undefined WatchType: Config file

@nic-vo
Copy link

nic-vo commented May 28, 2024

Ah yes, FWIW I was using Yarn 4.1.x - 4.2.2 for all the problematic repos

@mjbvz
Copy link
Collaborator

mjbvz commented May 28, 2024

Thanks. This is caused by yarn. Relevant upstream issue: yarnpkg/berry#6270

@mjbvz mjbvz closed this as completed May 28, 2024
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label May 28, 2024
@microsoft microsoft locked and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants