Open MerryCello opened 1 month ago
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.94.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
Hi, I just updated to the version mentioned and I am still facing this issue. To get Typescript to work again, I am forced to close VS Code and reopen it. Restarting the TS server does nothing.
Version: 1.94.2 (Universal) Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427 Date: 2024-10-09T16:08:44.566Z Electron: 30.5.1 ElectronBuildId: 10262041 Chromium: 124.0.6367.243 Node.js: 20.16.0 V8: 12.4.254.20-electron.0 OS: Darwin arm64 23.6.0
Please try collecting the TS Server log from the crashed instance:
"typescript.tsserver.log": "verbose"
TypeScript
section of the output panelAt 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
Here's the error logs I found. I hope this helps
2024-10-16 08:59:54.143 [info] <semantic> Log file: /path/to/Application Support/Code/logs/20241015T155211/window1/exthost/vscode.typescript-language-features/tsserver-log-BbVVPO/tsserver.log
2024-10-16 08:59:54.143 [info] <semantic> Forking...
2024-10-16 08:59:54.143 [info] <semantic> Starting...
2024-10-16 09:04:50.790 [info] Killing TS Server
2024-10-16 09:04:50.899 [error] TSServer exited. Code: null. Signal: SIGTERM
Err 7256 [08:59:54.035] Exception on executing command {
"seq": 108,
"type": "request",
"command": "updateOpen",
"arguments": {
"changedFiles": [],
"closedFiles": [
"/path/to/project/root/__tests__/__mocks__/package.js"
],
"openFiles": [
{
"file": "/path/to/project/root/packages/package-name/__tests__/utils.ts",
"fileContent": "FILE CONTENT OMITTED",
"projectRootPath": "/path/to/project/root",
"scriptKindName": "TS"
}
]
}
}:
Debug Failure.
Error: Debug Failure.
at stopWatchFailedLookupLocationOfResolution (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:130844:11)
at resolveNamesWithLocalCache (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:130440:13)
at Object.resolveModuleNameLiterals (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:130521:12)
at InferredProject2.resolveModuleNameLiterals (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:183583:33)
at resolveModuleNamesWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:125213:20)
at resolveNamesReusingOldState (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:125355:14)
at resolveModuleNamesReusingOldState (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:125311:12)
at processImportedModules (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126826:118)
at findSourceFileWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126601:7)
at findSourceFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126452:20)
at processImportedModules (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126852:11)
at findSourceFileWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126601:7)
at findSourceFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126452:20)
at processImportedModules (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126852:11)
at findSourceFileWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126601:7)
at findSourceFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126452:20)
at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126401:22
at getSourceFileFromReferenceWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126372:26)
at processSourceFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126399:5)
at processRootFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:126191:5)
at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:124902:41
at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2282:22)
at createProgram (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:124902:5)
at synchronizeHostDataWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:149871:15)
at synchronizeHostData (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:149767:7)
at Object.getProgram (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:149948:5)
at InferredProject2.updateGraphWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:184301:41)
at InferredProject2.updateGraph (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:184137:32)
at _ProjectService.assignOrphanScriptInfoToInferredProject (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:186805:13)
at _ProjectService.assignProjectToOpenedScriptInfo (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:188397:12)
at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:188786:25
at Array.forEach (<anonymous>)
at _ProjectService.applyChangesInOpenFiles (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:188784:56)
at updateOpen (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:189983:29)
at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:192651:15
at IpcIOSession.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:192640:14)
at IpcIOSession.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:192649:29)
at IpcIOSession.onMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:192697:68)
at process.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:525:14)
at process.emit (node:events:519:28)
at emit (node:internal/child_process:951:14)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
Err 5120 [09:04:50.787] Exception on executing command {
"seq": 8,
"type": "request",
"command": "updateOpen",
"arguments": {
"changedFiles": [],
"closedFiles": [],
"openFiles": [
{
"file": "/path/to/project/root/packages/package-name/src/components/component/index.tsx",
"fileContent": "FILE CONTENT OMITTED",
"projectRootPath": "/path/to/project/root",
"scriptKindName": "TSX"
}
]
}
}:
Debug Failure.
Error: Debug Failure.
at stopWatchFailedLookupLocationOfResolution (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:130844:11)
at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:130890:25
at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:43862:16
at Map.forEach (<anonymous>)
at Object.forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:43860:25)
at removeResolutionsOfFileFromCache (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:130889:19)
at Object.removeResolutionsOfFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:130908:5)
at _AutoImportProviderProject.detachScriptInfoFromProject (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:184439:30)
at _AutoImportProviderProject.onReleaseOldSourceFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:184122:12)
at Object.onReleaseOldSourceFile (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:149916:66)
at createProgram (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:124974:14)
at synchronizeHostDataWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:149871:15)
at synchronizeHostData (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:149767:7)
at Object.getProgram (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:149948:5)
at _AutoImportProviderProject.updateGraphWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:184301:41)
at _AutoImportProviderProject.updateGraph (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:184137:32)
at _AutoImportProviderProject.updateGraph (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:185276:37)
at updateProjectIfDirty (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:185914:36)
at Array.forEach (<anonymous>)
at _ProjectService.assignProjectToOpenedScriptInfo (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:188386:29)
at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:188786:25
at Array.forEach (<anonymous>)
at _ProjectService.applyChangesInOpenFiles (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:188784:56)
at updateOpen (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:189983:29)
at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:192651:15
at IpcIOSession.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:192640:14)
at IpcIOSession.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:192649:29)
at IpcIOSession.onMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:192697:68)
at process.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:525:14)
at process.emit (node:events:519:28)
at emit (node:internal/child_process:951:14)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
@MerryCello can you share a full TS Server log (not just the error stack)? Are you able to reproduce this consistently with specific steps, or does it seem to stop working randomly?
Sure, I can provide that. I can't pinpoint what triggers it. It just happens randomly (every 30-1hr of usage).
On Thu, Oct 17, 2024, 15:01 Andrew Branch @.***> wrote:
@MerryCello https://github.com/MerryCello can you share a full TS Server log (not just the error stack)? Are you able to reproduce this consistently with specific steps, or does it seem to stop working randomly?
— Reply to this email directly, view it on GitHub https://github.com/microsoft/TypeScript/issues/60243#issuecomment-2420416250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIYCXDV2EIDHTCPXGBE7QLTZ4AJQVAVCNFSM6AAAAABQB32AM6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRQGQYTMMRVGA . You are receiving this because you were mentioned.Message ID: @.***>
I was able to capture a full log (v1.94.2). This was with a fairly big open-source repo. Although it happened several times, I'm not able to reproduce it. If I find a way, I will post it here.
I've also been struggling with these errors for the past couple weeks. I'm also not sure what triggers it but it typically happens to me about every 10 - 30 minutes.
This error is making vscode pretty un-usable now.
with the current vscode version: 1.95.3, I grabbed the resolution
in stopWatchFailedLookupLocationOfResolution
and it doesn't have resolution.files
which triggers the throw.
maybe stopWatchFailedLookupLocationOfResolution
ran twice?
in any case, I did if (!resolution.files) return
and everything works fine. Why do we need Debug.checkDefined
here? the next few lines would set it to undefined
anyway.
{
"resolvedModule": {
"resolvedFileName": "/app/node_modules/moment/ts3.1-typings/moment.d.ts",
"extension": ".d.ts",
"isExternalLibraryImport": true,
"packageId": {
"name": "moment",
"subModuleName": "ts3.1-typings/moment.d.ts",
"version": "2.29.4"
},
"resolvedUsingTsExtension": false
},
"failedLookupLocations": [
"/app/node_modules/moment-timezone/node_modules/moment/package.json",
"/app/node_modules/moment-timezone/node_modules/moment.ts",
"/app/node_modules/moment-timezone/node_modules/moment.tsx",
"/app/node_modules/moment-timezone/node_modules/moment.d.ts",
"/app/node_modules/moment-timezone/node_modules/moment/index.ts",
"/app/node_modules/moment-timezone/node_modules/moment/index.tsx",
"/app/node_modules/moment-timezone/node_modules/moment/index.d.ts",
"/app/node_modules/moment-timezone/node_modules/@types/moment/package.json",
"/app/node_modules/moment-timezone/node_modules/@types/moment.d.ts",
"/app/node_modules/moment-timezone/node_modules/@types/moment/index.d.ts",
"/app/node_modules/moment.ts",
"/app/node_modules/moment.tsx",
"/app/node_modules/moment.d.ts"
],
"affectingLocations": [
"/app/node_modules/moment-timezone/package.json",
"/app/node_modules/moment/package.json",
"/app/node_modules/moment-timezone/package.json"
]
}
It would be good to know if https://github.com/microsoft/TypeScript/pull/60039 resolves this issue. Could any of you test it out using a build from that branch?
It would be good to know if #60039 resolves this issue. Could any of you test it out using a build from that branch?
I can try - but ... Is there an easy way to install that branch to be used with vscode?
@jerry2013 a fresh PR build is available here: https://github.com/microsoft/TypeScript/pull/60039#issuecomment-2515090058
Type: Bug
❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️
TypeScript Version: 5.6.2
Steps to reproduce crash I didn't do anything difference as last time I opened VS Code and now it's crashing
After regular usage, the TS server will just freeze up (infinite loading & no editing helpers).
According to issue Initellisense infinite loading microsoft/vscode#52691, I should be able to fix this by increasing TS server's memory, but I shouldn't have to do that...
TS Server Log
❗️ Server logging disabled. To help us fix crashes like this, please enable logging by setting:
After enabling this setting, future crash reports will include the server log.
VS Code version: Code 1.94.0 (Universal) (d78a74bcdfad14d5d3b1b782f87255d802b57511, 2024-10-02T13:08:12.626Z) OS version: Darwin arm64 23.6.0 Modes:
System Info
|Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 2400)| |GPU Status|2d_canvas: enabledcanvas_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
webnn: disabled_off| |Load (avg)|11, 13, 12| |Memory (System)|32.00GB (0.24GB free)| |Process Argv|--crash-reporter-id cb0287d2-a42d-4774-a99d-41e7456b17dd| |Screen Reader|no| |VM|0%|
Extensions (14)
Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 vscode-sql-formatter|adp|1.4.4 githistory|don|0.6.20 gitlens|eam|15.6.0 prettier-vscode|esb|11.0.0 copilot|Git|1.238.0 copilot-chat|Git|0.21.1 inline-parameters|lia|0.2.1 live-server|ms-|0.4.15 vsliveshare|ms-|1.0.5941 sonarlint-vscode|Son|4.11.1 even-better-toml|tam|0.19.2 vscode-gradle|vsc|3.16.4 pretty-ts-errors|Yoa|0.6.0A/B Experiments
``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 da93g388:31013173 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 newcmakeconfigv2:31071590 impr_priority:31102340 nativerepl2:31139839 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-t:31132770 wkspc-ranged-t:31151552 cf971741:31144450 autoexpandse:31146404 iacca1:31156133 notype1:31157159 5fd0e150:31155592 icondisabled:31158250 ```