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

Remote WSL 0.63.11 'Failed to connect to the remote extension host server' #6067

Closed
aeschli opened this issue Dec 15, 2021 · 38 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verification-needed Verification of issue is requested verified Verification succeeded wsl Issue in vscode-remote WSL
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Dec 15, 2021

Hi I've just updated docker desktop and vscode
and I'm getting
Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)

not sure what is the WSL log but here is the content of show log as explained above
the first time I've got:

[2021-12-14 21:37:54.132] Resolving wsl+Ubuntu-20.04, resolveAttempt: 1
[2021-12-14 21:37:54.166] Starting VS Code Server inside WSL (wsl2)
[2021-12-14 21:37:54.166] Extension version: 0.63.11
[2021-12-14 21:37:54.166] Windows build: 19044. Multi distro support: available. WSL path support: enabled
[2021-12-14 21:37:54.242] Using shell environment from invoking shell: /tmp/vscode-distro-env.fFsPqO
[2021-12-14 21:37:54.387] Connecting to daemon started by other Remote-WSL window... 4.19.104-microsoft-standard Ubuntu-20.04
[2021-12-14 21:37:54.387] WSL resolver response: 127.0.0.1:62295
[2021-12-14 21:37:54.387] To debug connection issues, open a local browser on http://127.0.0.1:62295/version
[2021-12-14 21:37:54.387] Using 'wslExeProxy' to connect to the VS Code server as configured by setting 'remote.WSL2.connectionMethod'
[2021-12-14 21:37:54.387] 'wslExeProxy' should fix reconnection issues after sleep and network adapter changes.
[2021-12-14 21:37:54.387] Please report issues related with the new setting to https://github.com/microsoft/vscode-remote-release/issues/5894
[2021-12-14 21:37:54.387] To revert back to the old way of connecting, change setting 'remote.WSL2.connectionMethod' to 'wsl2VMAddress'.

the second time I've run the commend I got

vironment: Looking for /home/bentz/.vscode-server/server-env-setup. Not found.
[2021-12-14 21:37:52.946] WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2021-12-14 21:37:52.946] WSL-shell-PID: 540
[2021-12-14 21:37:52.946] Node executable: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node
[2021-12-14 21:37:52.946] Starting server: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret= --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression
[2021-12-14 21:37:52.946] 
[2021-12-14 21:37:52.946] 
[2021-12-14 21:37:52.946] *
[2021-12-14 21:37:52.946] * Visual Studio Code Server
[2021-12-14 21:37:52.946] *
[2021-12-14 21:37:52.946] * Reminder: You may only use this software with Visual Studio family products,
[2021-12-14 21:37:52.946] * as described in the license https://aka.ms/vscode-remote/license
[2021-12-14 21:37:52.946] *
[2021-12-14 21:37:52.946] 
[2021-12-14 21:37:52.946] Extension host agent listening on 38115
[2021-12-14 21:37:52.946] 
[2021-12-14 21:37:52.946] [23:37:52] Extension host agent started.
[2021-12-14 21:37:52.955] Started local proxy server on 62295.
[2021-12-14 21:37:52.955] WSL resolver response: 127.0.0.1:62295
[2021-12-14 21:37:52.955] To debug connection issues, open a local browser on http://127.0.0.1:62295/version
[2021-12-14 21:37:52.955] Using 'wslExeProxy' to connect to the VS Code server as configured by setting 'remote.WSL2.connectionMethod'
[2021-12-14 21:37:52.955] 'wslExeProxy' should fix reconnection issues after sleep and network adapter changes.
[2021-12-14 21:37:52.955] Please report issues related with the new setting to https://github.com/microsoft/vscode-remote-release/issues/5894
[2021-12-14 21:37:52.955] To revert back to the old way of connecting, change setting 'remote.WSL2.connectionMethod' to 'wsl2VMAddress'.

and the content of wsl.exe --list --verbose

NAME                   STATE           VERSION
* Ubuntu-20.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2

Originally posted by @Bentzeh in #6031 (comment)

@aeschli aeschli self-assigned this Dec 15, 2021
@aeschli aeschli added bug Issue identified by VS Code Team member as probable bug wsl Issue in vscode-remote WSL labels Dec 15, 2021
@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

@aeschli
i usually open two instances of vscode
when invoking 'show log'
on one instance im getting:

[2021-12-15 09:20:02.194] Resolving wsl+Ubuntu-20.04, resolveAttempt: 1
[2021-12-15 09:20:02.239] Starting VS Code Server inside WSL (wsl2)
[2021-12-15 09:20:02.239] Extension version: 0.63.11
[2021-12-15 09:20:02.239] Windows build: 19044. Multi distro support: available. WSL path support: enabled
[2021-12-15 09:20:02.332] Using shell environment from invoking shell: /tmp/vscode-distro-env.tOYrGo
[2021-12-15 09:20:02.427] Connecting to daemon started by other Remote-WSL window... 4.19.104-microsoft-standard Ubuntu-20.04
[2021-12-15 09:20:02.427] WSL resolver response: 127.0.0.1:63268
[2021-12-15 09:20:02.427] To debug connection issues, open a local browser on http://127.0.0.1:63268/version
[2021-12-15 09:20:02.427] Using 'wslExeProxy' to connect to the VS Code server as configured by setting 'remote.WSL2.connectionMethod'
[2021-12-15 09:20:02.427] 'wslExeProxy' should fix reconnection issues after sleep and network adapter changes.
[2021-12-15 09:20:02.427] Please report issues related with the new setting to https://github.com/microsoft/vscode-remote-release/issues/5894
[2021-12-15 09:20:02.427] To revert back to the old way of connecting, change setting 'remote.WSL2.connectionMethod' to 'wsl2VMAddress'.

and on the other:

