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

Closed
gauravthantry opened this issue Jan 11, 2022 · 3 comments
Closed

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

gauravthantry opened this issue Jan 11, 2022 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@gauravthantry
Copy link

Issue Type: Bug

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

TypeScript Version: 4.6.0-dev.20220110

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 (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:57089:22)
    at getPropertyOfType (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:57759:24)
    at resolveESModuleSymbol (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:49867:54)
    at getTargetOfNamespaceImport (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:49052:28)
    at getTargetOfAliasDeclaration (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:49286:28)
    at resolveAlias (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:49331:30)
    at getSymbol (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:47886:38)
    at resolveNameHelper (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:48179:34)
    at resolveName (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:48162:20)
    at resolveEntityName (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:49503:42)
    at getTargetOfExportSpecifier (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:49243:17)
    at getTargetOfAliasDeclaration (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:49293:28)
    at resolveAlias (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:49331:30)
    at resolveSymbol (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:49321:67)
    at mergeSymbol (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:47672:42)
    at /home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:47787:47
    at Map.forEach (<anonymous>)
    at mergeSymbolTable (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:47785:20)
    at mergeSymbol (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:47696:21)
    at /home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:47787:47
    at Map.forEach (<anonymous>)
    at mergeSymbolTable (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:47785:20)
    at initializeTypeChecker (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:85183:21)
    at Object.createTypeChecker (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:47443:9)
    at Object.getTypeChecker (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:114715:79)
    at synchronizeHostData (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:160428:21)
    at Object.getProgram (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:160549:13)
    at ConfiguredProject.Project.updateGraphWorker (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:165593:53)
    at ConfiguredProject.Project.updateGraph (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:165522:42)
    at ConfiguredProject.updateGraph (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:166515:63)
    at ProjectService.createLoadAndUpdateConfiguredProject (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:168239:25)
    at ProjectService.assignProjectToOpenedScriptInfo (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:169322:44)
    at /home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:169662:97
    at Object.flatMap (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:502:25)
    at ProjectService.applyChangesInOpenFiles (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:169662:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:170820:46)
    at /home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:172756:88
    at IOSession.Session.executeWithRequestId (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:172747:28)
    at IOSession.Session.executeCommand (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:172756:33)
    at IOSession.Session.onMessage (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:172782:35)
    at Interface.<anonymous> (/home/gauravthantry/.vscode/extensions/ms-vscode.vscode-typescript-next-4.6.20220110/node_modules/typescript/lib/tsserver.js:175387: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 (899d46d, 2021-12-15T09:39:46.686Z)
OS version: Linux x64 4.15.0-43-generic
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 1800)
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) 5, 4, 3
Memory (System) 23.36GB (7.03GB free)
Process Argv . --crash-reporter-id baec7d19-933f-4aad-b072-7b783485a6b8
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
Extensions (21)
Extension Author (truncated) Version
better-comments aar 2.1.0
aws-toolkit-vscode ama 1.34.0
shell bbe 0.3.0
shell-syntax bma 1.0.3
npm-intellisense chr 1.4.0
bracket-pair-colorizer-2 Coe 0.2.2
vscode-eslint dba 2.2.2
es7-react-js-snippets dsz 3.1.1
gitlens eam 11.7.0
prettier-vscode esb 9.1.0
vscode-graphql Gra 0.3.41
python ms- 2021.12.1559732655
vscode-pylance ms- 2022.1.0
jupyter ms- 2021.11.1001550889
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.4
vscode-typescript-next ms- 4.6.20220110
vsliveshare ms- 1.0.5242
vscode-thunder-client ran 1.9.1
python tht 0.2.3
shellcheck tim 0.18.3
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30384385
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dsc:30421290
pythonvs932:30410667
vscop804cf:30404767
vscop341:30404997
vsrem710cf:30416617

@yume-chan
Copy link
Contributor

Duplicate of microsoft/TypeScript#47179

@IllusionMH
Copy link
Contributor

TypeScript Version: 4.6.0-dev.20220110

Please check that you have vscode-typescript-next extension updated to 4.6.20220111 and if you still see this problem.
Fix should be in latest TS Nightly version

@mjbvz mjbvz added the *duplicate Issue identified as a duplicate of another issue(s) label Jan 18, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 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

5 participants
@IllusionMH @yume-chan @mjbvz @gauravthantry and others