microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.17k stars 29.28k forks source link

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

Closed jakobmichael closed 2 years ago

jakobmichael commented 2 years ago

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 (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:57005:22)
    at getPropertyOfType (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:57665:24)
    at resolveESModuleSymbol (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49811:54)
    at getTargetOfNamespaceImport (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:48996:28)
    at getTargetOfAliasDeclaration (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49230:28)
    at resolveAlias (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49275:30)
    at getSymbol (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:47833:38)
    at resolveNameHelper (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:48125:34)
    at resolveName (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:48108:20)
    at resolveEntityName (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49447:42)
    at getTargetOfAliasLikeExpression (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49204:29)
    at getTargetOfExportAssignment (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49193:28)
    at getTargetOfAliasDeclaration (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49240:28)
    at resolveAlias (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49275:30)
    at resolveSymbol (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49265:67)
    at resolveExternalModuleSymbol (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49757:36)
    at getTargetOfNamespaceExportDeclaration (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49180:28)
    at getTargetOfAliasDeclaration (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49242:28)
    at resolveAlias (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49275:30)
    at tryResolveAlias (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:49291:24)
    at getCandidateName (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:72927:33)
    at Object.getSpellingSuggestion (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:1873:33)
    at getSpellingSuggestionForName (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:72917:23)
    at c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:72858:24
    at resolveNameHelper (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:48416:30)
    at getSuggestedSymbolForNonexistentSymbol (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:72840:26)
    at resolveNameHelper (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:48438:42)
    at resolveName (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:48108:20)
    at getGlobalSymbol (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:58878:20)
    at getGlobalTypeSymbol (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:58860:20)
    at getGlobalType (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:58881:26)
    at initializeTypeChecker (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:85034:52)
    at Object.createTypeChecker (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:47390:9)
    at Object.getTypeChecker (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:114385:79)
    at synchronizeHostData (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:159863:21)
    at Object.getProgram (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:159984:13)
    at AutoImportProviderProject.Project.updateGraphWorker (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:164998:53)
    at AutoImportProviderProject.Project.updateGraph (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:164927:42)
    at AutoImportProviderProject.updateGraph (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:165772:70)
    at Object.updateProjectIfDirty (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:166409:45)
    at ConfiguredProject.Project.getPackageJsonAutoImportProvider (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:165547:32)
    at ConfiguredProject.Project.updateGraph (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:164965:26)
    at ConfiguredProject.updateGraph (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:165920:63)
    at ProjectService.createLoadAndUpdateConfiguredProject (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:167644:25)
    at ProjectService.assignProjectToOpenedScriptInfo (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:168727:44)
    at c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:169067:97
    at Object.flatMap (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:522:25)
    at ProjectService.applyChangesInOpenFiles (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:169067:41)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:170225:46)
    at c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:172158:88
    at IOSession.Session.executeWithRequestId (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:172149:28)
    at IOSession.Session.executeCommand (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:172158:33)
    at IOSession.Session.onMessage (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js:172184:35)
    at Interface.<anonymous> (c:\Users\jluge\AppData\Local\Programs\Microsoft VS Code\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.1 (fe719cd3e5825bf14e14182fddeb88ee8daf044f, 2021-12-14T02:13:54.292Z) OS version: Windows_NT x64 10.0.19044 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz (4 x 2295)| |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)|7.81GB (1.31GB free)| |Process Argv|--crash-reporter-id 04906322-6f89-439d-9311-91041ac693e8| |Screen Reader|no| |VM|0%|
Extensions (53) Extension|Author (truncated)|Version ---|---|--- rainbow-brackets|2gu|0.0.6 GetterAndSetterGenerator|afm|1.0.3 vscode-intelephense-client|bme|1.8.0 js-codeformer|cms|2.6.1 jsrefactor|cms|3.0.1 bracket-pair-colorizer|Coe|1.0.62 bracket-pair-colorizer-2|Coe|0.2.2 vscode-html-css|ecm|1.10.2 vscode-spring-boot|ecm|0.0.10 vscode-great-icons|emm|2.1.79 vsc-material-theme-icons|equ|1.2.2 prettier-vscode|esb|9.0.0 php-intellisense|fel|2.3.14 getter-setter-generator|Gab|1.4.0 easy-icons|jam|0.3.1 vscode-simple-icons|Lau|1.16.0 linecounter|lyz|0.2.7 git-graph|mhu|1.30.0 theme-monokai-pro-vscode|mon|1.1.19 mosmmy-icons-vscode|mos|0.1.1 vscode-docker|ms-|1.18.0 vscode-language-pack-de|MS-|1.63.3 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 cpptools|ms-|1.7.1 vscode-groovy-lint|Nic|1.7.0 vscode-boot-dev-pack|Piv|0.1.0 vscode-concourse|Piv|1.29.0 vscode-manifest-yaml|Piv|1.29.0 vscode-spring-boot|Piv|1.29.0 material-icon-theme|PKi|4.11.0 fabric8-analytics|red|0.3.5 java|red|1.2.0 vscode-commons|red|0.0.6 vscode-xml|red|0.18.2 format-html-in-php|rif|1.7.0 LiveServer|rit|5.6.1 vs-code-prettier-eslint|rve|3.0.4 vscode-scss-formatter|sib|2.3.3 java-generate-setters-getters|soh|7.4.0 sonarlint-vscode|Son|3.1.0 vscodeintellicode|Vis|1.2.15 vscode-java-debug|vsc|0.37.0 vscode-java-dependency|vsc|0.18.8 vscode-java-pack|vsc|0.19.0 vscode-java-test|vsc|0.33.0 vscode-maven|vsc|0.34.1 vscode-spring-boot-dashboard|vsc|0.2.0 vscode-spring-initializr|vsc|0.8.0 vscode-icons-mac|way|7.25.3 (5 theme extensions excluded)
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 vscoreces:30384385 pythondataviewer:30285071 vscod805:30301674 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593cf:30376535 vsc1dst:30414010 pythonvs932:30410667 vscop804:30404766 vs360cf:30404996 vsrem710cf:30405999 py55gd98:30411514 vscexrecpromp3t1:30407762 ```
gjsjohnmurray commented 2 years ago

/duplicate of #138794 and supposed to have been fixed by 1.63.2