microsoft / vscode

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

TS Server fatal error: Cannot read properties of undefined (reading 'sourceFile') #151263

Closed BleedingDev closed 2 years ago

BleedingDev commented 2 years ago

Issue Type: Bug

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

TypeScript Version: 4.7.2

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 'sourceFile')
    at isDocumentRegistryEntry (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:135302:24)
    at getDocumentRegistryEntry (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:135362:25)
    at Object.releaseDocumentWithKey (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:135464:25)
    at d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:164536:45
    at Object.forEach (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:183:30)
    at Proxy.dispose (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:164535:20)
    at InferredProject.Project.close (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:169301:38)
    at InferredProject.close (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:170296:40)
    at ProjectService.removeProject (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:171775:25)
    at ProjectService.cleanupAfterOpeningFile (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:173595:30)
    at ProjectService.applyChangesInOpenFiles (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:173793:26)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:174920:46)
    at d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177109:88
    at IpcIOSession.Session.executeWithRequestId (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177100:28)
    at IpcIOSession.Session.executeCommand (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177109:33)
    at IpcIOSession.Session.onMessage (d:\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:177135:35)
    at process.<anonymous> (d:\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 (acb156d6fb0dc451f427748d5f68774f17cc96fd, 2022-05-31T05:17:04.479Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 9 5980HS with Radeon Graphics (16 x 3294)| |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)|31.41GB (16.11GB free)| |Process Argv|--crash-reporter-id b98ecf15-9c4a-4529-a9f2-a18f1fababb0| |Screen Reader|no| |VM|0%|
Extensions (43) Extension|Author (truncated)|Version ---|---|--- project-manager|ale|12.6.0 vscode-zipfs|arc|3.0.0 svelte-intellisense|ard|0.7.1 vscode-tailwindcss|bra|0.8.6 npm-intellisense|chr|1.4.1 path-intellisense|chr|2.8.0 coddx-alpha|cod|0.3.1 vscode-svgviewer|css|2.0.0 meld-diff|dan|1.3.3 vscode-eslint|dba|2.2.2 FreeMarker|dco|0.0.9 groovy-guru|Don|0.5.0 gitlens|eam|12.0.7 EditorConfig|Edi|0.16.4 prettier-vscode|esb|9.5.0 vscode-svelte-snippets|fiv|0.5.0 vscode-yarn|gam|2.1.0 copilot|Git|1.25.6056 json2ts|Gre|0.0.6 RelativePath|jak|1.5.0 vscode-styled-components|jpo|1.7.0 vscode-commitizen|Kni|1.1.0 graphql-for-vscode|kum|1.15.3 ts-extension-pack|loi|0.3.0 code-groovy|mar|0.1.2 vscode-docker|ms-|1.22.0 remote-containers|ms-|0.238.0 powershell-preview|ms-|2022.5.5 angular-console|nrw|17.18.0 indent-rainbow|ode|8.3.1 advanced-new-file|pat|1.2.2 svelte-autoimport|piv|1.0.4 tsimporter|pmn|2.0.1 prisma|Pri|3.14.0 typescript-hero|rbb|3.0.0 markdown-preview-enhanced|shd|0.6.3 vscode-fileutils|sle|3.5.0 sonarlint-vscode|Son|3.5.4 move-ts|str|1.12.0 gitblame|wad|8.2.1 vscode-wakatime|Wak|18.1.5 vscode-import-cost|wix|3.3.0 vscode-as-git-mergetool|zaw|0.14.0 (1 theme extensions excluded)
vscodenpa commented 2 years ago

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

vscodenpa commented 2 years ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!