VSCode Version: 1.34.0-insider (user setup)
Local OS Version: Windows 10, 1803
Remote OS Version: Ubuntu 18.04
Remote Extension/Connection Type: WSL
Steps to Reproduce:
[2019-05-03 14:44:06.720] Starting VS Code Server inside WSL.
[2019-05-03 14:44:07.614] Launching C:\WINDOWS\System32\wsl.exe bash -i -c "./scripts/wslServer.sh 473af338e1bd9ad4d9853933da1cd9d5d9e07dc9 insider .vscode-remote " in c:\Users\mario_limonciello\.vscode-insiders\extensions\ms-vscode-remote.remote-wsl-0.32.0
[2019-05-03 14:44:09.413] Installing VS Code Server 473af338e1bd9ad4d9853933da1cd9d5d9e07dc9
[2019-05-03 14:44:09.713] Downloading:
[2019-05-03 14:44:10.314] Failed
[2019-05-03 14:44:10.314] Will not apply HSTS. The HSTS database must be a regular and non-world-writable file.
[2019-05-03 14:44:10.314] ERROR: could not open HSTS store at '/home/supermario/.wget-hsts'. HSTS will be disabled.
[2019-05-03 14:44:10.314] --2019-05-03 09:44:10-- https://update.code.visualstudio.com/commit:473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/server-linux-x64/insider
[2019-05-03 14:44:10.314] Resolving update.code.visualstudio.com (update.code.visualstudio.com)... 51.144.164.215
[2019-05-03 14:44:10.314] Connecting to update.code.visualstudio.com (update.code.visualstudio.com)|51.144.164.215|:443...
[2019-05-03 14:44:10.415] connected.
[2019-05-03 14:44:10.415] Unable to establish SSL connection.
[2019-05-03 14:44:10.415] ERROR: Failed to download https://update.code.visualstudio.com/commit:473af338e1bd9ad4d9853933da1cd9d5d9e07dc9/server-linux-x64/insider to /home/supermario/.vscode-remote/bin/473af338e1bd9ad4d9853933da1cd9d5d9e07dc9-1556894649.tar.gz
[2019-05-03 14:44:10.415] VS Code Server for WSL closed unexpectedly.
Worth noting I do need an NTLM proxy, so it's entirely possible that needs to be configured in advance within WSL somehow..
@aeschli How are you downloading the server?
In insiders I hit ctrl-shift-p and then hit Remote-WSL: New Window
Received this:

Which correlated to that log. So I guess the extension is trying to download the server in WSL for me?
@joaomoreno We do wget -O "$name" -o /dev/stdout --progress=dot "https://update.code.visualstudio.com/commit:$COMMIT/server-linux-x64/$QUALITY"
Yup. That won't really work behind a proxy.
Is it possible to do the curl/wget from the Windows side and pass the binary result into WSL?
Although I guess there's still going to be problems with proxy for extensions and the like.
Also, having problems with this.
The docs here (https://code.visualstudio.com/docs/remote/wsl) indicate that adding proxy vars for HTTP_PROXY and/or HTTPS_PROXY on the remote (WSL) side might solve this problem (that would make sense) but it does not seem to fix the issue described here. Further, this doc does not indicate where to add "global proxy settings". I tried /etc/environment, ~/.bashrc, and /etc/profile. Putting proxy settings in any of these places are adequate for other Linux utilities like curl or apt to "get out to the internet".
I feel like this could probably be fixed pretty easily by just having vscode pick up proxy vars in WSL - either from the user's default shell or from a specific file (the Vagrant proxyconf plugin uses /etc/environment).
I'm running into the same issue (behind corporate proxy). Any resolution for this?. Here's the log
`[2019-05-22 03:54:20.286] Starting VS Code Server inside WSL.
[2019-05-22 03:54:20.837] Launching C:\windows\System32\wsl.exe bash -c "./scripts/wslServer.sh 4ca38ce5584d7cd67b435b3c32ef1240c6a29628 insider .vscode-remote " in c:\Users\reddybvy.vscode-insiders\extensions\ms-vscode-remote.remote-wsl-0.36.0
[2019-05-22 03:54:22.938] Updating server...
[2019-05-22 03:54:23.538] Updating VS Code Server to version 4ca38ce5584d7cd67b435b3c32ef1240c6a29628
[2019-05-22 03:54:23.538] Removing previous installation...
[2019-05-22 03:54:24.440] Downloading:
[2019-05-22 03:55:54.945] VS Code Server for WSL failed to start. No messages received for 90s
[2019-05-22 03:55:54.945] For help with startup problems, go to
[2019-05-22 03:55:54.945] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips`
I have found a workaround until this is fixed on the VS Code side if you are behind a proxy.
/mnt/c/Users/yourname/.vscode-insiders/extensions/ms-vscode-remote.remote-wsl-0.36.0bash -c (my command was ./scripts/wslServer.sh 6964233e81c68f5a5f34e7eb1da0836e1d539f14 insider .vscode-remote --disable-telemetry)My solution is ~.wgetrc with
use_proxy=on
http_proxy=http://127.0.0.1:3128
https_proxy=http://127.0.0.1:3128
check_certificate = off
In the upcoming version we now download the server on the Windows side. That way we avoid problems with missing proxy settings or missing certificates.
@aeschli - in which version of what? WSL or VS Code? I'm currently running VS Code 1.35.1 and still the same issue so I'm assuming it's not in this version?
@zephyrthenoble - Followed your steps and 1-6 work fine. However, step 7 yields the following in VS Code when I launch a new WSL window from within VS Code:
[2019-06-24 12:00:27.075] Starting VS Code Server inside WSL.
[2019-06-24 12:00:28.582] Launching C:\WINDOWS\System32\wsl.exe bash -c "./scripts/wslServer.sh c7d83e57cd18f18026a8162d042843bda1bcf21f stable .vscode-server " in c:\Users\myuser.vscode\extensions\ms-vscode-remote.remote-wsl-0.38.0
[2019-06-24 12:00:28.875] Updating server...
[2019-06-24 12:00:28.875] Starting server in /bin/bash...
[2019-06-24 12:00:29.175] open terminal failed: not a terminal
Any thoughts?
@zephyrthenoble - Followed your steps and 1-6 work fine. However, step 7 yields the following in VS Code when I launch a new WSL window from within VS Code:
[2019-06-24 12:00:27.075] Starting VS Code Server inside WSL.
[2019-06-24 12:00:28.582] Launching C:\WINDOWS\System32\wsl.exe bash -c "./scripts/wslServer.sh c7d83e57cd18f18026a8162d042843bda1bcf21f stable .vscode-server " in c:\Users\myuser.vscode\extensions\ms-vscode-remote.remote-wsl-0.38.0
[2019-06-24 12:00:28.875] Updating server...
[2019-06-24 12:00:28.875] Starting server in /bin/bash...
[2019-06-24 12:00:29.175] open terminal failed: not a terminalAny thoughts?
Found the issue! I use TMUX so if you have it enabled to come up when a shell starts, as I did, it'll render it as not a valid terminal. For example, I have the following in my .bashrc file:
[[ $- != *i* ]] && return
[[ -z "$TMUX" ]] && exec tmux
So I commented that out and tried WSL again within VS Code and it works fine.
Most helpful comment
My solution is ~.wgetrc with
use_proxy=on
http_proxy=http://127.0.0.1:3128
https_proxy=http://127.0.0.1:3128
check_certificate = off