Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS Server fatal error: Cannot read property 'flags' of undefined #47303

Closed
georgii-nansen opened this issue Dec 17, 2021 · 7 comments
Closed
Assignees
Labels
Bug A bug in TypeScript

Comments

@georgii-nansen
Copy link

Issue Type: Bug

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

TypeScript Version: 4.5.4

TS Server Log
❗️ Please review and upload this log file to help us diagnose this crash:
/Users/george-nansen/Library/Application Support/Code/logs/20211217T110027/exthost1/vscode.typescript-language-features/tsserver-log-60BY9c/tsserver.log
The log file may contain personal data, including full paths and source code from your workspace. You can scrub the log file to remove paths or other personal information.

TS Server Error Stack
Server: semantic

TypeError: Cannot read property 'flags' of undefined
    at getPropertyOfObjectType (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:57011:22)
    at getPropertyOfType (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:57671:24)
    at resolveESModuleSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49817:54)
    at getTargetOfNamespaceImport (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49002:28)
    at getTargetOfAliasDeclaration (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49236:28)
    at resolveAlias (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49281:30)
    at getSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47838:38)
    at resolveNameHelper (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:48131:34)
    at resolveName (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:48114:20)
    at resolveEntityName (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49453:42)
    at getTargetOfExportSpecifier (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49193:17)
    at getTargetOfAliasDeclaration (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49243:28)
    at resolveAlias (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49281:30)
    at resolveSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49271:67)
    at mergeSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47624:42)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47739:47
    at Map.forEach (<anonymous>)
    at mergeSymbolTable (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47737:20)
    at mergeSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47648:21)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47739:47
    at Map.forEach (<anonymous>)
    at mergeSymbolTable (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47737:20)
    at initializeTypeChecker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:85010:21)
    at Object.createTypeChecker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47395:9)
    at Object.getTypeChecker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:114404:79)
    at synchronizeHostData (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:159898:21)
    at Object.getProgram (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:160019:13)
    at ConfiguredProject.Project.updateGraphWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:165033:53)
    at ConfiguredProject.Project.updateGraph (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:164962:42)
    at ConfiguredProject.updateGraph (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:165955:63)
    at ProjectService.createLoadAndUpdateConfiguredProject (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:167679:25)
    at ProjectService.assignProjectToOpenedScriptInfo (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:168762:44)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:169102:97
    at Object.flatMap (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:522:25)
    at ProjectService.applyChangesInOpenFiles (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:169102: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:170260:46)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:172193:88
    at IOSession.Session.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:172184:28)
    at IOSession.Session.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:172193:33)
    at IOSession.Session.onMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:172219:35)
    at Interface.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:174824: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.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:37:28.172Z)
OS version: Darwin x64 20.6.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz (4 x 2300)
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) 10, 11, 8
Memory (System) 8.00GB (0.03GB free)
Process Argv --crash-reporter-id bd779320-9ecd-4a7e-9045-696f4a015a89
Screen Reader no
VM 0%
Extensions (24)
Extension Author (truncated) Version
vscode-sql-formatter adp 1.4.4
better-toml bun 0.3.2
systemd-unit-file coo 1.0.6
vue-peek dar 1.0.2
vscode-eslint dba 2.2.2
gitlens eam 11.7.0
prettier-vscode esb 9.0.0
vue jcb 0.1.5
svg joc 1.4.14
intellij-idea-keybindings k-- 1.5.0
vscode-scss mrm 0.10.0
python ms- 2021.12.1559732655
vscode-pylance ms- 2021.12.2
jupyter ms- 2021.11.1001550889
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.4
vetur oct 0.35.0
trailing-spaces sha 0.3.1
autoimport ste 1.5.4
sass-indented syl 1.8.18
vscodeintellicode Vis 1.2.15
vscode-todo-highlight way 1.0.5
wg-getters-and-setters Wil 2.0.0
html-css-class-completion Zig 1.20.0

(1 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30384385
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
vscop804:30404766
vs360:30404995
vsrem710cf:30405999
vscexrecpromp3t2:30407763

@georgii-nansen
Copy link
Author

The same problem since 1.63.0. I know you guys are working hard on fixing this since the time the bug appeared, much appreciate your efforts

@gjsjohnmurray
Copy link

/assign @mjbvz

@mjbvz since this is with TS 4.5.4 and VS Code 1.63.2 is there something users need to do to resolve it?

@ghost ghost assigned mjbvz Dec 17, 2021
@IllusionMH
Copy link
Contributor

I think options can be:

@mjbvz mjbvz transferred this issue from microsoft/vscode Jan 3, 2022
@mjbvz
Copy link
Contributor

mjbvz commented Jan 3, 2022

@georgii-nansen Can you please share a project that triggers this crash?

@mjbvz mjbvz removed their assignment Jan 3, 2022
@otto-liljalaakso-nt
Copy link

@georgii-nansen Can you please share a project that triggers this crash?

Does this help?

#47038 (comment)

@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.7.0 milestone Jan 4, 2022
@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Jan 4, 2022
@sandersn
Copy link
Member

Should be fixed by #47348

@georgii-nansen
Copy link
Author

@georgii-nansen Can you please share a project that triggers this crash?

@mjbvz unfortunately, i can't share the project, it is proprietary. I can try sharing package.json if it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

7 participants