VSCode | The editor cannot be opened due to an unexpected error - visual-studio-code

Goal: Get regular Bash and Git in Terminal working for Python projects in Visual Studio Code.
Anytime I launch, I see this error. I cannot open code or use Terminal.
Error Message:
The editor cannot be opened due to an unexpected error: No file system provider found for resource 'vscode-remote://wsl%2Bubuntu/...'
Update: Uninstalled WSL. I no longer have the below old Terminal output.
Terminal:
[2022-06-13 15:53:18.277] Resolving wsl+ubuntu, resolveAttempt: 1
[2022-06-13 15:53:18.361] Starting VS Code Server inside WSL (wsl1)
[2022-06-13 15:53:18.361] Extension version: 0.66.3
[2022-06-13 15:53:18.361] Windows build: 19044. Multi distro support: available. WSL path support: enabled
[2022-06-13 15:53:18.361] No shell environment set or found for current distro.
[2022-06-13 15:53:18.546] WSL daemon log file:
[2022-06-13 15:53:18.548] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu -e sh -c "[ -d ~/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2022-06-13 15:53:19.023] Probing result: x86_64
[2022-06-13 15:53:19.024] No server install found in WSL, needs linux-x64
[2022-06-13 15:53:19.024] Downloading server on client side to C:\Users\dabell\AppData\Local\Temp\vscode-remote-wsl\c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5\vscode-server-stable-linux-x64.tar.gz.
[2022-06-13 15:53:19.024] https://update.code.visualstudio.com/commit:c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/server-linux-x64/stable
[2022-06-13 15:53:26.719] Unable to download server on client side: Error: Request downloadRequest failed with message: getaddrinfo ENOTFOUND update.code.visualstudio.com. Will try to download on WSL side.
[2022-06-13 15:53:26.721] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5 stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=1433349295-3472956524-2784734323-674824766 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2022-06-13 15:53:27.103] Setting up server environment: Looking for /home/danielbellhv/.vscode-server/server-env-setup. Not found.
[2022-06-13 15:53:27.104] WSL version: 4.4.0-19041-Microsoft Ubuntu
[2022-06-13 15:53:27.104] Updating VS Code Server to version c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
[2022-06-13 15:53:27.104] Removing previous installation...
[2022-06-13 15:53:27.104] Installing VS Code Server for x64 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5)
[2022-06-13 15:53:27.104] Downloading:
[2022-06-13 15:53:37.329] 100%
[2022-06-13 15:53:37.329] Failed
[2022-06-13 15:53:37.331] --2022-06-13 16:53:37-- https://update.code.visualstudio.com/commit:c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/server-linux-x64/stable
[2022-06-13 15:53:37.331] Resolving update.code.visualstudio.com (update.code.visualstudio.com)...
[2022-06-13 15:53:47.093] failed: Temporary failure in name resolution.
[2022-06-13 15:53:47.093] wget: unable to resolve host address ‘update.code.visualstudio.com’
[2022-06-13 15:53:47.093] ERROR: Failed to download https://update.code.visualstudio.com/commit:c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/server-linux-x64/stable to /home/danielbellhv/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5-1655135606.tar.gz
[2022-06-13 15:53:47.094] VS Code Server for WSL closed unexpectedly.
[2022-06-13 15:53:47.094] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2022-06-13 15:53:47.116] WSL Daemon exited with code 0

This can be solved by restarting the WSL container's network.
Open Powershell from in Windows and type the following command:
Restart-Service LxssManager
I would advise saving it to a script such as restart-WSL-network.ps1 and setting up a shortcut to run this when it happens again.

I'm kind of late to the party, but I've just had this issue today. I only restarted Windows, and now it works fine!

Deleting the .vscode* folders in the home directory (in wsl) fixed the issue

running wsl --shutdown from windows command line and relaunch the vscode solved my issue.

I simply uninstalled and reinstalled WSL 2, from Windows Store.
You can via. command line, but I found using Windows Store to be more accessible / user friendly.

Related

vscode remote-ssh fails

Local: macOS 12.6, vscode1.72.2, remote-ssh v0.90.1 preview
Server: Tencent Cloud Lightweight Server centOS7.6
Server ssh configuration is set: AllowTcpForwarding yes
The local command line ssh connection server can be entered normally.
The error message is:
channel 2: open failed: administratively prohibited: open failed