nment: Looking for /home/bentz/.vscode-server/server-env-setup. Not found.
[2021-12-15 09:20:00.902] WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2021-12-15 09:20:00.902] WSL-shell-PID: 2879
[2021-12-15 09:20:00.902] Node executable: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node
[2021-12-15 09:20:00.902] Starting server: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret=/home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-2879-1639560000.token --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression
[2021-12-15 09:20:00.902] 
[2021-12-15 09:20:00.902] 
[2021-12-15 09:20:00.902] *
[2021-12-15 09:20:00.902] * Visual Studio Code Server
[2021-12-15 09:20:00.902] *
[2021-12-15 09:20:00.902] * Reminder: You may only use this software with Visual Studio family products,
[2021-12-15 09:20:00.902] * as described in the license https://aka.ms/vscode-remote/license
[2021-12-15 09:20:00.902] *
[2021-12-15 09:20:00.902] 
[2021-12-15 09:20:00.902] Extension host agent listening on 46867
[2021-12-15 09:20:00.902] 
[2021-12-15 09:20:00.902] [11:20:00] Extension host agent started.
[2021-12-15 09:20:00.913] Started local proxy server on 63268.
[2021-12-15 09:20:00.913] WSL resolver response: 127.0.0.1:63268
[2021-12-15 09:20:00.913] To debug connection issues, open a local browser on http://127.0.0.1:63268/version
[2021-12-15 09:20:00.913] Using 'wslExeProxy' to connect to the VS Code server as configured by setting 'remote.WSL2.connectionMethod'
[2021-12-15 09:20:00.913] 'wslExeProxy' should fix reconnection issues after sleep and network adapter changes.
[2021-12-15 09:20:00.913] Please report issues related with the new setting to https://github.com/microsoft/vscode-remote-release/issues/5894
[2021-12-15 09:20:00.913] To revert back to the old way of connecting, change setting 'remote.WSL2.connectionMethod' to 'wsl2VMAddress'.

im not getting any more content

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

@Bentzeh I see a problem in the log: ' --connection-secret=`

To get more logging, can you add the setting "remote.WSL.debug": true. Close all VS Code windows and reopen after a few seconds. Th WSL log will have lots of output then. If you can attach it here that would be very helpful.

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

The second log is the interesting one (The one that starts the server). As you see it starts in the middle of the line. There should be more logging before that.

Now I see that --connection-secret= is defined ( --connection-secret=/home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-2879-1639560000.token)

Do you still see the issue?

@danw-mpl
Copy link

I'm getting what I presume is related. Same version 0.63.11.

  • A UI pop up with Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)
  • Slightly different WSL log output: Using 'localhost' to connect to the VS Code server as configured by setting 'remote.WSL1.connectionMethod' even though I'm using WSL2 (Ubuntu 20.04)
  • The --connection-secret flag value is set.

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

regarding --connection-secret= i think i just screwed up the copy-paste last night since I see it now in the logs
sorry if that mislead you

i'm still experiencing the issue.

this is the content of the terminal after i added "remote.WSL.debug": true to the user settings and reopened vscode

