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

Failed to connect to the remote extension host server (Error: Cannot resolve authority) #150169

Closed
killshot13 opened this issue May 23, 2022 · 10 comments
Assignees
Labels
*not-reproducible Issue cannot be reproduced by VS Code Team member as described

Comments

@killshot13
Copy link

killshot13 commented May 23, 2022

Issue Type: Bug

Scenario: Reviewing/editing user-level VSCode settings in the settings.json file (C:\Users\%USERPROFILE%\AppData\Roaming\Code\User\settings.json) from within a WSL window.
Possibly related to #135021

Steps to Reproduce:

  1. Open settings.json and make some edits without saving them.
  2. Open Extensions in the primary sidebar.
  3. Find and install a new extension that "Requires Reload" after installing.
  4. Without saving the settings.json file, click Requires Reload and let the window reload.
  5. Wait until you see the pop-up stating, "Could not automatically save because the file's contents are newer."
    ReviewOverwrite
  6. Overwrite the file by selecting the option in the pop-up.
  7. Wait until you see the model stating "Lost connection to host server."
    WaitClose & Reopen/Reload
  8. Force reopen the WSL window by selecting the reopen/reload option in the model.

Actual Results: Lower left-hand corner displays ⚠️ Disconnected from WSL, and a pop-up in the lower right-hand corner reads as follows.

Failed to connect to the remote extension host server (Error: Cannot resolve authority)

Expected: VSCode reopens after (presumably) saving the changes to the setting.json file. The new WSL window renders based on the latest changes made to the user settings.

VS Code version: Code 1.67.2 (c3511e6, 2022-05-17T18:15:52.058Z)
OS version: Windows_NT x64 10.0.22621
Restricted Mode: Yes

Extensions: none

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550

devtools-console-main-error-feed(2)
devtools-console-main-error-feed
editor_view
preload-fetch-error-invalid-channel

@sjohnsonaz
Copy link

I'm getting a similar error. It's not consistent, as I can open folders in WSL, and I can open some workspaces without issue. But one particular workspace causes the error:

Failed to connect to the remote extension host server (Error: Handler already set!)

@killshot13
Copy link
Author

I've only been able to reproduce my bug twice. Both times I was inside of a workspace, so that may have been a contributing factor. Good I had not thought of that before.

However I know there are other workspace related issues; the File Watcher constantly loses focus within an open workspace, for example, so its definitely worth looking into.

I'll attempt to repro with just a regular folder open vs a workspace if I get the chance.

@sjohnsonaz
Copy link

I figured it out. I receive Error: Handler already set! when I have the Call Stack placed inside the Secondary Side Bar. If I move the Call Stack back to its original location, everything works correctly.

@aeschli
Copy link
Contributor

aeschli commented Jun 1, 2022

Good catch! I can reproduce by opening a remote window, putting the Call Stack in the secondary side bar and reload.

  ERR Handler already set!: Error: Handler already set!
    at m.setHandler (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1704:26222)
    at v.registerListeners (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1759:18461)
    at new v (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1759:17732)
    at S._createInstance (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:594:1332)
    at S.createInstance (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:594:773)
    at new J (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2161:60479)
    at S._createInstance (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:594:1332)
    at vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:594:3508
    at W._executor (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:71:20675)
    at W.get value [as value] (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:71:20872)
    at Object.get (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:594:3609)
    at $.renderBody (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2158:9888)
    at $.render (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:219:18106)
    at $.render (vscode-file://vscode-app/c:/Users/martinae/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2117:29001)
    at P.onDidAddViewDescriptors (vscode-file://vscode-

@aeschli aeschli assigned sbatten and unassigned aeschli Jun 1, 2022
@roblourens
Copy link
Member

I suspect this is the same as #148593, cool

@roblourens
Copy link
Member

roblourens commented Jun 1, 2022

I don't know why a remote window is necessary, but I see it too. First a DebugService is created by the DisassemblyView. It gets instantiated lazily when it is accessed. Then a second one is created by CallStackView. I don't know why it doesn't get the same one that was already created.

edit - also am sometimes able to repro in a local window

@Fasteroid
Copy link

This seems to also happen for me whenever I try to remote SSH into my server with a local window open. Weird.

@sbatten
Copy link
Member

sbatten commented Dec 10, 2022

I believe this issue no longer reproduces in latest insiders.

@sbatten sbatten closed this as completed Dec 10, 2022
@sbatten sbatten added the *not-reproducible Issue cannot be reproduced by VS Code Team member as described label Dec 10, 2022
@elranu
Copy link

elranu commented Jan 11, 2023

This seems to also happen for me whenever I try to remote SSH into my server with a local window open. Weird.

It happens all the time with remote shh tom me :(

Any news how to fix it?

@sbatten
Copy link
Member

sbatten commented Jan 11, 2023

@elranu are you using the latest insiders?

@github-actions github-actions bot locked and limited conversation to collaborators Jan 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*not-reproducible Issue cannot be reproduced by VS Code Team member as described
Projects
None yet
Development

No branches or pull requests

8 participants