Skip to content

TypeScript language server static code block error #47041

Closed

Description

@ImBoop

Issue Type: Bug

Stack Trace:

<semantic> TypeScript Server Error (4.5.2)

TypeError: Cannot read property 'flags' of undefined
    at Object.getCheckFlags (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:19013:23)
    at getTypeOfSymbol (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:55162:33)
    at getTypeOfNode (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:84076:24)
    at Object.getTypeAtLocation (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:46900:31)
    at getTypeScriptMemberSymbols (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:129601:37)
    at getCompletionData (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:129470:17)
    at Object.getCompletionsAtPosition (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:128292:34)
    at Object.getCompletionsAtPosition (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:160040:35)
    at IOSession.Session.getCompletions (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:171509:64)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:170354:61)
    at %LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:172158:88
    at IOSession.Session.executeWithRequestId (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:172149:28)
    at IOSession.Session.executeCommand (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:172158:33)
    at IOSession.Session.onMessage (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:172184:35)
    at Interface.<anonymous> (%LocalAppData%\Programs\Microsoft VS Code Insiders\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)
	at Function.create (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:494353)
	at dispatchResponse (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:488189)
	at dispatchMessage (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:487046)
	at %LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:486531
	at a.fire (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:66:1712)
	at m.onLengthData (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:497282)
	at Socket.<anonymous> (%LocalAppData%\Programs\Microsoft VS Code Insiders\resources\app\extensions\typescript-language-features\dist\extension.js:1:496929)
	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)

Reproducible via:

class test {
    static {
        console.<ctrl+space>
    }
}

The intellisense/autocomplete window doesn't show. It's unable to discern properties of any object inside of a static block.

I'm not sure if this is dissimilar to microsoft/vscode#138256 and microsoft/vscode#46587 but the stack trace slightly differs, so maybe?

VS Code version: Code - Insiders 1.63.0-insider (827f765, 2021-11-30T11:58:52.241Z)
OS version: Windows_NT x64 10.0.22000
Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 7 3800X 8-Core Processor (16 x 3900)
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) 63.95GB (41.67GB free)
Process Argv --crash-reporter-id 3d6e36b9-2990-42de-a93b-a71cbe3b684a --crash-reporter-id 3d6e36b9-2990-42de-a93b-a71cbe3b684a
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30258533
pythonvspyt551cf:30291413
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
pythonvspyt200:30323110
bridge0708:30335490
bridge0723:30353136
pythonrunftest32:30365365
pythonf5test824:30361779
javagetstartedt:30350119
pythonvspyt187:30365360
vsaa593:30376534
vsc1dst:30396469
pythonvs932:30404738
vscexrecpromptc:30397557
vscop804:30404766
vscop341:30404997
vsclayoutctrt:30405800

Activity

  1. removed their assignment
    on Dec 6, 2021
  2. rbuckton commented on Aug 2, 2022

    @rbuckton
    Contributor

    This appears to have been addressed in 4.6, as it no longer repros in 4.6 or later.

  3. locked as resolved and limited conversation to collaborators on Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScriptRescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions