microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
100.1k stars 12.37k forks source link

TS Server fatal error: Cannot read properties of undefined (reading 'startRecordingFilesWithChangedResolutions') #49322

Closed Kemper-Diao closed 1 month ago

Kemper-Diao commented 2 years ago

Issue Type: Bug

❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️

TypeScript Version: 4.7.1-rc

Steps to reproduce crash 1. 2. 3.

TS Server Log ❗️Server logging disabled. To help us fix crashes like this, please enable logging by setting:

"typescript.tsserver.log": "verbose"

After enabling this setting, future crash reports will include the server log.

TS Server Error Stack Server: semantic

TypeError: Cannot read properties of undefined (reading 'startRecordingFilesWithChangedResolutions')
    at InferredProject.Project.updateGraph (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:169516:38)
    at updateProjectIfDirty (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:171120:45)
    at Array.forEach (<anonymous>)
    at ProjectService.assignProjectToOpenedScriptInfo (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:173499:41)
    at d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:173785:97
    at Object.flatMap (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:508:25)
    at ProjectService.applyChangesInOpenFiles (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:173785:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:174920:46)
    at d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177109:88
    at IpcIOSession.Session.executeWithRequestId (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177100:28)
    at IpcIOSession.Session.executeCommand (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177109:33)
    at IpcIOSession.Session.onMessage (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177135:35)
    at process.<anonymous> (d:\Software\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:179770:31)
    at process.emit (node:events:390:28)
    at emit (node:internal/child_process:917:12)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)

VS Code version: Code - Insiders 1.68.0-insider (17c75e11805103026b943c8dc4d50a35f245f76f, 2022-05-20T05:16:17.334Z) OS version: Windows_NT x64 10.0.19041 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)| |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
oop_rasterization: enabled
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| |Load (avg)|undefined| |Memory (System)|15.87GB (8.68GB free)| |Process Argv|--crash-reporter-id 39198b8a-563f-40ca-8279-1a658986e704| |Screen Reader|no| |VM|0%|
Extensions (36) Extension|Author (truncated)|Version ---|---|--- html-snippets|abu|0.2.1 project-manager|ale|12.6.0 npm-intellisense|chr|1.4.1 path-intellisense|chr|2.8.0 vscode-eslint|dba|2.2.2 githistory|don|0.6.19 jquerysnippets|don|0.0.1 gitlens|eam|12.0.7 vscode-html-css|ecm|1.12.2 prettier-vscode|esb|9.5.0 vscode-firefox-debug|fir|2.9.6 auto-close-tag|for|0.5.14 auto-rename-tag|for|0.1.10 githd|hui|2.2.4 svg|joc|1.4.18 dotenv|mik|1.0.1 vue-volar-extention-pack|Mis|1.1.1 vscode-language-pack-zh-hans|MS-|1.68.1 vscode-typescript-tslint-plugin|ms-|1.3.4 debugger-for-chrome|msj|4.13.0 tslint-vue|pro|1.5.6 vue-vscode-snippets|sdr|3.1.1 markdown-preview-enhanced|shd|0.6.3 vscode-scss-formatter|sib|2.4.2 autoimport|ste|1.5.4 sass-indented|syl|1.8.20 language-stylus|sys|1.15.0 open-in-browser|tec|2.0.0 stylus-supremacy|thi|2.16.0 vscode-icons|vsc|11.12.0 volar|Vue|0.35.0 vscode-typescript-vue-plugin|Vue|0.35.0 vscode-import-cost|wix|3.3.0 vue|Wsc|1.0.26 JavaScriptSnippets|xab|1.8.0 tslint-snippets|zuo|1.1.0 (1 theme extensions excluded)
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256197 vslsvsres303:30308271 pythonvspyl392:30422396 pythontb:30258533 pythonptprofiler:30281269 vsdfh931:30280409 vshan820:30294714 pythondataviewer:30285072 vscod805:30301674 pythonvspyt200:30323110 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30404738 wslgetstarted:30449409 pythonvsnew555:30438690 vscscmwlcmt:30465136 cppdebug:30492333 pylanb8912cf:30496797 vsclangdf:30492506 ```
sheetalkamat commented 2 years ago

Please share the complete tsserver log. The log is needed to investigate this since its state dependent. If you can share repro code and steps that would be good too. Thanks

thantos commented 1 year ago

I was also seeing this when hitting F2 to rename an interface. Restarting the ts server resolved the error for now, will grab the logs if it happens again.

image