Fail to start Minikube on Debian

I installed Minikube on my Debian 10, but when I try to start it, I
get these errors:
$ minikube start
* minikube v1.25.2 on Debian 10.1
* Unable to pick a default driver. Here is what was considered, in preference order:
- docker: Not healthy: "docker version --format {{.Server.Os}}-{{.Server.Version}}" exit status 1: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/version: dial unix /var/run/docker.sock: connect: permission denied
- docker: Suggestion: Add your user to the 'docker' group: 'sudo usermod -aG docker $USER && newgrp docker' <https://docs.docker.com/engine/install/linux-postinstall/>
- kvm2: Not healthy: /usr/bin/virsh domcapabilities --virttype kvm failed:
error: failed to get emulator capabilities
error: invalid argument: KVM is not supported by '/usr/bin/qemu-system-x86_64' on this host
exit status 1
- kvm2: Suggestion: Follow your Linux distribution instructions for configuring KVM <https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/>
* Alternatively you could install one of these drivers:
- podman: Not installed: exec: "podman": executable file not found in $PATH
- vmware: Not installed: exec: "docker-machine-driver-vmware": executable file not found in $PATH
- virtualbox: Not installed: unable to find VBoxManage in $PATH
I added my user to the docker group using:
sudo usermod -aG docker $USER
and I insalled kvm without any apparent problems as far as I understand:
kvm --version
QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-8~deb10u1)
Copyright (c) 2003-2018 Fabrice Bellard and the QEMU Project developers
$ lsmod | grep kvm
kvm 729088 0
irqbypass 16384 1 kvm
$ sudo virsh list --all
Id Name State
-----------------------------
1 debian10-MK running
What could be the problem and solution then?
Thanks,
Tamar

Unable to start tailscaled service on debian 11 container

Tailscale version 1.22.0
Your operating system & version Debian bullseye 11
version
Hello sir, could you guide me how to start tailscaled.service. i got an error message like this :
failed to connect to local tailscaled; it doesn’t appear to be running (sudo systemctl start tailscaled ?)
And when i try to run this command sudo systemctl start tailscaled. I got another different error :
Job for tailscaled.service failed because the control process exited with error code.
See “systemctl status tailscaled.service” and “journalctl -xe” for details.
Thanks
The journalctl output it suggests to run would tell the error it is experiencing. I'd recommend running:
journalctl -u tailscaled --since="2 hours ago"

"Connection timed out" error while connecting vscode to gcloud cloud shell

I have set up the cloud shell for vscode as given in this document; however it stopped connecting to the remote shell and it was only connected once initially. No VS Code version change happened. Current VSCode version is 1.46.1
Following are the logs thrown -
[13:31:22.078] Log Level: 2
[13:31:22.086] remote-ssh#0.51.0
[13:31:22.086] win32 x64
[13:31:22.093] SSH Resolver called for "ssh-remote+cloud-shell", attempt 1
[13:31:22.094] SSH Resolver called for host: cloud-shell
[13:31:22.094] Setting up SSH remote "cloud-shell"
[13:31:23.942] Using commit id "cd9ea6488829f560dc949a8b2fb789f3cdc05f5d" and quality "stable" for server
[13:31:23.945] Install and start server if needed
[13:31:23.951] Checking ssh with "ssh -V"
[13:31:23.957] Got error from ssh: spawn ssh ENOENT
[13:31:23.958] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[13:31:23.962] Got error from ssh: spawn C:\Windows\System32\OpenSSH\ssh.exe ENOENT
[13:31:23.962] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[13:31:28.385] > OpenSSH_8.3p1, OpenSSL 1.1.1g 21 Apr 2020
[13:31:28.390] Running script with connection command: "C:\Program Files\Git\usr\bin\ssh.exe" -T -D 50396 cloud-shell bash
[13:31:28.412] Terminal shell path: C:\Windows\System32\cmd.exe
[13:31:33.205] >
[13:31:33.206] Got some output, clearing connection timeout
[13:31:54.348] > ssh: connect to host 34.87.29.174 port 6000: Connection timed out
>
[13:31:54.764] "install" terminal command done
[13:31:54.765] Install terminal quit with output: ssh: connect to host 34.87.29.174 port 6000: Connection timed out
[13:31:54.766] Received install output: ssh: connect to host 34.87.29.174 port 6000: Connection timed out
[13:31:54.768] Resolver error: The connection timed out
[13:31:54.781] ------

