Skip to content

TypeError: Cannot read property 'declarations' of undefined in 'isModuleSymbol' during 'completionEntryDetails' #21817

@aozgaa

Description

@aozgaa

This issue comes from crash dumps in telemetry. We've tried to de-duplicate issues on a best-effort basis, comparing the sequence of methods called and the command requested while ignoring line numbers.
TypeScript Version Prefix: 2.7.1
VSCode Version 1.19.3
command requested: completionEntryDetails
hitting sessions: 455
proportion of all sessions: 0.0016985661115528627
five line hash: f2febbc05a377d88d4a7f643e001b42e
stack

TypeError: Cannot read property 'declarations' of undefined
    at isModuleSymbol (tsserver.js:67339:26)
    at getFirstSymbolInChain (tsserver.js:67336:20)
    at getFirstSymbolInChain (tsserver.js:67336:78)
    at getRecommendedCompletion (tsserver.js:67291:19)
    at getCompletionData (tsserver.js:67483:58)
    at getSymbolCompletionFromEntryId (tsserver.js:67165:34)
    at Object.getCompletionEntryDetails (tsserver.js:67188:36)
    at Object.getCompletionEntryDetails (tsserver.js:82881:35)
    at unknown (tsserver.js:89938:57)
    at Object.mapDefined (tsserver.js:1776:30)
    at IOSession.Session.getCompletionEntryDetails (tsserver.js:89936:33)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (tsserver.js:89023:61)
    at unknown (tsserver.js:90393:88)
    at IOSession.Session.executeWithRequestId (tsserver.js:90384:28)
    at IOSession.Session.executeCommand (tsserver.js:90393:33)
    at IOSession.Session.onMessage (tsserver.js:90413:35)
    at Interface.<anonymous> (tsserver.js:91614:27)
    at emitOne (events.js:96:13)
    at Interface.emit (events.js:191:7)
    at Interface._onLine (readline.js:241:10)
    at Interface._normalWrite (readline.js:384:12)
    at Socket.ondata (readline.js:101:10)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
    at Socket.Readable.push (_stream_readable.js:136:10)
    at Pipe.onread (net.js:560:20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueSource: TelemetryThe issue relates to the telemetry in editors

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions