microsoft / vscode

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

TS Server fatal error: Cannot read property 'getSourceFiles' of undefined #137849

Closed mr-robertamoah closed 2 years ago

mr-robertamoah commented 2 years ago

Issue Type: Bug

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

TypeScript Version: 4.4.3

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 property 'getSourceFiles' of undefined
    at ConfiguredProject.Project.getScriptInfos (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:161488:44)
    at ProjectService.sendProjectTelemetry (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:164294:66)
    at ConfiguredProject.updateGraph (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:162648:37)
    at ProjectService.createLoadAndUpdateConfiguredProject (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:164368:25)
    at ProjectService.assignProjectToOpenedScriptInfo (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:165451:44)
    at c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:165791:97
    at Object.flatMap (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:519:25)
    at ProjectService.applyChangesInOpenFiles (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:165791:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:166949:46)
    at c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:168880:88
    at IOSession.Session.executeWithRequestId (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:168871:28)
    at IOSession.Session.executeCommand (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:168880:33)
    at IOSession.Session.onMessage (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:168906:35)
    at Interface.<anonymous> (c:\Users\Robert Amoah\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:171511:31)
    at Interface.emit (events.js:315:20)
    at Interface._onLine (readline.js:337:10)
    at Interface._normalWrite (readline.js:482:12)
    at Socket.ondata (readline.js:194:10)
    at Socket.emit (events.js:315:20)
    at addChunk (internal/streams/readable.js:309:12)
    at readableAddChunk (internal/streams/readable.js:284:9)
    at Socket.Readable.push (internal/streams/readable.js:223:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)

VS Code version: Code 1.62.1 (f4af3cbf5a99787542e2a30fe1fd37cd644cc31f, 2021-11-05T09:30:21.539Z) OS version: Windows_NT ia32 10.0.19041 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM)2 Duo CPU T6670 @ 2.20GHz (2 x 2195)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: disabled_off
oop_rasterization: unavailable_off
opengl: enabled_on
rasterization: unavailable_off
skia_renderer: enabled_on
video_decode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: unavailable_off| |Load (avg)|undefined| |Memory (System)|3.93GB (0.85GB free)| |Process Argv|--crash-reporter-id 3eb01f92-c6ec-4485-8411-6c84b03463b7| |Screen Reader|no| |VM|0%|
Extensions (31) Extension|Author (truncated)|Version ---|---|--- Bookmarks|ale|13.2.2 laravel-extra-intellisense|ami|0.6.1 vs-phpcompanion|bla|2.1.0 vscode-intelephense-client|bme|1.7.1 vscode-tailwindcss|bra|0.7.2 better-phpunit|cal|1.5.3 npm-intellisense|chr|1.4.0 laravel-blade|cjh|1.1.2 bracket-pair-colorizer|Coe|1.0.61 php-class-generator-composer-psr-4|dam|1.0.1 githistory|don|0.6.19 es7-react-js-snippets|dsz|3.1.1 gitlens|eam|11.6.1 prettier-vscode|esb|9.0.0 php-debug|fel|1.22.0 auto-close-tag|for|0.5.13 auto-rename-tag|for|0.1.9 composer|ika|0.7.1 python|ms-|2021.11.1422169775 vscode-pylance|ms-|2021.11.1 jupyter|ms-|2021.10.1001414422 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.3 vetur|oct|0.35.0 laravel-blade|one|1.28.0 copy-copy-paste|roc|0.0.7 vue-vscode-extensionpack|sdr|0.2.0 vue-vscode-snippets|sdr|2.2.1 open-in-browser|tec|2.0.0 JavaScriptSnippets|xab|1.8.0 vue-language-features|znc|0.7.6 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30384385 pythondataviewer:30285071 vscod805cf:30301675 pythonvspyt200:30340761 binariesv615:30325510 vsccppwtct:30382698 bridge0708:30335490 dockerwalkthru:30377721 bridge0723:30353136 pythonrunftest32:30373476 pythonf5test824:30373475 javagetstartedt:30391933 pythonvspyt187:30373474 vsqsis200:30386379 vsaa593cf:30376535 vssld246:30386377 ```
mjbvz commented 2 years ago

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