Skip to content

TSServer crashes 5 times after opening the VS Code Interactive Playground #36681

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
jhony1104 opened this issue Feb 7, 2020 · 4 comments · Fixed by #36722
Closed

TSServer crashes 5 times after opening the VS Code Interactive Playground #36681

jhony1104 opened this issue Feb 7, 2020 · 4 comments · Fixed by #36722
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@jhony1104
Copy link

TSServer crashes 5 times after opening the Interactive Playground.

  • VSCode Version: 1.42.0
  • OS Version: Debian buster (Linux x64 4.19.0-6-amd64)
  • TypeScript Version: 3.8.0-dev.20200206 (ms-vscode.vscode-typescript-next Plugin)

Steps to Reproduce:

  1. Open VS Code
  2. Open interactive playground

The tsserver.log file.

Does this issue occur when all extensions are disabled?: No

Only exists if using the ms-vscode.vscode-typescript-next plugin.

Possible related to microsoft/vscode#85547

@microsoft microsoft deleted a comment from vscodebot bot Feb 7, 2020
@mjbvz
Copy link
Contributor

mjbvz commented Feb 7, 2020

Good find! Moving upstream to TS.

@mjbvz mjbvz transferred this issue from microsoft/vscode Feb 7, 2020
@mjbvz
Copy link
Contributor

mjbvz commented Feb 7, 2020

@RyanCavanaugh We'll need a fix for this before VS Code can ship 3.8. (that can be a 3.8.x recovery build)

@sheetalkamat Here's the stack and call that triggers the error. I suspect this error may have something to do with us sending along the scheme as part of the file name (we've always done this but I seem to recall TS breaking previously due to this):

Err 62    [13:21:32.844] Exception on executing command {"seq":2,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"walkThroughSnippet:/usr/share/code/resources/app/out/vs/workbench/contrib/welcome/walkThrough/browser/editor/^vs_code_editor_walkthrough.md#1.js","fileContent":"const express = require('express');\nconst app = express();\n\napp.get('/',  (req, res) => {\n    res.send(`Hello ${req.}`);\n});\n\napp.listen(3000);","scriptKindName":"JS"}]}}:

    Debug Failure.

    Error: Debug Failure.
        at Object.assertDefined (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:2077:24)
        at ProjectService.updateNonInferredProjectFiles (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:142411:51)
        at ProjectService.addFilesToNonInferredProject (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:142296:22)
        at ProjectService.updateRootAndOptionsOfNonInferredProject (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:142456:22)
        at ProjectService.loadConfiguredProject (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:142382:22)
        at ProjectService.createAndLoadConfiguredProject (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:142319:22)
        at ProjectService.createLoadAndUpdateConfiguredProject (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:142324:36)
        at ProjectService.assignProjectToOpenedScriptInfo (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:143183:44)
        at /home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:143479:107
        at Object.mapDefined (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:562:30)
        at ProjectService.applyChangesInOpenFiles (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:143479:48)
        at Session.handlers.ts.createMapFromTemplate._a.<computed> (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:144343:46)
        at /home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:146086:88
        at IOSession.Session.executeWithRequestId (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:146077:28)
        at IOSession.Session.executeCommand (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:146086:33)
        at IOSession.Session.onMessage (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:146110:35)
        at Interface.<anonymous> (/home/jhony1104/.vscode/extensions/ms-vscode.vscode-typescript-next-3.8.20200206/node_modules/typescript/lib/tsserver.js:147425:27)

@mjbvz mjbvz removed their assignment Feb 7, 2020
@mjbvz mjbvz changed the title TSServer crashes 5 times after opening the Interactive Playground TSServer crashes 5 times after opening the VS Code Interactive Playground Feb 7, 2020
@sheetalkamat
Copy link
Member

@mjbvz #36109 removed the check (to fix #35734) that the basefile name starting with ^ is dynamic since disk can have file name that starts with ^. #36240 slightly modified this check for untitled files.

The walkthrough path in the log does not satisfy this current check of dynamic file.. https://github.com/microsoft/TypeScript/blob/master/src/server/scriptInfo.ts#L274
I am not sure if we should add if additional check if filename starts with walkThroughSnippet:/ and has baseFileName starting with ^ a good check to add to that.. especially can such path exist on disk (I am guessing yes if windows drive letter is walkThroughSnippet`

@mjbvz
Copy link
Contributor

mjbvz commented Feb 8, 2020

I think hardcoding a check for walkThroughSnippet:/ would be a fairly safe workaround.


Note that vscode can also have untitled file paths that look like: untitled:/Users/matb/projects/san/^newFile.js which I'm not sure #36240 fixes

Also, longer term, should we perhaps look into having VS Code pass a isDynamic property on the file request instead of modifying the file names to indicate this?

@sheetalkamat sheetalkamat added Bug A bug in TypeScript Fix Available A PR has been opened for this issue labels Feb 10, 2020
sheetalkamat added a commit that referenced this issue Feb 10, 2020
Handle walkThroughSnippet:/ and untitled:/ as dynamic files
Fixes #36681
sheetalkamat added a commit that referenced this issue Feb 12, 2020
Handle walkThroughSnippet:/ and untitled:/ as dynamic files
Fixes #36681
sheetalkamat added a commit that referenced this issue Feb 12, 2020
…#36760)

Handle walkThroughSnippet:/ and untitled:/ as dynamic files
Fixes #36681
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants