microsoft / vscode

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

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

Closed omidnadeem closed 3 years ago

omidnadeem commented 3 years ago

Issue Type: Bug

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

TypeScript Version: 4.5.0-dev.20210816

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 (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:161646:44)
    at ProjectService.sendProjectTelemetry (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:164452:66)
    at ConfiguredProject.updateGraph (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:162806:37)
    at ProjectService.createLoadAndUpdateConfiguredProject (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:164526:25)
    at ProjectService.assignProjectToOpenedScriptInfo (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:165609:44)
    at /Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:165949:97
    at Object.flatMap (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:519:25)
    at ProjectService.applyChangesInOpenFiles (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:165949:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:167107:46)
    at /Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:169038:88
    at IOSession.Session.executeWithRequestId (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:169029:28)
    at IOSession.Session.executeCommand (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:169038:33)
    at IOSession.Session.onMessage (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:169064:35)
    at Interface.<anonymous> (/Users/Omid/.vscode/extensions/ms-vscode.vscode-typescript-next-4.5.20210816/node_modules/typescript/lib/tsserver.js:171669: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.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:28:32.912Z) OS version: Darwin x64 19.6.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 x 3200)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|4, 3, 4| |Memory (System)|32.00GB (0.30GB free)| |Process Argv|--crash-reporter-id 08ed2762-22b1-4939-836e-2b11205de484| |Screen Reader|no| |VM|0%|
Extensions (66) Extension|Author (truncated)|Version ---|---|--- html-snippets|abu|0.2.1 laravel-extra-intellisense|ami|0.6.1 laravel-blade-spacer|aus|2.1.3 vscode-intelephense-client|bme|1.7.1 typopo-vscode|bra|1.2.0 npm-intellisense|chr|1.4.0 laravel-blade|cjh|1.1.2 bracket-pair-colorizer|Coe|1.0.61 laravel-easy-blade-snippets|dac|1.2.1 jquerysnippets|don|0.0.1 gitlens|eam|11.6.0 vscode-html-css|ecm|1.10.2 EditorConfig|Edi|0.16.4 vscode-npm-script|eg2|0.3.22 prettier-vscode|esb|8.1.0 vue-format|feb|0.1.8 php-debug|fel|1.17.0 php-intellisense|fel|2.3.14 php-pack|fel|1.0.2 vscode-firefox-debug|fir|2.9.4 auto-close-tag|for|0.5.12 vue-pack|hol|1.0.0 vue-snippets|hol|1.0.4 beautify|Hoo|1.5.0 jquery-snippets|Hri|1.0.0 rest-client|hum|0.24.5 php-doc-comment-vscode-plugin|imo|1.6.0 vue|jcb|0.1.5 sftp|lix|1.12.9 quickstart|lol|0.1.0 vscode-php-refactoring|mar|1.2.1 vscode-docker|ms-|1.16.0 python|ms-|2021.8.1105858891 vscode-pylance|ms-|2021.8.1 jupyter|ms-|2021.6.999662501 remote-containers|ms-|0.183.0 cpptools|ms-|1.5.1 vscode-typescript-next|ms-|4.5.20210816 debugger-for-chrome|msj|4.12.12 debugger-for-edge|msj|1.0.15 php-docblocker|nei|2.2.0 vscode-vue3-snippets|Nic|0.0.6 vetur|oct|0.34.1 laravel-blade|one|1.25.0 vscode-html-scss|P-d|0.0.42 vue-beautify|pea|2.0.4 material-icon-theme|PKi|4.9.0 tsimporter|pmn|2.0.1 java|red|0.80.0 LiveServer|rit|5.6.1 vue-vscode-snippets|sdr|2.2.1 code-spell-checker|str|1.10.2 tabnine-vscode|Tab|3.4.22 bootstrap4-vscode|the|6.1.0 php-refactor|tin|0.0.7 vscodeintellicode|Vis|1.2.14 vscode-java-debug|vsc|0.35.0 vscode-java-dependency|vsc|0.18.6 vscode-java-pack|vsc|0.18.4 vscode-java-test|vsc|0.30.1 vscode-maven|vsc|0.32.2 vscode-icons|vsc|11.6.0 vue|Wsc|1.0.26 JavaScriptSnippets|xab|1.8.0 blade-runner|yuk|1.0.0 vue-language-features|znc|0.7.6
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256860 vstes627:30244334 pythonvspyt639:30300192 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 pythonvsuse255:30340121 vscod805:30301674 pythonvspyt200:30340761 vscextlang:30333561 binariesv615:30325510 vsccppwt:30329788 pythonvssor306:30344512 bridge0708:30335490 pygetstartedt2:30351387 vstre464:30350172 bridge0723:30353136 javagetstartedc:30351792 ```
mjbvz commented 3 years ago

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