Skip to content

TypeError: Cannot read property 'lastIndexOf' of undefined in 'Object.startsWith' during 'completionEntryDetails' #37531

@typescript-bot

Description

@typescript-bot

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: 3.8.3
VSCode version: 1.43.0
Command requested: completionEntryDetails
Hitting sessions: 3424
Five line hash: 3bf2792b241510a67cdb0d1ad5fb2ee5
Stack:

    at startsWith (tsserver.js:1894:20)
    at isPathRelativeToParent (tsserver.js:102582:23)
    at <anonymous> (tsserver.js:102541:24)
    at firstDefined (tsserver.js:197:26)
    at getPathRelativeToRootDirs (tsserver.js:102539:23)
    at tryGetModuleNameFromRootDirs (tsserver.js:102400:40)
    at getLocalModuleSpecifier (tsserver.js:102258:44)
    at <anonymous> (tsserver.js:102245:96)
    at getModuleSpecifiers (tsserver.js:102245:57)
    at <anonymous> (tsserver.js:127833:44)
    at flatMap (tsserver.js:465:25)
    at getNewImportInfos (tsserver.js:127831:52)
    at getImportCompletionAction (tsserver.js:127726:44)
    at getCompletionEntryCodeActionsAndSourceDisplay (tsserver.js:109912:33)
    at getCompletionEntryDetails (tsserver.js:109876:30)
    at getCompletionEntryDetails (tsserver.js:135365:35)
    at <anonymous> (tsserver.js:145465:57)
    at mapDefined (tsserver.js:562:30)
    at Session.getCompletionEntryDetails (tsserver.js:145463:33)
    at _a.<computed> (tsserver.js:144392:61)
    at <anonymous> (tsserver.js:146003:88)
    at Session.executeWithRequestId (tsserver.js:145994:28)
    at Session.executeCommand (tsserver.js:146003:33)
    at Session.onMessage (tsserver.js:146027:35)
    at <anonymous> (tsserver.js:147342:27)
    at unknown (suppressed.js)
    at unknown (suppressed.js)
    at unknown (suppressed.js)
    at unknown (suppressed.js)
    at unknown (suppressed.js)
    at unknown (suppressed.js)
    at unknown (suppressed.js)
    at unknown (suppressed.js)
    at unknown (suppressed.js)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptSource: 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