[2021-12-15 09:27:22.107] Resolving wsl+ubuntu-20.04, resolveAttempt: 1
[2021-12-15 09:27:22.142] Starting VS Code Server inside WSL (wsl2)
[2021-12-15 09:27:22.142] Extension version: 0.63.11
[2021-12-15 09:27:22.142] Windows build: 19044. Multi distro support: available. WSL path support: enabled
[2021-12-15 09:27:22.142] No shell environment set or found for current distro.
[2021-12-15 09:27:22.233] WSL daemon log file: c:\Users\Bentz\AppData\Roaming\Code\logs\20211215T112720\exthost1\ms-vscode-remote.remote-wsl\wsl-daemon-20211215T092722.log
[2021-12-15 09:27:22.234] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e sh -c "[ -d ~/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2021-12-15 09:27:22.332] Probing result: found
[2021-12-15 09:27:22.332] Server install found in WSL
[2021-12-15 09:27:22.332] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 sh -c 'env && VSCODE_WSL_DEBUG_INFO=true "$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" fe719cd3e5825bf14e14182fddeb88ee8daf044f stable .vscode-server 137691986611 --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --log=trace', cwd: undefined, env: {
[2021-12-15 09:27:22.332]   "ALLUSERSPROFILE": "C:\\ProgramData",
[2021-12-15 09:27:22.332]   "APPDATA": "C:\\Users\\Bentz\\AppData\\Roaming",
[2021-12-15 09:27:22.332]   "ChocolateyInstall": "C:\\ProgramData\\chocolatey",
[2021-12-15 09:27:22.332]   "ChocolateyLastPathUpdate": "132401569696276449",
[2021-12-15 09:27:22.332]   "CHROME_CRASHPAD_PIPE_NAME": "\\\\.\\pipe\\crashpad_20356_DHOLBRLMZAUFKYTA",
[2021-12-15 09:27:22.332]   "CommonProgramFiles": "C:\\Program Files\\Common Files",
[2021-12-15 09:27:22.332]   "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
[2021-12-15 09:27:22.332]   "CommonProgramW6432": "C:\\Program Files\\Common Files",
[2021-12-15 09:27:22.332]   "COMPUTERNAME": "BENTZ",
[2021-12-15 09:27:22.332]   "ComSpec": "C:\\WINDOWS\\system32\\cmd.exe",
[2021-12-15 09:27:22.332]   "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
[2021-12-15 09:27:22.332]   "FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer",
[2021-12-15 09:27:22.332]   "FPS_BROWSER_USER_PROFILE_STRING": "Default",
[2021-12-15 09:27:22.332]   "GRAALVM_HOME": "C:\\Program Files\\GraalVM\\graalvm-ce-java11-20.1.0",
[2021-12-15 09:27:22.332]   "HOMEDRIVE": "C:",
[2021-12-15 09:27:22.332]   "HOMEPATH": "\\Users\\Bentz",
[2021-12-15 09:27:22.332]   "IntelliJ IDEA Community Edition": "C:\\Program Files\\JetBrains\\IntelliJ IDEA Community Edition 2020.1.3\\bin;",
[2021-12-15 09:27:22.332]   "JAVA_HOME": "C:\\Program Files\\AdoptOpenJDK\\jdk-11.0.7.10-hotspot",
[2021-12-15 09:27:22.332]   "LOCALAPPDATA": "C:\\Users\\Bentz\\AppData\\Local",
[2021-12-15 09:27:22.332]   "LOGONSERVER": "\\\\BENTZ",
[2021-12-15 09:27:22.332]   "NUMBER_OF_PROCESSORS": "8",
[2021-12-15 09:27:22.332]   "OneDrive": "C:\\Users\\Bentz\\OneDrive",
[2021-12-15 09:27:22.332]   "OneDriveConsumer": "C:\\Users\\Bentz\\OneDrive",
[2021-12-15 09:27:22.332]   "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
[2021-12-15 09:27:22.332]   "OS": "Windows_NT",
[2021-12-15 09:27:22.332]   "Path": "C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\CLI2\\wbin;C:\\Python38\\Scripts\\;C:\\Python38\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\nodejs;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\AdoptOpenJDK\\jdk-11.0.7.10-hotspot\\bin;C:\\Program Files (x86)\\Yarn\\bin\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\nodejs\\;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\ProgramData\\DockerDesktop\\version-bin;C:\\Users\\Bentz\\AppData\\Local\\Microsoft\\WindowsApps;;C:\\Users\\Bentz\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Program Files\\JetBrains\\IntelliJ IDEA Community Edition 2020.1.3\\bin;;C:\\Users\\Bentz\\AppData\\Local\\Yarn\\bin;C:\\Users\\Bentz\\AppData\\Roaming\\npm;C:\\Program Files\\JetBrains\\PyCharm Community Edition 2020.3.2\\bin;",
[2021-12-15 09:27:22.332]   "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW",
[2021-12-15 09:27:22.332]   "PROCESSOR_ARCHITECTURE": "AMD64",
[2021-12-15 09:27:22.332]   "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 158 Stepping 13, GenuineIntel",
[2021-12-15 09:27:22.332]   "PROCESSOR_LEVEL": "6",
[2021-12-15 09:27:22.332]   "PROCESSOR_REVISION": "9e0d",
[2021-12-15 09:27:22.332]   "ProgramData": "C:\\ProgramData",
[2021-12-15 09:27:22.332]   "ProgramFiles": "C:\\Program Files",
[2021-12-15 09:27:22.332]   "ProgramFiles(x86)": "C:\\Program Files (x86)",
[2021-12-15 09:27:22.332]   "ProgramW6432": "C:\\Program Files",
[2021-12-15 09:27:22.332]   "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\WINDOWS\\system32\\WindowsPowerShell\\v1.0\\Modules",
[2021-12-15 09:27:22.332]   "PUBLIC": "C:\\Users\\Public",
[2021-12-15 09:27:22.332]   "PyCharm Community Edition": "C:\\Program Files\\JetBrains\\PyCharm Community Edition 2020.3.2\\bin;",
[2021-12-15 09:27:22.332]   "SESSIONNAME": "Console",
[2021-12-15 09:27:22.332]   "SystemDrive": "C:",
[2021-12-15 09:27:22.332]   "SystemRoot": "C:\\WINDOWS",
[2021-12-15 09:27:22.332]   "TEMP": "C:\\Users\\Bentz\\AppData\\Local\\Temp",
[2021-12-15 09:27:22.332]   "TMP": "C:\\Users\\Bentz\\AppData\\Local\\Temp",
[2021-12-15 09:27:22.332]   "USERDOMAIN": "BENTZ",
[2021-12-15 09:27:22.332]   "USERDOMAIN_ROAMINGPROFILE": "BENTZ",
[2021-12-15 09:27:22.332]   "USERNAME": "Bentz",
[2021-12-15 09:27:22.332]   "USERPROFILE": "C:\\Users\\Bentz",
[2021-12-15 09:27:22.332]   "windir": "C:\\WINDOWS",
[2021-12-15 09:27:22.332]   "WSLENV": "VSCODE_WSL_EXT_LOCATION/up:JAVA_HOME/p",
[2021-12-15 09:27:22.332]   "VSCODE_WSL_EXT_LOCATION": "c:\\Users\\Bentz\\.vscode\\extensions\\ms-vscode-remote.remote-wsl-0.63.11"
[2021-12-15 09:27:22.332] }
[2021-12-15 09:27:22.532] USER=bentz
[2021-12-15 09:27:22.532] VSCODE_WSL_EXT_LOCATION=/mnt/c/Users/Bentz/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.11
[2021-12-15 09:27:22.532] SHLVL=0
[2021-12-15 09:27:22.532] HOME=/home/bentz
[2021-12-15 09:27:22.532] OLDPWD=/mnt/c/Users/Bentz/AppData/Local/Programs/Microsoft VS Code
[2021-12-15 09:27:22.532] WSL_DISTRO_NAME=Ubuntu-20.04
[2021-12-15 09:27:22.532] LOGNAME=bentz
[2021-12-15 09:27:22.532] WSL_INTEROP=/run/WSL/3267_interop
[2021-12-15 09:27:22.532] NAME=Bentz
[2021-12-15 09:27:22.533] _=/usr/bin/sh
[2021-12-15 09:27:22.533] TERM=xterm-256color
[2021-12-15 09:27:22.533] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/mnt/c/Python38/Scripts/:/mnt/c/Python38/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/nodejs:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/AdoptOpenJDK/jdk-11.0.7.10-hotspot/bin:/mnt/c/Program Files (x86)/Yarn/bin/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/Bentz/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Bentz/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Program Files/JetBrains/IntelliJ IDEA Community Edition 2020.1.3/bin:/mnt/c/Users/Bentz/AppData/Local/Yarn/bin:/mnt/c/Users/Bentz/AppData/Roaming/npm:/mnt/c/Program Files/JetBrains/PyCharm Community Edition 2020.3.2/bin
[2021-12-15 09:27:22.533] LANG=C.UTF-8
[2021-12-15 09:27:22.533] SHELL=/usr/bin/zsh
[2021-12-15 09:27:22.533] JAVA_HOME=/mnt/c/Program Files/AdoptOpenJDK/jdk-11.0.7.10-hotspot
[2021-12-15 09:27:22.533] PWD=/mnt/c/Users/Bentz/AppData/Local/Programs/Microsoft VS Code
[2021-12-15 09:27:22.533] HOSTTYPE=x86_64
[2021-12-15 09:27:22.533] WSLENV=VSCODE_WSL_EXT_LOCATION/up:JAVA_HOME/p
[2021-12-15 09:27:22.533] Setting up server environment: Looking for /home/bentz/.vscode-server/server-env-setup. Not found.
[2021-12-15 09:27:22.533] WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2021-12-15 09:27:22.533] WSL-shell-PID: 3270
[2021-12-15 09:27:22.533] Node executable: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node
[2021-12-15 09:27:22.533] Starting server: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret=/home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-3270-1639560442.token --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --log=trace
[2021-12-15 09:27:22.533] 
[2021-12-15 09:27:22.533] 
[2021-12-15 09:27:22.533] *
[2021-12-15 09:27:22.533] * Visual Studio Code Server
[2021-12-15 09:27:22.533] *
[2021-12-15 09:27:22.533] * Reminder: You may only use this software with Visual Studio family products,
[2021-12-15 09:27:22.533] * as described in the license https://aka.ms/vscode-remote/license
[2021-12-15 09:27:22.533] *
[2021-12-15 09:27:22.533] 
[2021-12-15 09:27:22.533] Extension host agent listening on 39805
[2021-12-15 09:27:22.533] 
[2021-12-15 09:27:22.533] [11:27:22] Extension host agent started.
[2021-12-15 09:27:22.533] [11:27:22] Started scanning user extensions
[2021-12-15 09:27:22.533] [11:27:22] resolveShellEnv(): running (macOS/Linux)
[2021-12-15 09:27:22.533] [11:27:22] getUnixShellEnvironment#runAsNode undefined
[2021-12-15 09:27:22.533] [11:27:22] getUnixShellEnvironment#noAttach undefined
[2021-12-15 09:27:22.533] [11:27:22] getUnixShellEnvironment#env {
[2021-12-15 09:27:22.533]   USER: 'bentz',
[2021-12-15 09:27:22.533]   VSCODE_WSL_EXT_LOCATION: '/mnt/c/Users/Bentz/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.11',
[2021-12-15 09:27:22.533]   SHLVL: '0',
[2021-12-15 09:27:22.533]   HOME: '/home/bentz',
[2021-12-15 09:27:22.533]   OLDPWD: '/mnt/c/Users/Bentz/AppData/Local/Programs/Microsoft VS Code',
[2021-12-15 09:27:22.533]   WSL_DISTRO_NAME: 'Ubuntu-20.04',
[2021-12-15 09:27:22.533]   LOGNAME: 'bentz',
[2021-12-15 09:27:22.533]   VSCODE_WSL_DEBUG_INFO: 'true',
[2021-12-15 09:27:22.533]   WSL_INTEROP: '/run/WSL/3267_interop',
[2021-12-15 09:27:22.533]   NAME: 'Bentz',
[2021-12-15 09:27:22.533]   _: '/usr/bin/sh',
[2021-12-15 09:27:22.533]   TERM: 'xterm-256color',
[2021-12-15 09:27:22.533]   PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/mnt/c/Python38/Scripts/:/mnt/c/Python38/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/nodejs:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/AdoptOpenJDK/jdk-11.0.7.10-hotspot/bin:/mnt/c/Program Files (x86)/Yarn/bin/:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/Bentz/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Bentz/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Program Files/JetBrains/IntelliJ IDEA Community Edition 2020.1.3/bin:/mnt/c/Users/Bentz/AppData/Local/Yarn/bin:/mnt/c/Users/Bentz/AppData/Roaming/npm:/mnt/c/Program Files/JetBrains/PyCharm Community Edition 2020.3.2/bin',
[2021-12-15 09:27:22.533]   VSCODE_AGENT_FOLDER: '/home/bentz/.vscode-server',
[2021-12-15 09:27:22.533]   LANG: 'C.UTF-8',
[2021-12-15 09:27:22.533]   SHELL: '/usr/bin/zsh',
[2021-12-15 09:27:22.533]   JAVA_HOME: '/mnt/c/Program Files/AdoptOpenJDK/jdk-11.0.7.10-hotspot',
[2021-12-15 09:27:22.533]   PWD: '/mnt/c/Users/Bentz/AppData/Local/Programs/Microsoft VS Code',
[2021-12-15 09:27:22.533]   HOSTTYPE: 'x86_64',
[2021-12-15 09:27:22.533]   WSLENV: 'VSCODE_WSL_EXT_LOCATION/up:JAVA_HOME/p',
[2021-12-15 09:27:22.533]   VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH: '/home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/remote/node_modules',
[2021-12-15 09:27:22.533]   VSCODE_CWD: '/mnt/c/Users/Bentz/AppData/Local/Programs/Microsoft VS Code',
[2021-12-15 09:27:22.533]   ELECTRON_RUN_AS_NODE: '1',
[2021-12-15 09:27:22.533]   ELECTRON_NO_ATTACH_CONSOLE: '1'
[2021-12-15 09:27:22.533] }
[2021-12-15 09:27:22.543] + [ ! -d /home/bentz/.vscode-server ]
[2021-12-15 09:27:22.543] + CODE_PROFILE=/home/bentz/.vscode-server/server-env-setup
[2021-12-15 09:27:22.543] + printf Setting up server environment: Looking for %s.  /home/bentz/.vscode-server/server-env-setup
[2021-12-15 09:27:22.543] + [ -f /home/bentz/.vscode-server/server-env-setup ]
[2021-12-15 09:27:22.543] + echo Not found.
[2021-12-15 09:27:22.543] + VSCODE_REMOTE_BIN=/home/bentz/.vscode-server/bin
[2021-12-15 09:27:22.543] + uname -r
[2021-12-15 09:27:22.543] + WSL_VERSION=4.19.104-microsoft-standard
[2021-12-15 09:27:22.543] + echo WSL version: 4.19.104-microsoft-standard Ubuntu-20.04
[2021-12-15 09:27:22.543] + dirname /mnt/c/Users/Bentz/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.11/scripts/wslServer.sh
[2021-12-15 09:27:22.543] + /mnt/c/Users/Bentz/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.11/scripts/wslDownload.sh fe719cd3e5825bf14e14182fddeb88ee8daf044f stable /home/bentz/.vscode-server/bin
[2021-12-15 09:27:22.543] + [ ! -d /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f ]
[2021-12-15 09:27:22.543] + RC=0
[2021-12-15 09:27:22.543] + [ 0 -ne 0 ]
[2021-12-15 09:27:22.543] + date +%s
[2021-12-15 09:27:22.543] + TOKEN_FILE_PATH=/home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-3270-1639560442.token
[2021-12-15 09:27:22.543] + echo 137691986611
[2021-12-15 09:27:22.543] + echo WSL-shell-PID: 3270
[2021-12-15 09:27:22.543] + echo Node executable: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node
[2021-12-15 09:27:22.543] + echo Starting server: /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret=/home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-3270-1639560442.token --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --log=trace
[2021-12-15 09:27:22.543] + [ -f /etc/alpine-release ]
[2021-12-15 09:27:22.543] + uname -m
[2021-12-15 09:27:22.543] + [ x86_64 = aarch64 ]
[2021-12-15 09:27:22.543] + export VSCODE_AGENT_FOLDER=/home/bentz/.vscode-server
[2021-12-15 09:27:22.543] + /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret=/home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-3270-1639560442.token --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --log=trace
[2021-12-15 09:27:22.544] Started local proxy server on 58478.
[2021-12-15 09:27:22.544] WSL resolver response: 127.0.0.1:58478
[2021-12-15 09:27:22.544] To debug connection issues, open a local browser on http://127.0.0.1:58478/version
[2021-12-15 09:27:22.544] Using 'wslExeProxy' to connect to the VS Code server as configured by setting 'remote.WSL2.connectionMethod'
[2021-12-15 09:27:22.544] 'wslExeProxy' should fix reconnection issues after sleep and network adapter changes.
[2021-12-15 09:27:22.544] Please report issues related with the new setting to https://github.com/microsoft/vscode-remote-release/issues/5894
[2021-12-15 09:27:22.544] To revert back to the old way of connecting, change setting 'remote.WSL2.connectionMethod' to 'wsl2VMAddress'.
[2021-12-15 09:27:22.544] No extension host environment set
[2021-12-15 09:27:22.579] Using executable (0) to forward requests from local 58478 to remote 39805
[2021-12-15 09:27:22.579] Exec 0: C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node -e  const net = require('net'); process.stdin.pause(); const client = net.createConnection({ port: 39805 }, () => { client.pipe(process.stdout); process.stdin.pipe(client); }); client.on('close', function (hadError) { console.error(hadError ? 'Remote close with error' : 'Remote close'); process.exit(hadError ? 1 : 0); }); client.on('error', function (err) { process.stderr.write(err && (err.stack || err.message) || String(err)); });
[2021-12-15 09:27:22.645] Exec (0) stderr: Error: connect ECONNREFUSED ::1:39805
[2021-12-15 09:27:22.645]     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
[2021-12-15 09:27:22.646] Exec (0) stderr: Remote close with error
[2021-12-15 09:27:22.661] Exec (0) has terminated  with code 1 and signal null.
[2021-12-15 09:27:22.661] Exec (0): Local close
[2021-12-15 09:27:22.662] Terminating exec 0
[2021-12-15 09:27:22.672] Using executable (1) to forward requests from local 58478 to remote 39805
[2021-12-15 09:27:22.672] Exec 1: C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node -e  const net = require('net'); process.stdin.pause(); const client = net.createConnection({ port: 39805 }, () => { client.pipe(process.stdout); process.stdin.pipe(client); }); client.on('close', function (hadError) { console.error(hadError ? 'Remote close with error' : 'Remote close'); process.exit(hadError ? 1 : 0); }); client.on('error', function (err) { process.stderr.write(err && (err.stack || err.message) || String(err)); });
[2021-12-15 09:27:22.738] Exec (1) stderr: Error: connect ECONNREFUSED ::1:39805
[2021-12-15 09:27:22.738]     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
[2021-12-15 09:27:22.738] Exec (1) stderr: Remote close with error
[2021-12-15 09:27:22.750] Exec (1): Local close
[2021-12-15 09:27:22.750] Terminating exec 1
[2021-12-15 09:27:22.751] Exec (1) has terminated (local socket closed) with code 1 and signal null.

