Skip to content
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

TypeScript Server Error (3.7.2) Cannot read property 'symbol' of undefined #84549

Closed
josheplibra opened this issue Nov 12, 2019 · 2 comments
Closed

Comments

@josheplibra
Copy link

josheplibra commented Nov 12, 2019

  • VSCode Version: 1.14.0, 1.39.1
  • OS Version: Windows 10 Pro 1903
  • TypeScript Version: 3.7.2

Steps to Reproduce:

  1. Sometime when I use autocomplete by "Ctrl + Space", the "TypeScript Server Error (3.7.2)
    Cannot read property 'symbol' of undefined" error occurred. After that Typescript autocomplete doesn't work anymore until I restart TS server.

I don't know this error is vscode error or typescript error. So please check. Sorry if I post wrong place.
Thank you!

ERR TypeScript Server Error (3.7.2)
Cannot read property 'symbol' of undefined
TypeError: Cannot read property 'symbol' of undefined
at tsserver.js:106112:69
at Object.forEach (tsserver.js:170:30)
at Object.get (tsserver.js:106105:24)
at getSymbolsFromOtherSourceFileExports (tsserver.js:107235:79)
at getGlobalCompletions (tsserver.js:107064:49)
at tryGetGlobalSymbols (tsserver.js:106976:25)
at getCompletionData (tsserver.js:106756:17)
at Object.getCompletionsAtPosition (tsserver.js:106138:34)
at Object.getCompletionsAtPosition (tsserver.js:130738:35)
at IOSession.Session.getCompletions (tsserver.js:140355:64)
at Session.handlers.ts.createMapFromTemplate._a. (tsserver.js:139335:61)
at tsserver.js:140870:88
at IOSession.Session.executeWithRequestId (tsserver.js:140861:28)
at IOSession.Session.executeCommand (tsserver.js:140870:33)
at IOSession.Session.onMessage (tsserver.js:140893:35)
at Interface. (tsserver.js:142208: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): Error: TypeScript Server Error (3.7.2)
Cannot read property 'symbol' of undefined
TypeError: Cannot read property 'symbol' of undefined
at tsserver.js:106112:69
at Object.forEach (tsserver.js:170:30)
at Object.get (tsserver.js:106105:24)
at getSymbolsFromOtherSourceFileExports (tsserver.js:107235:79)
at getGlobalCompletions (tsserver.js:107064:49)
at tryGetGlobalSymbols (tsserver.js:106976:25)
at getCompletionData (tsserver.js:106756:17)
at Object.getCompletionsAtPosition (tsserver.js:106138:34)
at Object.getCompletionsAtPosition (tsserver.js:130738:35)
at IOSession.Session.getCompletions (tsserver.js:140355:64)
at Session.handlers.ts.createMapFromTemplate._a. (tsserver.js:139335:61)
at tsserver.js:140870:88
at IOSession.Session.executeWithRequestId (tsserver.js:140861:28)
at IOSession.Session.executeCommand (tsserver.js:140870:33)
at IOSession.Session.onMessage (tsserver.js:140893:35)
at Interface. (tsserver.js:142208: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)
at Function.create (c:\Users\Tam\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:63732)
at h.dispatchResponse (c:\Users\Tam\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:56670)
at h.dispatchMessage (c:\Users\Tam\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:55568)
at c:\Users\Tam\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:55044
at l.fire (c:\Users\Tam\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:47:207)
at t.Reader.onLengthData (c:\Users\Tam\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:61946)
at Socket. (c:\Users\Tam\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:61594)
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)

@josheplibra
Copy link
Author

josheplibra commented Nov 12, 2019

At line tsserver.js:106112:69: suggestion.symbol.declarations[0].symbol
suggestion.symbol.declarations[0] is undefined so get symbol throw error
I tried check undefined before get symbol and it work well
Should I report to Typescript?

@josheplibra
Copy link
Author

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant