Skip to content

TypeError: Cannot read property 'text' of undefined in 'getDescriptionForClassLikeDeclaration' during 'getApplicableRefactors' #21816

@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: getApplicableRefactors
hitting sessions: 475
proportion of all sessions: 0.001773228358214527
five line hash: 37f481d01730e7d593c925f87d32bb86
stack

TypeError: Cannot read property 'text' of undefined
    at getDescriptionForClassLikeDeclaration (tsserver.js:80881:45)
    at unknown (tsserver.js:80807:31)
    at Array.map (native)
    at getPossibleExtractions (tsserver.js:80801:42)
    at Object.getAvailableActions (tsserver.js:80399:35)
    at unknown (tsserver.js:77085:128)
    at getIterator (tsserver.js:1733:23)
    at Object.next (tsserver.js:1728:35)
    at Object.arrayFrom (tsserver.js:2267:32)
    at Object.getApplicableRefactors (tsserver.js:77084:23)
    at Object.getApplicableRefactors (tsserver.js:83299:32)
    at IOSession.Session.getApplicableRefactors (tsserver.js:90156:53)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (tsserver.js:89112:61)
    at unknown (tsserver.js:90355:88)
    at IOSession.Session.executeWithRequestId (tsserver.js:90346:28)
    at IOSession.Session.executeCommand (tsserver.js:90355:33)
    at IOSession.Session.onMessage (tsserver.js:90375:35)
    at Interface.<anonymous> (tsserver.js:91576: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

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