TypeScript: Language service frequently stops in these days
Language service warns wrong errors based on old code and I have to restart language service.
TypeScript Version: 3.4.0-dev.20190817
VSCode 1.37.1
[2019-08-18 01:55:51.644] [exthost] [error] Error: <semantic> TypeScript Server Error (3.7.0-dev.20190817)
Not supported
Error: Not supported
at Object.get yieldType [as yieldType] (tsserver.js:32546:37)
at getIteratedTypeOrElementType (tsserver.js:57722:61)
at getContextualTypeForElementExpression (tsserver.js:49558:20)
at checkArrayLiteral (tsserver.js:50019:49)
at checkExpressionWorker (tsserver.js:55222:28)
at checkExpression (tsserver.js:55147:38)
at checkFunctionExpressionOrObjectLiteralMethodDeferred (tsserver.js:53886:36)
at checkDeferredNode (tsserver.js:59994:21)
at Map.forEach (<anonymous>)
at checkDeferredNodes (tsserver.js:59982:37)
at checkSourceFileWorker (tsserver.js:60044:17)
at checkSourceFile (tsserver.js:60014:13)
at getDiagnosticsWorker (tsserver.js:60089:17)
at Object.getDiagnostics (tsserver.js:60075:24)
at isMissingAwaitError (tsserver.js:116089:39)
at getAwaitableExpression (tsserver.js:116110:20)
at Object.getCodeActions (tsserver.js:116050:34)
at tsserver.js:115926:121
at Object.flatMap (tsserver.js:583:25)
at Object.getFixes (tsserver.js:115926:23)
at tsserver.js:125977:35
at Object.flatMap (tsserver.js:583:25)
at Object.getCodeFixesAtPosition (tsserver.js:125975:23)
at IOSession.Session.getCodeFixes (tsserver.js:135174:64)
at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (tsserver.js:133961:61)
at tsserver.js:135367:88
at IOSession.Session.executeWithRequestId (tsserver.js:135358:28)
at IOSession.Session.executeCommand (tsserver.js:135367:33)
at IOSession.Session.onMessage (tsserver.js:135390:35)
at Interface.<anonymous> (tsserver.js:136705:27)
at Interface.emit (events.js:182:13)
at Interface._onLine (readline.js:290:10)
at Interface._normalWrite (readline.js:433:12)
at Socket.ondata (readline.js:149:10)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
at Function.create (c:\Users\\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:63463)
at h.dispatchResponse (c:\Users\\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:56618)
at h.dispatchMessage (c:\Users\\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:55516)
at constructor._reader.onData.e (c:\Users\\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:54992)
at u.fire (c:\Users\\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:50:207)
at t.Reader.onLengthData (c:\Users\\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:61683)
at Socket.t.Reader.constructor.e.on.e (c:\Users\\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\typescript-language-features\dist\extension.js:53:61331)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
[2019-08-17 16:27:42.203] [exthost] [error] Error: DisposableStore is missing...
at R._convertCompletionItem (c:\Users\\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:563:173)
at define.resolveCompletionItem.o.asPromise.then.e (c:\Users\\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:562:707)
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 26 (24 by maintainers)
@rbuckton This bug has certainly appeared again. Do you have any info?
No, I have not been able to reproduce this even when simulating a heavy load on my machine to see if it might be related to some kind of out-of-sync cache timing issue. Would you be able to send us a tsserver log?
To enable tsserver logging, add the following to
.vscode/settings.json:Once enabled, restart VS Code and open the Output Pane (usually Ctrl+Shift+U) and switch to the TypeScript output log:
In the TypeScript Output Pane you should see something like the following:
Once you are sure the server logs are being generated, reproduce the scenario in question. You should then be able to send us the files from the paths listed in the output log. Please review the files before sending them as verbose logging can include possibly sensitive information such as local paths.
Hopefully the additional context provided by the logs will help us to narrow down the cause.
I upgraded last week to 3.8.x and I saw some stale errors as well. Not sure if the are triggered by the same problem. I will see if I can distill some steps.
I found a repro! This is reproducible on both Ubuntu 18.04 and Win10.
npm icode --disable-extensions./src/util/figure.tsretreturnto appear in the suggestions and typettt...immediately! this is very important.treturnagainreturnby choosing the suggestedreturn