Home > Blockchain >  VS code remote connection: Cannot read properties of undefined (reading 'replace')
VS code remote connection: Cannot read properties of undefined (reading 'replace')

Time:07-19

VScode Error message

[18:33:55.749] Resolver error: TypeError: Cannot read properties of undefined (reading 'replace')
    at Object.a [as sanitizeConnectionToken] (/Users/username/.vscode/extensions/ms-vscode-remote.remote-ssh-0.84.0/out/extension.js:1:691806)
    at Object.C [as findRunningServer] (/Users/username/.vscode/extensions/ms-vscode-remote.remote-ssh-0.84.0/out/extension.js:1:626542)
    at async /Users/username/.vscode/extensions/ms-vscode-remote.remote-ssh-0.84.0/out/extension.js:1:622510
    at async T (/Users/username/.vscode/extensions/ms-vscode-remote.remote-ssh-0.84.0/out/extension.js:1:619351)
    at async Object.t.resolveWithLocalServer (/Users/username/.vscode/extensions/ms-vscode-remote.remote-ssh-0.84.0/out/extension.js:1:622460)
    at async Object.t.resolve (/Users/username/.vscode/extensions/ms-vscode-remote.remote-ssh-0.84.0/out/extension.js:1:644834)
    at async /Users/username/.vscode/extensions/ms-vscode-remote.remote-ssh-0.84.0/out/extension.js:1:727082
[18:33:55.751] ------

How to reproduce

  • Keep the remote connection in VScode
  • AFK (away from keyboard)
  • When the connection naturally breaks, then retry to connect
  • The error message will occur.

I found that one solution is to remove VScode cache at /Users/username/Library/Application\ Support/Code

But this is definitely not the right way, any one knows the root cause and how to solve it?

CodePudding user response:

I raised up an issue to VScode@github: https://github.com/microsoft/vscode/issues/155380

CodePudding user response:

i have the same problem, fix it by upgrade extension remote ssh version

  • Related