Successfully installed vs code server on remote host, but it's still trying to install something

I have successfully installed vs code server on the remote host following the steps here SSH with VSCode without internet.
Now when I ssh into the remote host, I can connect successfully and start working, but in the install terminal, it's still trying to install something, not sure if it's an extension on the remote host that I wanted to install earlier and later successfully installed with vsix. See the log from remote - ssh below, further down there's also output from the install terminal which shows a small bar moving, seemingly indicating progress of something.
How can I stop it from doing this every time I connect to the host? Thank you!!
[11:58:58.011] remote-ssh-nightly#2019.10.9540
[11:58:58.011] win32 x64
[11:58:58.013] SSH Resolver called for "ssh-remote+<hostname>", attempt 1
[11:58:58.013] SSH Resolver called for host: <hostname>
[11:58:58.013] Setting up SSH remote "<hostname>"
[11:58:58.028] Using commit id "<mycommitid>" and quality "stable" for server
[11:58:58.029] Testing ssh with ssh -V
[11:58:58.287] ssh exited with code: 0
[11:58:58.287] Got stderr from ssh: OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[11:58:58.290] Running script with connection command: ssh -T -D 61671 <hostname> bash
[11:58:58.292] Install and start server if needed
[11:58:58.295] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[11:58:58.639] >
[11:58:58.639] Got some output, clearing connection timeout
[11:58:59.616] > 6c2c07692b2a: running
>
[11:58:59.677] > Acquiring lock on /users/<myuserid>/.vscode-server/bin/<mycommitid>/vscode-remote-lock.<mycommitid>
> Found existing installation at /users/<myuserid>/.vscode-server/bin/<mycommitid>...
>
[11:58:59.718] > Found running server...
>
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>
>
[11:58:59.739] > Checking server status on port 32772 with wget
> 6c2c07692b2a: start
> sshAuthSock====
> agentPort==32772==
> webViewServerPort====
> osReleaseId==centos==
> arch==x86_64==
> webUiAccessToken====
> 6c2c07692b2a: end
>
[11:58:59.739] Received install output:
sshAuthSock====
agentPort==32772==
webViewServerPort====
osReleaseId==centos==
arch==x86_64==
webUiAccessToken====
[11:58:59.740] Remote server is listening on port 32772
[11:58:59.740] Parsed server configuration: {"agentPort":32772,"osReleaseId":"centos","arch":"x86_64","webUiAccessToken":"","sshAuthSock":""}
[11:58:59.741] Starting forwarding server. localPort 61674 -> socksPort 61671 -> remotePort 32772
[11:58:59.742] Forwarding server listening on 61674
[11:58:59.742] Waiting for ssh tunnel to be ready
[11:58:59.750] [Forwarding server 61674] Got connection 0
[11:58:59.755] Tunneled remote port 32772 to local port 61674
[11:58:59.756] Resolved "ssh-remote+<hostname>" to "127.0.0.1:61674"
[11:58:59.756] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"success","osReleaseId":"centos","arch":"x86_64","askedPw":"0","askedPassphrase":"0","asked2fa":"0","askedHostKey":"0","remoteInConfigFile":"1","gotUnrecognizedPrompt":"0"},"measures":{"resolveAttempts":1,"retries":1}}
[11:58:59.756] ------
[11:58:59.784] [Forwarding server 61674] Got connection 1
[11:58:59.789] [Forwarding server 61674] Got connection 2
[12:01:59.722] >
[12:04:59.733] >
[12:07:59.744] >
Below is the output on the install terminal. At the end of this output, there's a small bar moving very slowly like a progress bar.
6c2c07692b2a: running
Acquiring lock on /users/<myuserid>/.vscode-server/bin/<commitid>/vscode-remote-lock.<commitid>
Found existing installation at /users/<myuserid>/.vscode-server/bin/<commitid>...
Found running server...
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
*
Checking server status on port 32772 with wget
6c2c07692b2a: start
sshAuthSock====
agentPort==32772==
webViewServerPort====
osReleaseId==centos==
arch==x86_64==
webUiAccessToken====
6c2c07692b2a: end