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 #138818

Closed
xbcc123 opened this issue Dec 10, 2021 · 2 comments
Closed

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

xbcc123 opened this issue Dec 10, 2021 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@xbcc123
Copy link

xbcc123 commented Dec 10, 2021

Issue Type: Bug

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

TypeScript Version: 4.5.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 property 'flags' of undefined
    at getPropertyOfObjectType (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:57005:22)
    at getPropertyOfType (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:57665:24)
    at resolveESModuleSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49811:54)
    at getTargetOfNamespaceImport (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:48996:28)
    at getTargetOfAliasDeclaration (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49230:28)
    at resolveAlias (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49275:30)
    at getSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47833:38)
    at resolveNameHelper (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:48125:34)
    at resolveName (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:48108:20)
    at resolveEntityName (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49447:42)
    at getTargetOfAliasLikeExpression (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49204:29)
    at getTargetOfExportAssignment (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49193:28)
    at getTargetOfAliasDeclaration (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49240:28)
    at resolveAlias (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49275:30)
    at resolveSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49265:67)
    at resolveExternalModuleSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49757:36)
    at getTargetOfNamespaceExportDeclaration (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49180:28)
    at getTargetOfAliasDeclaration (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49242:28)
    at resolveAlias (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49275:30)
    at resolveSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:49265:67)
    at mergeSymbol (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47619:42)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47734:47
    at Map.forEach (<anonymous>)
    at mergeSymbolTable (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47732:20)
    at initializeTypeChecker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:84991:21)
    at Object.createTypeChecker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:47390:9)
    at Object.getTypeChecker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:114385:79)
    at synchronizeHostData (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:159863:21)
    at Object.getProgram (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:159984:13)
    at ConfiguredProject.Project.updateGraphWorker (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:164998:53)
    at ConfiguredProject.Project.updateGraph (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:164927:42)
    at ConfiguredProject.updateGraph (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:165920:63)
    at ProjectService.createLoadAndUpdateConfiguredProject (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:167644:25)
    at ProjectService.assignProjectToOpenedScriptInfo (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:168727:44)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:169067: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:169067: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:170225:46)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:172158:88
    at IOSession.Session.executeWithRequestId (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:172149:28)
    at IOSession.Session.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:172158:33)
    at IOSession.Session.onMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:172184:35)
    at Interface.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js:174789: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 (Universal) (7db1a2b, 2021-12-07T05:15:48.091Z)
OS version: Darwin x64 20.3.0
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)
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) 58, 60, 50
Memory (System) 16.00GB (0.20GB free)
Process Argv --crash-reporter-id c017c808-1e15-45c9-9b19-eda1ddadb15f
Screen Reader no
VM 0%
Extensions (17)
Extension Author (truncated) Version
path-intellisense chr 2.6.0
dart-code Dar 3.29.0
flutter Dar 3.29.0
xml Dot 2.5.1
gitlens eam 11.7.0
EditorConfig Edi 0.16.4
auto-close-tag for 0.5.13
easy-snippet inu 0.6.3
vue jcb 0.1.5
vscode-leetcode Lee 0.18.0
code-beautifier mic 2.3.3
vscode-language-pack-zh-hans MS- 1.63.2
korofileheader OBK 4.8.18
vetur oct 0.35.0
open-in-browser tec 2.0.0
vscode-mdx-preview xyc 0.3.3
material-theme zhu 3.13.6
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
pythonrunftest32:30373476
pythonf5test824:30373475
javagetstartedt:30391933
pythonvspyt187:30373474
vsaa593:30376534
pythonvs932:30410667
vscop804:30404766
vscop453:30404998
vsrem710cf:30405999

@gjsjohnmurray
Copy link
Contributor

/duplicate of #138794

@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants
@gjsjohnmurray @mjbvz @xbcc123 and others