Open ManciDRaffy opened 5 months ago
I was able to reproduce this issue in my setup and find the root cause.
VSCode forces to use latest extension version (0.88.2) for some reason, while Cursor sticks to the extension version 0.81.8. I forced Cursor to install the latest version by downloading it manually and then restart it and it got me to a next step where Cursor is trying to download a different commit ID for the WSL shell environment.
Basically, the current Cursor's build is pointing to the cursor's commit ID, instead of pointing to the VSCode one; in my case, it is looking for the commit id 9a6d781540ba2732cf26551c07629e68121c6580 instead of the id ea1445cc7016315d0f5728f8e8b12a45dc0a7286.
I'd say the issue is somewhat related with Cursor not allowing to download the latest VScode version for wsl extension and/or more deep down, Cursor sticking with the wrong commit ID even after clearing cache
Any updates on this? It is garbage to have to use PowerShell.
Hey, it's been two weeks again. Can I help? Do I need to provide more context? Or is this just a dead issue board :|
I ended up just doing a full os wipe - fresh setup with latest versions of cursor etc. It had been a while anyway. Working now. Something in the update chain or cache is broken since fresh install of everytjing works.
I'm unable to completely reinstall my operating system. I've removed everything related to the cursor, including registry entries and any leftover files. Unfortunately, I'm still getting a "no shell environment" error. Is there a way to enable logging or troubleshooting to help diagnose the issue? I haven't been able to find any relevant options through search or by visually inspecting the system.
It is working on my side after I updated to Cursor version 0.39.0 and VSCode version 1.91.1
Having the same issue. Any update? Cursor version 0.40.1 VSCode version 1.91.1
Hello, I have similar issue on my side, after an update this morning:
[2024-08-29 11:22:04.939] Extension version: 0.88.2
[2024-08-29 11:22:04.939] L10N bundle: undefined
[2024-08-29 11:22:04.993] authorityHierarchy: wsl+ubuntu-22.04
[2024-08-29 11:22:04.993] WSL extension activating for a local WSL instance
[2024-08-29 11:22:05.026] Resolving wsl+ubuntu-22.04, resolveAttempt: 1
[2024-08-29 11:22:05.027] NodeExecServer run: C:\Windows\System32\wsl.exe --status
[2024-08-29 11:22:05.132] WSL feature installed: true (wsl --status)
[2024-08-29 11:22:05.132] NodeExecServer run: C:\Windows\System32\wsl.exe --list --verbose
[2024-08-29 11:22:05.265] 3 distros found
[2024-08-29 11:22:05.266] Starting VS Code Server inside WSL (wsl2)
[2024-08-29 11:22:05.266] Windows build: 22631. Multi distro support: available. WSL path support: enabled
[2024-08-29 11:22:05.266] Scriptless setup: false
[2024-08-29 11:22:05.267] No shell environment set or found for current distro.
[2024-08-29 11:22:05.482] WSL daemon log file:
[2024-08-29 11:22:05.487] Probing if server is already installed: if [ -d ~/.cursor-server/bin/cda482b45f8d679344885ceb091f550a29fb00d0 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; if [ -s ~/.cursor-server/bin/compatibilty-check ]; then printf 'legacy-'; fi; uname -m;
[2024-08-29 11:22:05.488] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu-22.04 -e sh -c if [ -d ~/.cursor-server/bin/cda482b45f8d679344885ceb091f550a29fb00d0 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; if [ -s ~/.cursor-server/bin/compatibilty-check ]; then printf 'legacy-'; fi; uname -m;
[2024-08-29 11:22:05.727] Probing result: legacy-x86_64
[2024-08-29 11:22:05.728] No server install found in WSL, needs linux-legacy-x64
[2024-08-29 11:22:05.728] Getting server from client side
[2024-08-29 11:22:05.729] Downloading VS Code Server stable - cda482b45f8d679344885ceb091f550a29fb00d0 into C:\Users\ANTHON~1\AppData\Local\Temp\vscode-remote-wsl\stable\cda482b45f8d679344885ceb091f550a29fb00d0\vscode-server-stable-linux-legacy-x64.tar.gz.
[2024-08-29 11:22:06.861] Unable to download server on client side: Error: Request downloadRequest failed unexpectedly without providing any details.. Will try to download on WSL side.
[2024-08-29 11:22:06.862] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu-22.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" cda482b45f8d679344885ceb091f550a29fb00d0 stable cursor-server .cursor-server --host=127.0.0.1 --port=0 --connection-token=4100728933-346482070-3250075906-2914110915 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2024-08-29 11:22:07.178] Setting up server environment: Looking for /home/anthony/.cursor-server/server-env-setup. Not found.
[2024-08-29 11:22:07.178] WSL version: 5.15.153.1-microsoft-standard-WSL2 Ubuntu-22.04
[2024-08-29 11:22:07.178] Updating VS Code Server to version cda482b45f8d679344885ceb091f550a29fb00d0
[2024-08-29 11:22:07.178] Removing previous installation...
[2024-08-29 11:22:07.178] Installing VS Code Server for Linux legacy-x64 (cda482b45f8d679344885ceb091f550a29fb00d0)
[2024-08-29 11:22:07.178] Downloading:
[2024-08-29 11:22:07.794] 100%
[2024-08-29 11:22:07.794] Failed
[2024-08-29 11:22:07.794] --2024-08-29 13:22:07-- https://update.code.visualstudio.com/commit:cda482b45f8d679344885ceb091f550a29fb00d0/server-linux-legacy-x64/stable
[2024-08-29 11:22:07.794] Resolving update.code.visualstudio.com (update.code.visualstudio.com)... 13.107.246.43, 2620:1ec:bdf::43
[2024-08-29 11:22:07.794] Connecting to update.code.visualstudio.com (update.code.visualstudio.com)|13.107.246.43|:443... connected.
[2024-08-29 11:22:07.963] HTTP request sent, awaiting response... 404 Not Found
[2024-08-29 11:22:07.963] 2024-08-29 13:22:07 ERROR 404: Not Found.
[2024-08-29 11:22:07.963]
[2024-08-29 11:22:07.963] ERROR: Failed to download https://update.code.visualstudio.com/commit:cda482b45f8d679344885ceb091f550a29fb00d0/server-linux-legacy-x64/stable to /home/anthony/.cursor-server/bin/cda482b45f8d679344885ceb091f550a29fb00d0-1724930527.tar.gz
[2024-08-29 11:22:07.963] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2024-08-29 11:22:10.692] Download in background is enabled
I fixed the issue by following the instruction written in this comment
Latest Windows Update just broke Cursor WSL connection... anyone else?
Ditto for me. Cursor with WSL was working until I installed Windows update
2024-09 Cumulative Update Preview for Windows 11 Version 23H2 for x64-based Systems (KB5043145)
Ditto for me. Cursor with WSL was working until I installed Windows update
I just checked and I haven't installed this update(KB5043145) on my system yet. The Cursor was working fine two days ago, but now I am unable to run it.
EDIT: I have installed the KB5043145 and the problem disappeared.
Same here
I encountered the same issue when trying to connect to WSL. It said, "No shell environment set or found for the current distro." I attempted to fix it by running the "fixwslinstall" command through the Ctrl + P panel, but nothing showed up—not even error messages.
Next, I manually ran the fixwslinstall PowerShell script but encountered a privilege issue. Even when I tried running it as an administrator, it failed. After inspecting the PowerShell code, I found that the failure occurred when copying the server-env-setup
file to the WSL machine. Although I eventually managed to copy this file and others using direct commands, I still encountered the same error as before.
I then reinstalled both the Cursor app and the WSL plugin, but the problem persisted. Finally, I deleted the .cursor folder from the Windows user profile, reinstalled Cursor—and that solved the issue.
I don't know if you are in the same situation as me, but I hope this helps.
I faced the same issue since the latest Windows 11 update. Uninstalling the WSL extension and restarting Cursor did the trick for me. Be sure to close the remote connection first (CTRL+SHIFT+P > "Remote: Close Remote Connection"). Then open any local file (so you have access to the extensions tab), go to the extensions tab in the left side bar, search for "wsl", right click and then "Uninstall". After restarting Cursor my problem was gone.
I faced the same issue since the latest Windows 11 update. Uninstalling the WSL extension and restarting Cursor did the trick for me. Be sure to close the remote connection first (CTRL+SHIFT+P > "Remote: Close Remote Connection"). Then open any local file (so you have access to the extensions tab), go to the extensions tab in the left side bar, search for "wsl", right click and then "Uninstall". After restarting Cursor my problem was gone.
Same here. Opening a local project allowed me to uninstall the extension, and upon restarting cursor I was prompted to reinstall the extension. Reinstalled it and everything seems to be working as normal.
1) If you can, please include a screenshot of your problem
2) Please include the name of your operating system Windows 11
3) If you can, steps to reproduce are super helpful For me its, install cursor and try to connect to WSL.
Tried reinstalling, deleting the .cursor-server folder and the "Fix Wsl inside Cursor".
This error happens since last update to 0.35.1.
Downgrading doesnt fix anything
Edit: Yes the shell is set to /bin/zsh and worked last week until Monday or Tuesday