Skip to content

TypeError: Cannot read property 'getChildren' of undefined in 'Object.findChildOfKind' during 'completions' #21790

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aozgaa opened this issue Feb 9, 2018 · 3 comments · Fixed by #22074
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Source: Telemetry The issue relates to the telemetry in editors

Comments

@aozgaa
Copy link
Contributor

aozgaa commented Feb 9, 2018

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.20.0-insider
command requested: completions
hitting sessions: 4208
proportion of all sessions: 0.015708936697614168
five line hash: ebebd291ec97e3f9774847e65d533f4c
stack

TypeError: Cannot read property 'getChildren' of undefined
    at Object.findChildOfKind (tsserver.js:64536:25)
    at createCompletionEntry (tsserver.js:66918:70)
    at getCompletionEntriesFromSymbols (tsserver.js:66957:29)
    at completionInfoFromData (tsserver.js:66870:17)
    at Object.getCompletionsAtPosition (tsserver.js:66834:28)
    at Object.getCompletionsAtPosition (tsserver.js:82839:35)
    at IOSession.Session.getCompletions (tsserver.js:89878:64)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (tsserver.js:88979: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)
@aozgaa aozgaa added the Source: Telemetry The issue relates to the telemetry in editors label Feb 9, 2018
@mhegazy mhegazy added the Bug A bug in TypeScript label Feb 9, 2018
@mhegazy mhegazy assigned ghost Feb 9, 2018
@mhegazy mhegazy added this to the TypeScript 2.8 milestone Feb 9, 2018
@ghost
Copy link

ghost commented Feb 9, 2018

The type cast propertyAccessToConvert! is wrong because needsConvertPropertyAccess is true for all global completions. Would probably be fixed by #21342.

@aozgaa
Copy link
Contributor Author

aozgaa commented Feb 20, 2018

This issue reproduced in the following context:
TypeScript Version Prefix: 2.7.2
VSCode Version 1.20.1
command requested: completions
hitting sessions: 140
proportion of all sessions: 0.032588454376163874
stack

TypeError: Cannot read property 'getChildren' of undefined
    at Object.findChildOfKind (tsserver.js:64706:25)
    at createCompletionEntry (tsserver.js:67095:34)
    at getCompletionEntriesFromSymbols (tsserver.js:67142:29)
    at completionInfoFromData (tsserver.js:67047:17)
    at Object.getCompletionsAtPosition (tsserver.js:67011:28)
    at Object.getCompletionsAtPosition (tsserver.js:83037:35)
    at IOSession.Session.getCompletions (tsserver.js:90076:64)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (tsserver.js:89177:61)
    at unknown (tsserver.js:90553:88)
    at IOSession.Session.executeWithRequestId (tsserver.js:90544:28)
    at IOSession.Session.executeCommand (tsserver.js:90553:33)
    at IOSession.Session.onMessage (tsserver.js:90573:35)
    at Interface.<anonymous> (tsserver.js:91774: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)

@aozgaa
Copy link
Contributor Author

aozgaa commented Apr 2, 2018

This issue reproduced in the following context:
TypeScript Version Prefix: 2.8.1
VSCode Version 1.20.1
command requested: completions
hitting sessions: 12
proportion of all sessions: 0.030690537084398978
five line hash: ebebd291ec97e3f9774847e65d533f4c
stack

TypeError: Cannot read property 'getChildren' of undefined
    at Object.findChildOfKind (tsserver.js:66252:25)
    at createCompletionEntry (tsserver.js:68756:34)
    at getCompletionEntriesFromSymbols (tsserver.js:68803:29)
    at completionInfoFromData (tsserver.js:68708:17)
    at Object.getCompletionsAtPosition (tsserver.js:68643:28)
    at Object.getCompletionsAtPosition (tsserver.js:84590:35)
    at Object.proxy.(anonymous function) [as getCompletionsAtPosition] (index.js:56:33)
    at IOSession.Session.getCompletions (tsserver.js:91577:64)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (tsserver.js:90645:61)
    at unknown (tsserver.js:92067:88)
    at IOSession.Session.executeWithRequestId (tsserver.js:92058:28)
    at IOSession.Session.executeCommand (tsserver.js:92067:33)
    at IOSession.Session.onMessage (tsserver.js:92087:35)
    at Interface.<anonymous> (tsserver.js:93288: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)

@mhegazy mhegazy reopened this Apr 2, 2018
@mhegazy mhegazy modified the milestones: TypeScript 2.8, TypeScript 2.8.2 Apr 2, 2018
@ghost ghost closed this as completed in #23086 Apr 2, 2018
@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue Source: Telemetry The issue relates to the telemetry in editors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants