microsoft / vscode

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

TS Server fatal error: Debug Failure. False expression. #174472

Closed elvisferns closed 1 year ago

elvisferns commented 1 year ago

Type: Bug

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

TypeScript Version: 4.9.5

Steps to reproduce crash

1. 2. 3.

Global TypeScript Server Plugins

❗️ Please test with extensions disabled. Extensions are the root cause of most TypeScript server crashes

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

Error: Debug Failure. False expression.
    at _loop_3 (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:176518:34)
    at ProjectService.assignOrphanScriptInfoToInferredProject (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:176526:25)
    at ProjectService.assignProjectToOpenedScriptInfo (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:178195:26)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:178469:97
    at Object.flatMap (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:524:25)
    at ProjectService.applyChangesInOpenFiles (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:178469:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:179841:46)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:182034:96
    at Session.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:182025:28)
    at Session.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:182034:41)
    at Session.onMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:182062:35)
    at process.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:186218:31)
    at process.emit (node:events:526:28)
    at emit (node:internal/child_process:938:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:84:21)

VS Code version: Code 1.75.0 (Universal) (e2816fe719a4026ffa1ee0189dc89bdfdbafb164, 2023-02-01T15:24:42.903Z) OS version: Darwin x64 22.2.0 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
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
webgpu: disabled_off| |Load (avg)|3, 5, 5| |Memory (System)|16.00GB (1.40GB free)| |Process Argv|--crash-reporter-id a5cce40f-1dc4-4594-be84-c4c573fd4649| |Screen Reader|no| |VM|0%|
Extensions (111) Extension|Author (truncated)|Version ---|---|--- html-snippets|abu|0.2.1 react-hooks-snippets|AlD|1.2.0 Bookmarks|ale|13.3.1 aws-toolkit-vscode|ama|1.62.0 ng-template|Ang|15.1.0 vscode-apollo|apo|1.19.11 nestjs|ash|1.4.2 atlascode|atl|3.0.2 dustjs|Azk|0.1.1 vscode-database|baj|2.2.3 turbo-console-log|Cha|2.6.3 npm-intellisense|chr|1.4.4 gitignore|cod|0.9.0 dart-code|Dar|3.58.0 flutter|Dar|3.58.0 vscode-markdownlint|Dav|0.49.0 vscode-eslint|dba|2.4.0 githistory|don|0.6.19 es7-react-js-snippets|dsz|4.4.3 vscode-babel-coloring|dza|0.0.4 gitlens|eam|13.2.0 EditorConfig|Edi|0.16.4 vscode-npm-script|eg2|0.3.29 prettier-vscode|esb|9.10.4 vscode-jest-runner|fir|0.4.60 vscode-ionic-snippets|fiv|2.2.2 flow-for-vscode|flo|2.2.1 auto-rename-tag|for|0.1.10 shell-format|fox|7.2.2 vscode-pull-request-github|Git|0.58.1 go|gol|0.37.1 gc-excelviewer|Gra|4.2.56 vscode-mocha-test-adapter|hbe|2.14.1 vscode-test-explorer|hbe|2.21.1 vue-snippets|hol|1.0.4 rest-client|hum|0.25.1 path-autocomplete|ion|1.23.1 jenkins-pipeline-linter-connector|jan|1.2.0 vue|jcb|0.1.5 svg|joc|1.5.0 angular-essentials|joh|13.0.0 Angular2|joh|13.0.0 vscode-peacock|joh|4.2.2 tasks-context|jsa|1.0.0 kite|kit|0.147.0 graphql-for-vscode|kum|1.15.3 Kotlin|mat|1.7.1 rainbow-csv|mec|3.5.0 git-graph|mhu|1.30.0 dotenv|mik|1.0.1 prettify-json|moh|0.0.3 vscode-docker|ms-|1.23.3 csharp|ms-|1.25.4 vscode-kubernetes-tools|ms-|1.3.11 mssql|ms-|1.17.1 vscode-postgresql|ms-|0.3.0 isort|ms-|2022.8.0 python|ms-|2023.2.0 vscode-pylance|ms-|2023.2.20 jupyter|ms-|2023.1.2010391206 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.14 vscode-jupyter-cell-tags|ms-|0.1.6 vscode-jupyter-slideshow|ms-|0.1.5 remote-ssh|ms-|0.96.0 remote-ssh-edit|ms-|0.84.0 cpptools|ms-|1.13.9 test-adapter-converter|ms-|0.1.6 vscode-typescript-tslint-plugin|ms-|1.3.4 vscode-react-native|msj|1.10.0 gradle-language|nac|0.2.3 vscode-groovy-lint|Nic|2.0.0 angular-console|nrw|17.29.0 vetur|oct|0.36.1 react-proptypes-intellisense|OfH|1.0.3 convert-css-in-js|pau|1.1.3 material-icon-theme|PKi|4.24.0 vscode-css-peek|pra|4.2.0 quicktype|qui|12.0.46 ruby|reb|0.28.1 java|red|1.14.0 vscode-xml|red|0.24.0 vscode-yaml|red|1.11.0 synthwave-vscode|Rob|0.1.15 markdown-preview-enhanced|shd|0.6.7 js-jsx-snippets|sky|11.0.1 es6-mocha-snippets|spo|0.2.2 tabnine-vscode|Tab|3.6.38 vs-code-node-require|tgr|1.10.2 org-mode|too|0.5.0 intellicode-api-usage-examples|Vis|0.2.7 vscodeintellicode|Vis|1.2.30 vscode-java-debug|vsc|0.48.0 vscode-java-dependency|vsc|0.21.1 vscode-java-pack|vsc|0.25.7 vscode-java-test|vsc|0.37.1 vscode-maven|vsc|0.40.4 vscode-spring-initializr|vsc|0.11.2 vscode-icons|vsc|12.2.0 volar|Vue|1.0.24 vscode-typescript-vue-plugin|Vue|1.0.25 gitblame|wad|10.1.0 quokka-vscode|Wal|1.0.525 vscode-todo-highlight|way|1.0.5 vscode-ruby|win|0.28.0 vscode-import-cost|wix|3.3.0 commandlist|yam|1.1.0 json|Zai|2.0.2 zeplin|Zep|2.2.0 material-theme|zhu|3.15.6 html-css-class-completion|Zig|1.20.0 (4 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242:30382549 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 cmake_vspar411:30581797 vsaa593cf:30376535 pythonvs932:30410667 cppdebug:30492333 vsclangdc:30486549 c4g48928:30535728 dsvsc012:30540252 pynewvextcfv2:30660300 azure-dev_surveyone:30548225 pyindex848cf:30577861 nodejswelcome1:30587005 282f8724:30602487 89544117:30613380 pythonsymbol12:30657548 vscodeenable:30660116 ```
vscodenpa commented 1 year 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.75.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

mjbvz commented 1 year ago

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

vscodenpa commented 1 year 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!