TypeScript: Error: Debug Failure. False expression. in 'Object.getImportCompletionAction' during 'completionEntryDetails'

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.5.3 VSCode version: 1.36.1 Command requested: completionEntryDetails Hitting sessions: 935 Five line hash: c97ea9793e8d0655c904b5472ca4a0ed Stack:

    at getImportCompletionAction (tsserver.js:115308:22)
    at getCompletionEntryCodeActionsAndSourceDisplay (tsserver.js:99854:33)
    at getCompletionEntryDetails (tsserver.js:99818:30)
    at getCompletionEntryDetails (tsserver.js:122116:35)
    at <anonymous> (tsserver.js:131183:57)
    at mapDefined (tsserver.js:670:30)
    at Session.getCompletionEntryDetails (tsserver.js:131181:33)
    at _a.<computed> (tsserver.js:130112:61)
    at <anonymous> (tsserver.js:131671:88)
    at Session.executeWithRequestId (tsserver.js:131662:28)
    at Session.executeCommand (tsserver.js:131671:33)
    at Session.onMessage (tsserver.js:131693:35)
    at <anonymous> (tsserver.js:132984: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)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

Embarrassing repro

Info 19060[22:14:39.583] request:
    {"seq":3404,"type":"request","command":"completionEntryDetails","arguments":{"file":"c:/Users/Daniel/Personal/frm-render/src/parseForm.ts","line":27,"offset":37,"entryNames":[{"name":"fstat","source":"fs"}]}}
Info 19061[22:14:39.589] getCompletionData: Get current token: 0
Info 19062[22:14:39.590] getCompletionData: Is inside comment: 0
Info 19063[22:14:39.590] getCompletionData: Get previous token 1: 0
Info 19064[22:14:39.590] getCompletionData: Get previous token 2: 0
Info 19065[22:14:39.590] getCompletionsAtPosition: isCompletionListBlocker: 0
Info 19066[22:14:39.595] getSymbolsFromOtherSourceFileExports: Using cached list
Info 19067[22:14:39.600] getCompletionData: Semantic work: 10
Err 19068 [22:14:39.636] Exception on executing command {"seq":3404,"type":"request","command":"completionEntryDetails","arguments":{"file":"c:/Users/Daniel/Personal/frm-render/src/parseForm.ts","line":27,"offset":37,"entryNames":[{"name":"fstat","source":"fs"}]}}:

    Debug Failure. False expression: Some exportInfo should match the specified moduleSymbol

    Error: Debug Failure. False expression: Some exportInfo should match the specified moduleSymbol
        at Object.getImportCompletionAction (C:\Users\Daniel\TypeScript\built\local\tsserver.js:124244:22)
        at getCompletionEntryCodeActionsAndSourceDisplay (C:\Users\Daniel\TypeScript\built\local\tsserver.js:107217:33)
        at Object.getCompletionEntryDetails (C:\Users\Daniel\TypeScript\built\local\tsserver.js:107181:30)
        at Object.getCompletionEntryDetails (C:\Users\Daniel\TypeScript\built\local\tsserver.js:131547:35)
        at C:\Users\Daniel\TypeScript\built\local\tsserver.js:141489:57
        at Object.mapDefined (C:\Users\Daniel\TypeScript\built\local\tsserver.js:546:30)
        at IOSession.Session.getCompletionEntryDetails (C:\Users\Daniel\TypeScript\built\local\tsserver.js:141487:33)
        at Session.handlers.ts.createMapFromTemplate._a.<computed> (C:\Users\Daniel\TypeScript\built\local\tsserver.js:140448:61)
        at C:\Users\Daniel\TypeScript\built\local\tsserver.js:141974:88
        at IOSession.Session.executeWithRequestId (C:\Users\Daniel\TypeScript\built\local\tsserver.js:141965:28)
        at IOSession.Session.executeCommand (C:\Users\Daniel\TypeScript\built\local\tsserver.js:141974:33)
        at IOSession.Session.onMessage (C:\Users\Daniel\TypeScript\built\local\tsserver.js:141997:35)
        at Interface.<anonymous> (C:\Users\Daniel\TypeScript\built\local\tsserver.js:143312:27)
        at Interface.emit (events.js:200:13)
        at Interface._onLine (readline.js:314:10)
        at Interface._normalWrite (readline.js:459:12)
        at Socket.ondata (readline.js:170:10)
        at Socket.emit (events.js:200:13)
        at addChunk (_stream_readable.js:294:12)
        at readableAddChunk (_stream_readable.js:275:11)
        at Socket.Readable.push (_stream_readable.js:210:10)
        at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)

File text of c:/Users/Daniel/Personal/frm-render/src/parseForm.ts:
    import { ANTLRInputStream, CommonTokenStream } from "antlr4ts";
    import {AbstractParseTreeVisitor } from "antlr4ts/tree/AbstractParseTreeVisitor";
    import { VisualBasic6Lexer } from "./parser/VisualBasic6Lexer";
    import { VisualBasic6Parser, ControlPropertiesContext } from "./parser/VisualBasic6Parser";
    import { VisualBasic6Visitor } from "./parser/VisualBasic6Visitor";
    
    type ParsedType = any;
    class MaiVisitor extends AbstractParseTreeVisitor<ParsedType> implements VisualBasic6Visitor<ParsedType> {
        protected defaultResult() {
            return 100;
        }
    
        visitControlProperties(ctx: ControlPropertiesContext) {
            const controlType = ctx.cp_ControlType().complexType();
            if (controlType.ambiguousIdentifier(0).text === "VB") {
                console.log(controlType.ambiguousIdentifier(1).text);
            }
        }
    }
    
    function Form(props: { text: string }) {
        // Todo - try not to create too many of these?
        const inputStream = new ANTLRInputStream(props.text)
        const lexer = new VisualBasic6Lexer(inputStream);
        const tokenStream = new CommonTokenStream(lexer);
        const parser = new VisualBasic6Parser(tokenStream);
        const tree = parser.startRule(fs.);
        
    }