WSL2 not connecting

Sorry to bother people but I can’t seem to get my head around trying to make this work with WSL. My ideal situation is mkdir in WSl Ubuntu and then type cursor . to open the folder in Cursor, but it doesn’t seem to want to play ball.

Currently I have to:

  1. Open Cursor
  2. Ctrl + Shift + P > Fix WSL > Manually open folder

When I type cursor . into WSL I get this:

ln: failed to access '/home/user/.cursor-server/bin//compatibilty-check/bin/remote-cli/code': Not a directory
Updating VS Code Server to version compatibilty-check
Removing previous installation...
Installing VS Code Server for Linux legacy-x64 (compatibilty-check)
Downloading: 100%
Failed
--2024-09-08 07:20:25--  https://update.code.visualstudio.com/commit:compatibilty-check/server-linux-legacy-x64/stable
Resolving update.code.visualstudio.com (update.code.visualstudio.com)... 13.107.246.45, 2620:1ec:bdf::45
Connecting to update.code.visualstudio.com (update.code.visualstudio.com)|13.107.246.45|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-09-08 07:20:25 ERROR 404: Not Found.

ERROR: Failed to download https://update.code.visualstudio.com/commit:compatibilty-check/server-linux-legacy-x64/stable to /home/user/.cursor-server/bin/compatibilty-check-1725776425.tar.gz

Also, is the process to add extensions is ot install them in VS Code first?

In WSL if you paste this, what does it show?

which cursor

This issue is fixed in today’s 0.41.1 release!

no it wasn’t

Version: 0.41.1
VSCode Version: 1.91.1
Commit: 10e3716b510a5d447c1a07b2edd37a352bbea4d0
Date: 2024-09-18T07:38:06.522Z
Electron: 29.4.0
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

opening a WSL folder gives:

VS Code Server for WSL closed unexpectedly.
Check WSL terminal for more details.

and the terminal gives:

[2024-09-21 00:20:14.723] Extension version: 0.88.2
[2024-09-21 00:20:14.723] L10N bundle: undefined
[2024-09-21 00:20:14.753] authorityHierarchy: wsl+ubuntu
[2024-09-21 00:20:14.753] WSL extension activating for a local WSL instance
[2024-09-21 00:20:14.770] Resolving wsl+ubuntu, resolveAttempt: 1
[2024-09-21 00:20:14.771] NodeExecServer run: C:\WINDOWS\System32\wsl.exe --status
[2024-09-21 00:20:14.814] WSL feature installed: true (wsl --status)
[2024-09-21 00:20:14.814] NodeExecServer run: C:\WINDOWS\System32\wsl.exe --list --verbose
[2024-09-21 00:20:14.854] 1 distros found
[2024-09-21 00:20:14.855] Starting VS Code Server inside WSL (wsl2)
[2024-09-21 00:20:14.855] Windows build: 22631. Multi distro support: available. WSL path support: enabled
[2024-09-21 00:20:14.855] Scriptless setup: false
[2024-09-21 00:20:14.855] No shell environment set or found for current distro.
[2024-09-21 00:20:14.949] WSL daemon log file: 
[2024-09-21 00:20:14.952] Probing if server is already installed: if [ -d ~/.cursor-server/bin/10e3716b510a5d447c1a07b2edd37a352bbea4d0 ]; 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-09-21 00:20:14.952] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu -e sh -c if [ -d ~/.cursor-server/bin/10e3716b510a5d447c1a07b2edd37a352bbea4d0 ]; 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-09-21 00:20:15.045] Probing result: legacy-x86_64
[2024-09-21 00:20:15.045] No server install found in WSL, needs linux-legacy-x64
[2024-09-21 00:20:15.045] Getting server from client side
[2024-09-21 00:20:15.046] Downloading VS Code Server stable - 10e3716b510a5d447c1a07b2edd37a352bbea4d0 into C:\Users\<redacted>\AppData\Local\Temp\vscode-remote-wsl\stable\10e3716b510a5d447c1a07b2edd37a352bbea4d0\vscode-server-stable-linux-legacy-x64.tar.gz.
[2024-09-21 00:20:15.607] Unable to download server on client side: Error: Request downloadRequest failed unexpectedly without providing any details.. Will try to download on WSL side.
[2024-09-21 00:20:15.609] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 10e3716b510a5d447c1a07b2edd37a352bbea4d0 stable cursor-server .cursor-server --host=127.0.0.1 --port=0 --connection-token=3080450894-118272977-782809011-3990466446 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2024-09-21 00:20:15.921] Setting up server environment: Looking for /home/<redacted>/.cursor-server/server-env-setup. Not found.
[2024-09-21 00:20:15.921] WSL version: 5.15.153.1-microsoft-standard-WSL2 Ubuntu
[2024-09-21 00:20:15.921] Updating VS Code Server to version 10e3716b510a5d447c1a07b2edd37a352bbea4d0
[2024-09-21 00:20:15.921] Removing previous installation...
[2024-09-21 00:20:15.921] Installing VS Code Server for Linux legacy-x64 (10e3716b510a5d447c1a07b2edd37a352bbea4d0)
[2024-09-21 00:20:15.921] Downloading:     
[2024-09-21 00:20:16.542] 100%
[2024-09-21 00:20:16.542] Failed
[2024-09-21 00:20:16.543] --2024-09-21 02:20:16--  https://cursor.blob.core.windows.net/remote-releases/10e3716b510a5d447c1a07b2edd37a352bbea4d0/vscode-reh-linux-legacy-x64.tar.gz
[2024-09-21 00:20:16.543] Resolving cursor.blob.core.windows.net (cursor.blob.core.windows.net)... 20.209.35.129
[2024-09-21 00:20:16.543] Connecting to cursor.blob.core.windows.net (cursor.blob.core.windows.net)|20.209.35.129|:443... connected.
[2024-09-21 00:20:16.858] HTTP request sent, awaiting response... 
[2024-09-21 00:20:16.948] 404 The specified blob does not exist.
[2024-09-21 00:20:16.948] 2024-09-21 02:20:16 ERROR 404: The specified blob does not exist..
[2024-09-21 00:20:16.948] 
[2024-09-21 00:20:16.948] ERROR: Failed to download https://cursor.blob.core.windows.net/remote-releases/10e3716b510a5d447c1a07b2edd37a352bbea4d0/vscode-reh-linux-legacy-x64.tar.gz to /home/<redacted>/.cursor-server/bin/10e3716b510a5d447c1a07b2edd37a352bbea4d0-1726878015.tar.gz
[2024-09-21 00:20:16.948] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2024-09-21 00:20:18.420] Download in background is enabled

trying to download the file by hand is a 404:
https://cursor.blob.core.windows.net/remote-releases/10e3716b510a5d447c1a07b2edd37a352bbea4d0/vscode-reh-linux-legacy-x64.tar.gz

1 Like

still broken in 0.41.2

Version: 0.41.2
VSCode Version: 1.91.1
Commit: 297991d169fa3a11975c5aa95adc69be73250c70
Date: 2024-09-21T04:18:39.370Z
Electron: 29.4.0
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

and in the terminal:

...
[2024-09-22 07:40:21.959] Downloading VS Code Server stable - 297991d169fa3a11975c5aa95adc69be73250c70 into C:\Users\<redacted>\AppData\Local\Temp\vscode-remote-wsl\stable\297991d169fa3a11975c5aa95adc69be73250c70\vscode-server-stable-linux-legacy-x64.tar.gz.
[2024-09-22 07:40:22.595] Unable to download server on client side: Error: Request downloadRequest failed unexpectedly without providing any details.. Will try to download on WSL side.
...
[2024-09-22 07:40:23.532] Failed
[2024-09-22 07:40:23.532] --2024-09-22 09:40:23--  https://cursor.blob.core.windows.net/remote-releases/297991d169fa3a11975c5aa95adc69be73250c70/vscode-reh-linux-legacy-x64.tar.gz
[2024-09-22 07:40:23.532] Resolving cursor.blob.core.windows.net (cursor.blob.core.windows.net)... 20.209.35.129
[2024-09-22 07:40:23.532] Connecting to cursor.blob.core.windows.net (cursor.blob.core.windows.net)|20.209.35.129|:443... connected.
[2024-09-22 07:40:23.843] HTTP request sent, awaiting response... 
[2024-09-22 07:40:24.027] 404 The specified blob does not exist.
[2024-09-22 07:40:24.027] 2024-09-22 09:40:24 ERROR 404: The specified blob does not exist..
[2024-09-22 07:40:24.027] 
[2024-09-22 07:40:24.027] ERROR: Failed to download https://cursor.blob.core.windows.net/remote-releases/297991d169fa3a11975c5aa95adc69be73250c70/vscode-reh-linux-legacy-x64.tar.gz to /home/<redacted>/.cursor-server/bin/297991d169fa3a11975c5aa95adc69be73250c70-1726990822.tar.gz

PS: I don’t even understand why it’s trying to download vscode-reh-linux-legacy-x64.tar.gz my WSL is the basic ubuntu one not redhat

It has happened to me twice now that cursor has failed in WSL2 - I’ve tried alot of things to fix but ended up wiping Windows completely - i have a fresh image now that i can spin up when this occurs. :man_shrugging: I have also had windows updates break the cursor/wsl2 connection - so it could also be a recent windows update issue.

I am also having the same issue after the latest Cursor.sh update:

Version: 0.41.2
VSCode Version: 1.91.1
Commit: 297991d169fa3a11975c5aa95adc69be73250c70
Date: 2024-09-21T04:18:39.370Z
Electron: 29.4.0
ElectronBuildId: undefined
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631

In the terminal:

...
[2024-09-22 07:40:21.959] Downloading VS Code Server stable - 297991d169fa3a11975c5aa95adc69be73250c70 into C:\Users\<redacted>\AppData\Local\Temp\vscode-remote-wsl\stable\297991d169fa3a11975c5aa95adc69be73250c70\vscode-server-stable-linux-legacy-x64.tar.gz.
[2024-09-22 07:40:22.595] Unable to download server on client side: Error: Request downloadRequest failed unexpectedly without providing any details.. Will try to download on WSL side.
...
[2024-09-22 07:40:23.532] Failed
[2024-09-22 07:40:23.532] --2024-09-22 09:40:23--  https://cursor.blob.core.windows.net/remote-releases/297991d169fa3a11975c5aa95adc69be73250c70/vscode-reh-linux-legacy-x64.tar.gz
[2024-09-22 07:40:23.532] Resolving cursor.blob.core.windows.net (cursor.blob.core.windows.net)... 20.209.35.129
[2024-09-22 07:40:23.532] Connecting to cursor.blob.core.windows.net (cursor.blob.core.windows.net)|20.209.35.129|:443... connected.
[2024-09-22 07:40:23.843] HTTP request sent, awaiting response... 
[2024-09-22 07:40:24.027] 404 The specified blob does not exist.
[2024-09-22 07:40:24.027] 2024-09-22 09:40:24 ERROR 404: The specified blob does not exist..
[2024-09-22 07:40:24.027] 
[2024-09-22 07:40:24.027] ERROR: Failed to download https://cursor.blob.core.windows.net/remote-releases/297991d169fa3a11975c5aa95adc69be73250c70/vscode-reh-linux-legacy-x64.tar.gz to /home/<redacted>/.cursor-server/bin/297991d169fa3a11975c5aa95adc69be73250c70-1726990822.tar.gz

I had the same problem with 0.41.2. What helped me is uninstalling WSL extension, then downloading the latest one from the Microsoft Store (Extensions for Visual Studio family of products | Visual Studio Marketplace) and adding it to Cursor. After that it was able to download VS Code Server.

2 Likes

If you remove and reinstall the wsl extension I think it should work.

1 Like