microsoft / TypeScript

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

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

Open macizomedia opened 2 years ago

macizomedia commented 2 years ago

Issue Type: Bug

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

TypeScript Version: 4.7.0-dev.20220401

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: syntax

Error: Debug Failure. False expression.
    at watchFailedLookupLocationOfResolution (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:120604:22)
    at Array.forEach (<anonymous>)
    at watchFailedLookupLocationOfNonRelativeModuleResolutions (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:120639:29)
    at Map.forEach (<anonymous>)
    at Object.clearPerDirectoryResolutions [as startCachingPerDirectoryResolution] (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:120324:50)
    at InferredProject.Project.updateGraphWorker (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:168527:38)
    at InferredProject.Project.updateGraph (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:168456:42)
    at ProjectService.assignOrphanScriptInfoToInferredProject (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:170702:25)
    at ProjectService.assignProjectToOpenedScriptInfo (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:172394:26)
    at /home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:172668:97
    at Object.flatMap (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:508:25)
    at ProjectService.applyChangesInOpenFiles (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:172668:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:173796:46)
    at /home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:175836:88
    at IOSession.Session.executeWithRequestId (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:175827:28)
    at IOSession.Session.executeCommand (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:175836:33)
    at IOSession.Session.onMessage (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:175862:35)
    at Interface.<anonymous> (/home/mmcs/.vscode-insiders/extensions/ms-vscode.vscode-typescript-next-4.7.20220401/node_modules/typescript/lib/tsserver.js:178467: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 - Insiders 1.64.0-insider (b823936907f86ded04a152a4af202d0fc8423522, 2021-12-15T05:15:23.953Z) OS version: Linux x64 5.15.30-1-lts Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz (8 x 1200)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|1, 1, 1| |Memory (System)|15.25GB (4.63GB free)| |Process Argv|--crash-reporter-id 03d9d3ce-c644-48ba-b0a6-072ec847544b| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|undefined| |XDG_CURRENT_DESKTOP|undefined| |XDG_SESSION_DESKTOP|undefined| |XDG_SESSION_TYPE|tty|
Extensions (71) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|2.1.0 react-hooks-snippets|AlD|1.2.0 vscode-zipfs|arc|2.3.0 atlascode|atl|2.10.11 es6-string-css|bas|0.1.0 toml|be5|0.6.0 beardedicons|Bea|0.15.0 better-toml|bun|0.3.2 ts-snippets|chr|1.1.0 path-intellisense|chr|2.8.0 gitignore|cod|0.7.0 vscode-eslint|dba|2.2.2 emoji-snippets|dev|1.5.3 es7-react-js-snippets|dsz|4.4.3 pug-formatter|duc|0.6.0 vscode-babel-coloring|dza|0.0.4 vscode-npm-script|eg2|0.3.24 prettier-vscode|esb|9.5.0 file-icons|fil|1.0.29 vscode-firefox-debug|fir|2.9.6 vscode-jest-runner|fir|0.4.47 auto-complete-tag|for|0.1.0 auto-rename-tag|for|0.1.10 shell-format|fox|7.2.2 copilot|Git|1.11.5453 vscode-pull-request-github|Git|0.36.2 vscode-graphql|Gra|0.3.53 helium-icon-theme|hel|1.0.0 vscode-react-typescript|inf|1.3.1 vscode-env|Iro|0.1.0 solidity|Jua|0.0.137 ts-react-hooks-tools|kin|0.1.17 vscode-github|Kni|0.30.7 graphql-for-vscode|kum|1.15.3 vscode-graphql|luy|0.0.4 json-to-ts|Mar|1.7.5 vscode-language-babel|mgm|0.0.36 git-graph|mhu|1.30.0 dotenv|mik|1.0.1 mock-typescript|min|1.2.0 graphql|mqu|0.1.2 vscode-docker|ms-|1.21.0 remote-containers|ms-|0.231.2 vscode-typescript-next|ms-|4.7.20220402 vsliveshare|ms-|1.0.5449 debugger-for-chrome|msj|4.13.0 color-highlight|nau|2.5.0 file-and-folder-icons|nex|1.0.4 angular-console|nrw|17.14.1 vetur|oct|0.35.0 cargo|pan|0.2.3 material-icon-theme|PKi|4.15.0 vscode-css-peek|pra|4.2.0 quicktype|qui|12.0.46 typescript-hero|rbb|3.0.0 vscode-yaml|red|1.6.0 live-sass|rit|3.0.0 LiveServer|rit|5.7.5 rust|rus|0.7.8 vue-vscode-snippets|sdr|3.1.1 markdown-preview-enhanced|shd|0.6.2 mdx|sil|0.1.0 vscode-graphql|stp|0.3.0 sass-indented|syl|1.8.19 even-better-toml|tam|0.14.2 vscode-conventional-commits|viv|1.24.0 vscode-icons|vsc|11.10.0 vim|vsc|1.22.2 quokka-vscode|Wal|1.0.455 vscode-todo-highlight|way|1.0.5 literally-html|web|0.1.3 (2 theme extensions excluded)
A/B Experiments ``` vsliv695:30137379 vsins829:30139715 vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492cf:30256198 pythonvspyl392:30422396 pythontb:30258533 pythonptprofiler:30281269 vsdfh931cf:30280410 vshan820:30294714 pythondataviewer:30285072 vscod805:30301674 pythonvspyt200:30323110 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 pythonvs932:30404738 wslgetstarted:30449409 pythonvsnew555:30438690 vscscmwlcmt:30465136 vscaac:30438845 pynewfile477:30451556 ```
RheshavMaharaj commented 2 years ago

Not entire sure about this but it looks more of a typescript error than a VSC error. Related thread: Name Resolution Failure Bug. You could try to open an issue in the Typescript repository given it is a dev build.

RyanCavanaugh commented 2 years ago

We really need a way to reproduce the error