Vscode wsl could not fetch remote environment. vscode on my MacBook, then reinstalling version 1.
Vscode wsl could not fetch remote environment 572 and WSL2. So I decided to rollback to an older version of vscode! Apr 20, 2022 · 背景介绍 要做系统结构实验,学校和华为云合作使用华为云的 aarch64 裸机,需要使用 ssh 远程开发,笔者为了追求良好的开发体验,决定使用 vscode 开发,实验环境配置过程中遇到了两个问题,在此记录一下(非常痛苦的被折磨了一上午+一中午) windows ssh 报错 Aug 15, 2021 · 远程连接到Linux。输入密码后,右侧会出现两个提示 coude not fetch远程环境无法连接到远程扩展主机服务器(错误: websocket关闭,状态代码为1006) 而且终端无法输入远程目录无法加载我已经尝试过无数次了,重新安装vocode,删除~/. vscode-server on the remote host and . The Laptop s Jun 18, 2020 · Issue Type: Bug Reproduce Step Install a WSL distro and set version to 2 Open Remote-WSL in VSCode Wait and see error: Could not fetch remote environment Failed to connect to the remote extension h Aug 16, 2021 · Please also check if it is already covered by an existing one, like: Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) (#130024) Could not fetch remote environment Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) (#129483) Aug 16, 2021 · Please also check if it is already covered by an existing one, like: Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) (#130024) Could not fetch remote environment Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) (#129483) Nov 8, 2020 · Requests made either to localhost on the client environment, or (iirc) to localhost on the host environment seem to fail to reach the WSL environment intermittently. 4 and adding the parameters the base environment seems to be working again, but the debugging is totally broken, by default the container cannot longer see the WSL host, so xDebug can’t connect, and when the IP actually resolves and the container gets to connect to VsCode, the debug won’t work as expected, just some breakpoints work, and Oct 5, 2024 · I tried removing . 2 Local OS Version: Windows 10 Enterprise 22H2 19045. " Oct 24, 2020 · VSCode Version: 1. 6584 Remote OS Version: Ubuntu 22. 93. I'm pretty new, and don't understand much. 94, but it didn't work. Please let me know if there is any other way to make it work. The problem disappeared after downgrading to version 1. Click bottom right corner to To Open A Remote Window. A web search for this error message lead to an entry on Stackoverflow which indicated some version and update issues in VSCode. * Sep 27, 2024 · VSCodeを使わずにWSL上のUbuntuにアクセスしたところ普通に接続できてしまう というわけで,この対処法について備忘録的にまとめてみたいと思います.. Looking at the output tab I see the following: 文章浏览阅读723次。vscode通过Remote-SSH来进行远程开发,连接Linux开发环境时遇到error:试了通过CMD SSH连接是没有问题的。_could not fetch remote environment Dec 16, 2020 · Could not fetch remote environment Failed to connect to the remote extension host server (Error: Time limit reached) I've started getting these issues since I updated my vscode to Nov 2020 1. 121. I am using a docker container to isolate my environment. 04 LTS, fail with error: Could not fetch remote environment - Stack Overflow that it might be a problem with my WSL extension. Opening a WSL project gives "Could not fetch remote environment. 104. Nov 7, 2024 · Could not fetch remote environment then I followed the following things: Removed wsl server bin and data folder and did wsl --shutdown. [still same error] Downgraded to lower version of WSL and installed. 1 OS Version: Windows 10 2004 19041. 50. For tips and questions about GitHub Feb 4, 2025 · I am currently encountering the issue “wsl: Could not fetch remote environment. 1. Mar 28, 2024 · I have tried most of the stackoverflow suggestions: 1, tried wsl --shutdown 2, tried wsl --shutdown and update 3, reinstalling ubuntu 4, closed all vs code tabs and rebooted the systems. 04 LTS, when i open VS code from it the extension doesn't work. 79. 04 Remote Extension/Connection Type: Dev Containers/WSL/Remote - Tunnels/VS Code Server All I get is Could not fetch remote environment and Failed to Remote Development Tips and Tricks This article covers troubleshooting tips and tricks for each of the Visual Studio Code Remote Development extensions. Contribute to microsoft/vscode development by creating an account on GitHub. Jul 10, 2025 · Steps to reproduce: Launch vscode from inside a WSL terminal. 121-microsoft-WSL2-standard, so the newest. remote-wsl` 擴展,然後重新加載 VS Code 。 2. 928) VScode: Version 1. vscode - server/ directory,等等。见鬼,我该怎么办。 11 22 Feb 14, 2024 · Does this issue occur when all extensions are disabled?: Yes VS Code Version: 1. 2 695af09 x64 OS Version: Two errors pop up when I opened my VScode: Coude not fetch remote environment Failed to connect to the remote extension host ser Dec 15, 2019 · Additionally, the Terminal window is stuck on "Starting". I used to be able to us vscode to remote to some Raspberry Pis (running Rasbian) - but recently it While trying to launch vscode on WSL Ubuntu 20. Or try the introductory Tutorials to help get you running quickly in a remote environment. 2130 Remote OS Version: Debian GNU/Linux bookworm/sid Remote Extension/Connection Type: Containers Logs: [231 ms] Dev Conta Dec 3, 2020 · Hello I'm newbie using an Linux environment and VS code. 1 Local OS Version: 10. 55. The editor launches but then I have two errors appearing: Could not fetch remote environment Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) I can't open the WSL directory dir under which I launched the editor. 2 Sep 30, 2020 · I'm using vscode in Ubuntu WSL, it was working fine a couple of hours ago and suddenly stopped working as I started writing js. [still same error] Couldn't even uninstall WSL Extension from VS Code, it says "WebSocket close with status code 1006" Aug 16, 2021 · 1 I changed the setting remote. Hope this helps you. server. 572 While trying to use VSCode on WSL Ubuntu, i am getting the error from the title, i searched through all Sep 17, 2024 · 遇到「無法抓取遠端環境」的錯誤時,可以嘗試以下幾種解決方法: 1. connectThroughLocalhost (Settings -> Extensions -> Remote - WSL -> Connect Through Localhost) from disabled to enabled, and that fixed the issue for me. vscode - server Jun 15, 2020 · I have the exact same issue with the same Windows and VSCode Version as corthon. 04 LTS, i am getting the error from the title and the "Failed to connect to the remote extension host server". After entering the password, there are two prompts on the right coude not fetch remote environment failed to connect to the remote extension host server (error: websocket close with status code 1006) And the terminal stuck and cannot input The remote directory could not be loaded I had tried countless times in many ways Reinstall vocode,delete ~/. See the SSH, Containers, and WSL articles for details on setting up and working with each specific extension. In WSL 2 i've got installed Ubuntu 20. 19. … Jul 27, 2021 · Remote connection to Linux. I have tried deleting and reinstalling vscode but that does not work I have a problem with VS Code remote development. Resolution: In the windows command prompt, run wsl -l --running wsl --shutdown Restart WSL wsl Go to Visual Studio Code. Switching back to an old Linux Kernel version is not an option since I want to use CUDA with WSL, which only works with 4. 53. Select Connect to WSL Then upon opening folder of one of my repos located in WSL, I am able to load it. The linux kernel version is 4. Nov 17, 2020 · As soon as I updated to WSL2 i get the following error in vscode after typing code . Thanks! Apr 6, 2022 · VSCode Error: Could not fetch remote environment. It doesn't work with the VS Code Insider Version 1. 4. Jan 3, 2021 · Remote WSL - could not fetch remote environment - Kaspersky Internet Security fix #4249 Open devspyrosv opened this issue on Jan 3, 2021 · 0 comments devspyrosv commented on Jan 3, 2021 • Sep 17, 2021 · Visual Studio Code. Jul 22, 2024 · vscode vscode连接wsl时显示:could not fetch remote environment以及failed to connect to the remote extension host server (Error:WebSocket close with status code 1006),需要怎么解决(或者类似问题的解决办法) 刚接触计算机和vscode,实属笨拙,感谢解答,感激不尽 写回答 好问题 提建议 关注 Sep 23, 2025 · VSCode Version: 1. 7 either. I am using Windows 10 2004 19041. **重新安裝 Remote WSL 擴展**: - 這是解決此問題的一個常見方法。您可以在 VS Code 擴展視窗中,找到並重新安裝 `ms-vscode-remote. I can't open any projects in WSL, and opening projects as non-WSL still gives extension errors. 52, I connect remote ssh through sublime and webstorm to my server with no issues at all. 72. I'm trying to set up development environment but WSL isn't working in VS co Mar 18, 2021 · The problem: VSCode couldn’t connect to WSL and gave the message “Could not fetch remote environment”. I've used windows terminal to access on WSL2 and it worked well. WSL. It throws 2 errors: Could not fetch remote environment Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) I just want to edit an html file Any ideas of what is happening? Windows 10 Home: 20H2 (OS build 19042. Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) Asked 3 years, 5 months ago Modified 3 years, 5 months ago Viewed 2k times Hi, after updating to the Remote-WSL extension 0. Jul 22, 2024 · 遇到 "could not fetch remote environment" 和 "failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)" 这类错误时,可以尝试以下步骤进行故障排除和解决: 检查WSL配置: 确保WSL已经安装并正确配置。可以通过 wsl --list --verbose 命令来检查安装的Linux发行版。 确保VSCode的Remote - WSL 扩展 While trying to launch vscode on WSL Ubuntu 20. 94版本更新后,部分用户在使用Remote-SSH连接远程服务器时遇到了"Could not fetch remote environment"错误提示。该问题表现为: 成功建立SSH连接后 尝试打开远程文件夹时 环境初始化失败并显示错误信息 问题根源 根据用户反馈和日志分析,该问题主要与以下因素相关: 版本兼容性问题 Dec 27, 2024 · Getting this in Virtual Studio Code ( aka VSCode, vscode )? Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) and Could not fetch remote environment Clear the running remote agent (also called server) and let VScode reconnect: Oct 31, 2022 · VSCode Version: 1. When vscode launches I get the error: Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006) as a notification. : Could not fetch remote environment Failed to connect to the remote extension host server (Error: connect ECONNREFUSED ::1:43841) This is the WSL-Log: 问题现象 在VSCode 1. 26100. vscode on my MacBook, then reinstalling version 1. 0. ” However, my VS Code can still access WSL, but Cursor cannot. This works on my main machine, but not on my Laptop which I recently set up. Aug 11, 2020 · Can you paste the full WSL log? (Command: Remote - WSL: Show Log) What distro are you using? Does it happen with all distros? Can you check if a shutdown of the distro helps (wsl --shutdown)? Nov 28, 2020 · Apologies if this is an easy fix, or a silly question. I found through this link VS Code connect to WSL Ubuntu 20. 43is5lhkbm1gyfidki9arknvo3eeeav2lk8yertwzbvunc