@danw-mpl
Copy link

danw-mpl commented Dec 15, 2021

If it helps anyone temporarily, rolling back to v0.63.4 has got me running.

Edit: After others have had success with 0.63.5, I tried that version and it is working.

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

image

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

If it helps anyone temporarily, rolling back to v0.63.4 has got me running.

I've downgraded to v0.63.5 and it looks like it works for me

thanks

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

Thanks @Bentzeh for the log!
For you, WSL1/WSL2 is correctly detected. (Unlike #6066).
Also the connection secret is set. But connecting the server running in WSL fails

I'd be happy if you can help me figuring this one out...

When you run Developer: Show Logs... and select Remote Server, anything interesting in that log file?

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

@aeschli
I've reinstalled v0.63.11 and reopened vscode
I open the command line and invoked >Developer: Show Logs...
but I don't see a Remote Server option
did you mean Extension Host?
image

@thepaulmacca
Copy link

If it helps anyone temporarily, rolling back to v0.63.4 has got me running.

I've downgraded to v0.63.5 and it looks like it works for me

thanks

Same here

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

@Bentzeh Are you in a WSL window?

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

@aeschli
I'm running vscode on wsl2

I choose the 'Window' option and this is what I got
image

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

Ok, I see, sorry I thought the remote log would be available then, but looks like not.
The log file can be found in ~/.vscode-server/data/logs then. remoteagent.log (in the WSL distro's file system)

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

The log has that testing link (e.g. http://127.0.0.1:58478/version). Does that one work when opened in a browser on the windows side?

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

The log has that testing link (e.g. http://127.0.0.1:58478/version). Does that one work when opened in a browser on the windows side?

not working

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

If you set the setting "remote.WSL2.connectionMethod": "wsl2VMAddress" or "remote.WSL2.connectionMethod": "localhost" ?

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

@aeschli

when i add "remote.WSL2.connectionMethod": "wsl2VMAddress"( or "remote.WSL2.connectionMethod": "localhost")
to the user settings and reopen vscode

looks like it works

should I leave it like that? or should I wait for some fix

@nikwyss
Copy link

nikwyss commented Dec 15, 2021

If you set the setting "remote.WSL2.connectionMethod": "wsl2VMAddress" or "remote.WSL2.connectionMethod": "localhost" ?

Did not work in my case. Only downgrade to 0.63.4 helped.

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

You can leave it as workaround. I still try to find out what the problem is.

With "remote.WSL2.connectionMethod": "wslExeProxy" (the default) we open the server in the WSL VM on 127.0.0.1 so it is only accessible in the VM. We connect to it with a small node app that runs in the server

Exec 0: C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node -e  const net = require('net'); process.stdin.pause(); const client = net.createConnection({ port: 39805 }, () => { client.pipe(process.stdout); process.stdin.pipe(client); }); client.on('close', function (hadError) { console.error(hadError ? 'Remote close with error' : 'Remote close'); process.exit(hadError ? 1 : 0); }); client.on('error', function (err) { process.stderr.write(err && (err.stack || err.message) || String(err)); });
[2021-12-15 09:27:22.645] 

That seems to fail.

Is there anything special with your distro. Proxy settings, firewall?

@kevinior
Copy link

I was having the same problem until I rolled back to 0.63.5.

We have a particularly stupid firewall configuration imposed by IT that blocks all ports on the Windows side of the WSL2 virtual network connection.

@nikwyss
Copy link

nikwyss commented Dec 15, 2021

0.63.12 works like a charm. Thanks a lot for your work!

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

You can leave it as workaround. I still try to find out what the problem is.

With "remote.WSL2.connectionMethod": "wslExeProxy" (the default) we open the server in the WSL VM on 127.0.0.1 so it is only accessible in the VM. We connect to it with a small node app that runs in the server

Exec 0: C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e /home/bentz/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node -e  const net = require('net'); process.stdin.pause(); const client = net.createConnection({ port: 39805 }, () => { client.pipe(process.stdout); process.stdin.pipe(client); }); client.on('close', function (hadError) { console.error(hadError ? 'Remote close with error' : 'Remote close'); process.exit(hadError ? 1 : 0); }); client.on('error', function (err) { process.stderr.write(err && (err.stack || err.message) || String(err)); });
[2021-12-15 09:27:22.645] 

That seems to fail.

Is there anything special with your distro. Proxy settings, firewall?

there isn't any special "config" I'm aware of

I've tried to upgrade to v0.63.12 and remove "remote.WSL2.connectionMethod": "wsl2VMAddress" from the user settings I'm still experiencing the issue

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

I published v0.63.13 where I force that wslexeproxy connects to 127.0.0.1.
Can you give it a try?

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

v0.63.13 works!
without any changes to the user settings

thanks :)

@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

@aeschli
let me know if there are more things I can do to help

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

Awesome. Thanks a lot for your help!

I'm wondering: what do you have in your hosts file? Run cat /etc/hosts...

@aeschli aeschli changed the title Remote WSL 0.63.11 fails: Connection secret not set Remote WSL 0.63.11 'Failed to connect to the remote extension host server' Dec 15, 2021
@aeschli aeschli added this to the January 2022 milestone Dec 15, 2021
@aeschli aeschli closed this as completed Dec 15, 2021
@Bentzeh
Copy link

Bentzeh commented Dec 15, 2021

@aeschli

/etc/hosts

# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateHosts = false
127.0.0.1       ip4-localhost
# 127.0.0.1     localhost
127.0.1.1       Bentz.localdomain       Bentz
::1             localhost

xx.xxx.xxx.xx   host.docker.internal
xx.xxx.xxx.xx   gateway.docker.internal
127.0.0.1       kubernetes.docker.internal

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

/etc/wsl.conf

[network]
generateHosts=false

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

::1 localhost explains the problem we had... 😄

@grnkvch
Copy link

grnkvch commented Dec 16, 2021

VSCode cource control do not refresh changes automaticly in repository inside wsl ubuntu, so to see changes I have to manually refresh it by button
image
For repositories in windows it works as intended
I'm not sure that my issue related to this, but before some last extension updates everything work fine

@aeschli
Copy link
Contributor Author

aeschli commented Dec 16, 2021

@grnkvch Are you on WSL1 or WSL 2? Did you enable polling? Can you provide the WSL log? I suggest to do that in a new issue as I don't think the two issues are related,

@grnkvch
Copy link

grnkvch commented Dec 16, 2021

I'm on WSL 2,
image

Since I on WSL 2, I thought I don't need to enable polling

I guess, since problem occures recently it probably related with changes after v0.63.5

WSL log

[2021-12-16 08:28:30.349] Starting VS Code Server inside WSL (wsl2)
[2021-12-16 08:28:30.349] Extension version: 0.63.13
[2021-12-16 08:28:30.349] Windows build: 18362. Multi distro support: available. WSL path support: enabled
[2021-12-16 08:28:30.349] No shell environment set or found for current distro.
[2021-12-16 08:28:30.439] WSL daemon log file: c:\Users\User\AppData\Roaming\Code\logs\20211216T090420\exthost3\ms-vscode-remote.remote-wsl\wsl-daemon-20211216T082830.log
[2021-12-16 08:28:30.441] Probing if server is already installed: C:\Windows\System32\wsl.exe -d Ubuntu-20.04 -e sh -c "[ -d ~/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2021-12-16 08:28:30.669] Probing result: found
[2021-12-16 08:28:30.669] Server install found in WSL
[2021-12-16 08:28:30.670] Launching C:\Windows\System32\wsl.exe -d Ubuntu-20.04 sh -c 'env && VSCODE_WSL_DEBUG_INFO=true "$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" fe719cd3e5825bf14e14182fddeb88ee8daf044f stable .vscode-server 361203706265 --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --log=trace', cwd: undefined, env: {
[2021-12-16 08:28:30.670]   "ALLUSERSPROFILE": "C:\\ProgramData",
[2021-12-16 08:28:30.670]   "APPDATA": "C:\\Users\\User\\AppData\\Roaming",
[2021-12-16 08:28:30.670]   "ChocolateyInstall": "C:\\ProgramData\\chocolatey",
[2021-12-16 08:28:30.670]   "ChocolateyLastPathUpdate": "132681488321498027",
[2021-12-16 08:28:30.670]   "CHROME_CRASHPAD_PIPE_NAME": "\\\\.\\pipe\\crashpad_7668_FSCOBYGOZHFBFXTU",
[2021-12-16 08:28:30.670]   "CommonProgramFiles": "C:\\Program Files\\Common Files",
[2021-12-16 08:28:30.670]   "CommonProgramFiles(x86)": "C:\\Program Files (x86)\\Common Files",
[2021-12-16 08:28:30.670]   "CommonProgramW6432": "C:\\Program Files\\Common Files",
[2021-12-16 08:28:30.670]   "COMPUTERNAME": "XBS-PC-00257",
[2021-12-16 08:28:30.670]   "ComSpec": "C:\\Windows\\system32\\cmd.exe",
[2021-12-16 08:28:30.670]   "DriverData": "C:\\Windows\\System32\\Drivers\\DriverData",
[2021-12-16 08:28:30.670]   "ERLANG_HOME": "C:\\Program Files\\erl10.7",
[2021-12-16 08:28:30.670]   "FPS_BROWSER_APP_PROFILE_STRING": "Internet Explorer",
[2021-12-16 08:28:30.670]   "FPS_BROWSER_USER_PROFILE_STRING": "Default",
[2021-12-16 08:28:30.670]   "HOMEDRIVE": "C:",
[2021-12-16 08:28:30.670]   "HOMEPATH": "\\Users\\User",
[2021-12-16 08:28:30.670]   "LOCALAPPDATA": "C:\\Users\\User\\AppData\\Local",
[2021-12-16 08:28:30.670]   "LOGONSERVER": "\\\\XBS-PC-00257",
[2021-12-16 08:28:30.670]   "NUMBER_OF_PROCESSORS": "6",
[2021-12-16 08:28:30.670]   "NVM_HOME": "C:\\Users\\User\\AppData\\Roaming\\nvm",
[2021-12-16 08:28:30.670]   "NVM_SYMLINK": "C:\\Program Files\\nodejs",
[2021-12-16 08:28:30.670]   "OneDrive": "C:\\Users\\User\\OneDrive",
[2021-12-16 08:28:30.670]   "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
[2021-12-16 08:28:30.670]   "OS": "Windows_NT",
[2021-12-16 08:28:30.670]   "Path": "C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files\\Git\\cmd;C:\\Users\\User\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\ProgramData\\chocolatey\\bin;C:\\Program Files\\dotnet\\;C:\\Program Files\\Microsoft SQL Server\\130\\Tools\\Binn\\;C:\\Program Files\\Microsoft SQL Server\\Client SDK\\ODBC\\170\\Tools\\Binn\\;C:\\Program Files\\Docker\\Docker\\resources\\bin;C:\\ProgramData\\DockerDesktop\\version-bin;C:\\Users\\User\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\User\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\User\\AppData\\Roaming\\nvm;C:\\Program Files\\nodejs;C:\\Users\\User\\.dotnet\\tools",
[2021-12-16 08:28:30.670]   "PATHEXT": ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC",
[2021-12-16 08:28:30.670]   "PROCESSOR_ARCHITECTURE": "AMD64",
[2021-12-16 08:28:30.670]   "PROCESSOR_IDENTIFIER": "Intel64 Family 6 Model 158 Stepping 12, GenuineIntel",
[2021-12-16 08:28:30.670]   "PROCESSOR_LEVEL": "6",
[2021-12-16 08:28:30.670]   "PROCESSOR_REVISION": "9e0c",
[2021-12-16 08:28:30.670]   "ProgramData": "C:\\ProgramData",
[2021-12-16 08:28:30.670]   "ProgramFiles": "C:\\Program Files",
[2021-12-16 08:28:30.670]   "ProgramFiles(x86)": "C:\\Program Files (x86)",
[2021-12-16 08:28:30.670]   "ProgramW6432": "C:\\Program Files",
[2021-12-16 08:28:30.670]   "PSModulePath": "C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules",
[2021-12-16 08:28:30.670]   "PUBLIC": "C:\\Users\\Public",
[2021-12-16 08:28:30.670]   "SESSIONNAME": "Console",
[2021-12-16 08:28:30.670]   "SystemDrive": "C:",
[2021-12-16 08:28:30.670]   "SystemRoot": "C:\\Windows",
[2021-12-16 08:28:30.670]   "TEMP": "C:\\Users\\User\\AppData\\Local\\Temp",
[2021-12-16 08:28:30.670]   "TMP": "C:\\Users\\User\\AppData\\Local\\Temp",
[2021-12-16 08:28:30.670]   "USERDOMAIN": "XBS-PC-00257",
[2021-12-16 08:28:30.670]   "USERDOMAIN_ROAMINGPROFILE": "XBS-PC-00257",
[2021-12-16 08:28:30.670]   "USERNAME": "User",
[2021-12-16 08:28:30.670]   "USERPROFILE": "C:\\Users\\User",
[2021-12-16 08:28:30.670]   "VBOX_MSI_INSTALL_PATH": "C:\\Program Files\\Oracle\\VirtualBox\\",
[2021-12-16 08:28:30.670]   "windir": "C:\\Windows",
[2021-12-16 08:28:30.670]   "VSCODE_WSL_EXT_LOCATION": "c:\\Users\\User\\.vscode\\extensions\\ms-vscode-remote.remote-wsl-0.63.13",
[2021-12-16 08:28:30.670]   "WSLENV": "VSCODE_WSL_EXT_LOCATION/up"
[2021-12-16 08:28:30.670] }
[2021-12-16 08:28:30.740] USER=user
[2021-12-16 08:28:30.740] VSCODE_WSL_EXT_LOCATION=/mnt/c/Users/User/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.13
[2021-12-16 08:28:30.740] SHLVL=0
[2021-12-16 08:28:30.740] HOME=/home/user
[2021-12-16 08:28:30.740] WSL_DISTRO_NAME=Ubuntu-20.04
[2021-12-16 08:28:30.740] LOGNAME=user
[2021-12-16 08:28:30.740] NAME=XBS-PC-00257
[2021-12-16 08:28:30.740] WSL_INTEROP=/run/WSL/11_interop
[2021-12-16 08:28:30.740] _=/usr/bin/sh
[2021-12-16 08:28:30.740] TERM=xterm-256color
[2021-12-16 08:28:30.740] PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/User/AppData/Roaming/nvm:/mnt/c/Program Files/nodejs:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Users/User/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/User/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/User/AppData/Roaming/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Users/User/.dotnet/tools
[2021-12-16 08:28:30.740] LANG=C.UTF-8
[2021-12-16 08:28:30.740] SHELL=/bin/bash
[2021-12-16 08:28:30.740] PWD=/mnt/c/Users/User/AppData/Local/Programs/Microsoft VS Code
[2021-12-16 08:28:30.740] HOSTTYPE=x86_64
[2021-12-16 08:28:30.740] WSLENV=VSCODE_WSL_EXT_LOCATION/up
[2021-12-16 08:28:30.740] Setting up server environment: Looking for /home/user/.vscode-server/server-env-setup. Not found.
[2021-12-16 08:28:30.740] WSL version: 5.10.16.3-microsoft-standard-WSL2 Ubuntu-20.04
[2021-12-16 08:28:30.741] + [ ! -d /home/user/.vscode-server ]
[2021-12-16 08:28:30.741] + CODE_PROFILE=/home/user/.vscode-server/server-env-setup
[2021-12-16 08:28:30.741] + printf Setting up server environment: Looking for %s.  /home/user/.vscode-server/server-env-setup
[2021-12-16 08:28:30.741] + [ -f /home/user/.vscode-server/server-env-setup ]
[2021-12-16 08:28:30.741] + echo Not found.
[2021-12-16 08:28:30.741] + VSCODE_REMOTE_BIN=/home/user/.vscode-server/bin
[2021-12-16 08:28:30.741] + uname -r
[2021-12-16 08:28:30.741] + WSL_VERSION=5.10.16.3-microsoft-standard-WSL2
[2021-12-16 08:28:30.741] + echo WSL version: 5.10.16.3-microsoft-standard-WSL2 Ubuntu-20.04
[2021-12-16 08:28:30.741] + dirname /mnt/c/Users/User/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.13/scripts/wslServer.sh
[2021-12-16 08:28:30.741] + /mnt/c/Users/User/.vscode/extensions/ms-vscode-remote.remote-wsl-0.63.13/scripts/wslDownload.sh fe719cd3e5825bf14e14182fddeb88ee8daf044f stable /home/user/.vscode-server/bin
[2021-12-16 08:28:30.741] + [ ! -d /home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f ]
[2021-12-16 08:28:30.741] + RC=0
[2021-12-16 08:28:30.741] + [ 0 -ne 0 ]
[2021-12-16 08:28:30.741] + date +%s
[2021-12-16 08:28:31.039] WSL-shell-PID: 14
[2021-12-16 08:28:31.039] Node executable: /home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node
[2021-12-16 08:28:31.039] Starting server: /home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret=/home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-14-1639643310.token --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --log=trace
[2021-12-16 08:28:31.039] 
[2021-12-16 08:28:31.039] 
[2021-12-16 08:28:31.039] *
[2021-12-16 08:28:31.039] * Visual Studio Code Server
[2021-12-16 08:28:31.039] *
[2021-12-16 08:28:31.039] * Reminder: You may only use this software with Visual Studio family products,
[2021-12-16 08:28:31.039] * as described in the license https://aka.ms/vscode-remote/license
[2021-12-16 08:28:31.039] *
[2021-12-16 08:28:31.039] 
[2021-12-16 08:28:31.039] Extension host agent listening on 37319
[2021-12-16 08:28:31.040] 
[2021-12-16 08:28:31.046] + TOKEN_FILE_PATH=/home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-14-1639643310.token
[2021-12-16 08:28:31.046] + echo 361203706265
[2021-12-16 08:28:31.046] + echo WSL-shell-PID: 14
[2021-12-16 08:28:31.046] + echo Node executable: /home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node
[2021-12-16 08:28:31.046] + echo Starting server: /home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret=/home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-14-1639643310.token --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --log=trace
[2021-12-16 08:28:31.046] + [ -f /etc/alpine-release ]
[2021-12-16 08:28:31.046] + uname -m
[2021-12-16 08:28:31.046] + [ x86_64 = aarch64 ]
[2021-12-16 08:28:31.046] + export VSCODE_AGENT_FOLDER=/home/user/.vscode-server
[2021-12-16 08:28:31.046] + /home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/server.sh --connection-secret=/home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/code-server-14-1639643310.token --host=127.0.0.1 --port=0 --use-host-proxy --without-browser-env-var --disable-websocket-compression --log=trace
[2021-12-16 08:28:31.047] Started local proxy server on 59376.
[2021-12-16 08:28:31.047] WSL resolver response: 127.0.0.1:59376
[2021-12-16 08:28:31.047] To debug connection issues, open a local browser on http://127.0.0.1:59376/version
[2021-12-16 08:28:31.047] Using 'wslExeProxy' to connect to the VS Code server as configured by setting 'remote.WSL2.connectionMethod'
[2021-12-16 08:28:31.047] 'wslExeProxy' should fix reconnection issues after sleep and network adapter changes.
[2021-12-16 08:28:31.047] Please report issues related with the new setting to https://github.com/microsoft/vscode-remote-release/issues/5894
[2021-12-16 08:28:31.047] To revert back to the old way of connecting, change setting 'remote.WSL2.connectionMethod' to 'wsl2VMAddress'.
[2021-12-16 08:28:31.047] No extension host environment set
[2021-12-16 08:28:31.054] Using executable (0) to forward requests from local 59376 to remote 37319
[2021-12-16 08:28:31.054] Exec 0: C:\Windows\System32\wsl.exe -d Ubuntu-20.04 -e /home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node -e  const net = require('net'); process.stdin.pause(); const client = net.createConnection({ host: '127.0.0.1', port: 37319 }, () => { client.pipe(process.stdout); process.stdin.pipe(client); }); client.on('close', function (hadError) { console.error(hadError ? 'Remote close with error' : 'Remote close'); process.exit(hadError ? 1 : 0); }); client.on('error', function (err) { process.stderr.write(err && (err.stack || err.message) || String(err)); });
[2021-12-16 08:28:31.217] Using executable (1) to forward requests from local 59376 to remote 37319
[2021-12-16 08:28:31.217] Exec 1: C:\Windows\System32\wsl.exe -d Ubuntu-20.04 -e /home/user/.vscode-server/bin/fe719cd3e5825bf14e14182fddeb88ee8daf044f/node -e  const net = require('net'); process.stdin.pause(); const client = net.createConnection({ host: '127.0.0.1', port: 37319 }, () => { client.pipe(process.stdout); process.stdin.pipe(client); }); client.on('close', function (hadError) { console.error(hadError ? 'Remote close with error' : 'Remote close'); process.exit(hadError ? 1 : 0); }); client.on('error', function (err) { process.stderr.write(err && (err.stack || err.message) || String(err)); });```

@aeschli
Copy link
Contributor Author

aeschli commented Dec 16, 2021

Correct, polling is only for WSL1.
Are you working on a folder in a windows mount e.g. '/mnt/c/...`.? It's a long standing issue with WSL2 that file watching is not reliable there.
If not, please file a new issue so we can debug this together.

@Bentzeh
Copy link

Bentzeh commented Dec 16, 2021

::1 localhost explains the problem we had... 😄

@aeschli
oh 😅
if you don't mind me asking
why is it wrong? what should be written over there?

@grnkvch
Copy link

grnkvch commented Dec 16, 2021

Correct, polling is only for WSL1. Are you working on a folder in a windows mount e.g. '/mnt/c/...`.? It's a long standing issue with WSL2 that file watching is not reliable there. If not, please file a new issue so we can debug this together.

I'm working in linux fs (/home/user/projectFolder), all watchers are working correctly (eg pm2 or webpack), exept VS Code source control
I figured out that such issue affetcs only one repository
If I create some new TestProjectFolder, and init it with git init, everyting is going ok, changes occures in VS Code Source control automaticly.
So I'm going to make further investigatin, and will create new issue if find something relating to wsl context

@aeschli
Copy link
Contributor Author

aeschli commented Dec 16, 2021

@Bentzeh I'm not saying it is wrong, but typically localhost is mapped to 127.0.0.1.
Now the extension no longer depends on localhost but directly uses 127.0.0.1

@dbaeumer
Copy link
Member

@aeschli any steps to verify.

@dbaeumer dbaeumer added the verification-steps-needed Steps to verify are needed for verification label Jan 28, 2022
@aeschli
Copy link
Contributor Author

aeschli commented Jan 28, 2022

  • in a WSL 2 distro, edit /etc/hosts:
    • replace 127.0.0.1 localhost with ::1 localhost
  • close all VS Code windows
  • open a new WSL window on that distro
  • it should successfully connect

@aeschli aeschli added verification-needed Verification of issue is requested and removed verification-steps-needed Steps to verify are needed for verification labels Jan 28, 2022
@rzhao271 rzhao271 added the verified Verification succeeded label Jan 28, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verification-needed Verification of issue is requested verified Verification succeeded wsl Issue in vscode-remote WSL
Projects
None yet
Development

No branches or pull requests

9 participants