microsoft / TypeScript

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

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

Open Ali-Hussein-dev opened 2 years ago

Ali-Hussein-dev commented 2 years ago

Issue Type: Bug

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

TypeScript Version: 4.6.0-dev.20211212

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

Error: Debug Failure. False expression.
    at _loop_2 (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:167587:34)
    at ProjectService.assignOrphanScriptInfoToInferredProject (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:167595:25)
    at ProjectService.assignProjectToOpenedScriptInfo (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:169261:26)
    at c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:169535:97
    at Object.flatMap (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:502:25)
    at ProjectService.applyChangesInOpenFiles (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:169535:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:170693:46)
    at c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:172626:88
    at IOSession.Session.executeWithRequestId (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:172617:28)
    at IOSession.Session.executeCommand (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:172626:33)
    at IOSession.Session.onMessage (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:172652:35)
    at Interface.<anonymous> (c:\Users\alilo\.vscode\extensions\ms-vscode.vscode-typescript-next-4.6.20211212\node_modules\typescript\lib\tsserver.js:175257: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.63.0 (7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e, 2021-12-07T06:26:56.179Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.74GB (14.78GB free)| |Process Argv|--crash-reporter-id a9f5d85a-ade5-4465-8ba4-53fdc2083664| |Screen Reader|no| |VM|0%|
Extensions (99) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|2.1.0 codesnap|adp|1.3.4 vscode-javascript-snippet-pack|aka|0.1.6 project-manager|ale|12.4.0 sublime-monokai|Ary|0.2.9 tailwind-docs|aus|1.4.0 emojisense|bie|0.9.0 autofoldyeah|bob|1.0.6 vscode-tailwindcss|bra|0.7.4 vscode-toggle-quotes|Bri|0.3.5 turbo-console-log|Cha|2.1.7 npm-intellisense|chr|1.4.0 path-intellisense|chr|2.6.0 bracket-select|chu|2.0.2 readable-indent|cno|1.2.2 bracket-pair-colorizer|Coe|1.0.62 meld-diff|dan|1.2.5 markdown-table-prettify|dar|3.6.0 vscode-markdownlint|Dav|0.45.0 vscode-eslint|dba|2.2.2 githistory|don|0.6.19 sublime-mark|dre|0.2.1 es7-react-js-snippets|dsz|3.1.1 gitlens|eam|11.7.0 vscode-npm-script|eg2|0.3.23 LogFileHighlighter|emi|2.13.0 vsc-material-theme|Equ|33.2.0 vsc-material-theme-icons|equ|1.2.2 prettier-vscode|esb|9.0.0 fauna|fau|1.8.1 vscode-jest-runner|fir|0.4.47 provision-lens|Foo|4.0.0 auto-rename-tag|for|0.1.9 code-runner|for|0.11.6 vscode-pull-request-github|Git|0.34.1 todo-tree|Gru|0.0.214 headwind|hey|1.7.0 vscode-auto-open-markdown-preview|hnw|0.0.4 rest-client|hum|0.24.6 vscode-react-typescript|inf|1.3.1 path-autocomplete|ion|1.17.1 vscode-placeholder-images|Jak|0.1.0 search-node-modules|jas|1.3.0 polacode-2019|jef|0.5.2 circleci-vscode|jod|0.2.2 vscode-peacock|joh|4.0.0 vscode-styled-components|jpo|1.7.0 stack-tabs|kyl|0.0.2 xstate-vscode|mat|1.4.1 git-graph|mhu|1.30.0 vscode-wrap-console-log|mid|1.7.2 vscode-filesize|mkx|3.1.0 theme-monokai-pro-vscode|mon|1.1.19 vscode-edge-devtools|ms-|1.4.2 remote-ssh|ms-|0.70.0 remote-ssh-edit|ms-|0.70.0 remote-wsl|ms-|0.63.13 vscode-typescript-next|ms-|4.6.20211215 vscode-typescript-tslint-plugin|ms-|1.3.3 debugger-for-edge|msj|1.0.15 abracadabra|nic|6.8.0 writer-mode|noa|0.3.1 angular-console|nrw|17.13.1 refactor|p42|1.58.0 vscode-versionlens|pfl|1.0.9 tsimporter|pmn|2.0.1 quicktype|qui|12.0.46 vscode-thunder-client|ran|1.9.1 project-snippets|reb|0.5.0 vscode-commons|red|0.0.6 vscode-yaml|red|1.2.2 prettier-now|rem|1.4.9 LiveServer|rit|5.6.1 color-manager|roy|0.6.3 partial-diff|ryu|1.4.3 comment-ts|sal|1.0.21 vscode-javascript-booster|sbu|14.0.1 vsc-packages|ske|1.6.6 vsc-quokka-statusbar|ske|1.3.6 vscode-fileutils|sle|3.4.5 swdc-vscode|sof|2.6.19 stepsize|Ste|0.26.2 addDocComments|ste|0.0.8 vscode-stylelint|sty|1.2.1 tabnine-vscode|Tab|3.5.6 vscode-terminal-here|Tyr|0.2.4 bracket-padder|via|0.3.0 highlight-matching-tag|vin|0.10.1 vscodeintellicode|Vis|1.2.15 vscode-icons|vsc|11.8.0 mui-snippets|vsc|1.0.1 quokka-vscode|Wal|1.0.432 wallaby-vscode|Wal|1.0.322 vscode-todo-highlight|way|1.0.5 vscode-import-cost|wix|2.15.0 better-align|wwm|1.1.6 JavaScriptSnippets|xab|1.8.0 local-history|xyz|1.8.1 markdown-all-in-one|yzh|3.4.0 (23 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 pythondataviewer:30285071 vscod805cf:30301675 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 vscop804cf:30404767 vscop341:30404997 vsrem710:30405998 vscexrecpromp3c:30407761 vscop841cf:30413486 vscop927cf:30413487 vscop436cf:30413488 ```
andrewbranch commented 2 years ago

I don’t think this is actionable without any repro information, unless @sheetalkamat has any ideas about how this assertion could fire: https://github.com/microsoft/TypeScript/blob/c8ec855f9fd5efa2a324b08ad4cc468b4c3013d4/src/server/editorServices.ts#L1525

sheetalkamat commented 2 years ago

We need logs to see what happened.. normally this is caused by multiple previous operations so just stack isnt enough