getcursor / cursor

The AI Code Editor
https://cursor.com
23.98k stars 1.51k forks source link

WSL extension is supported only in Microsoft versions of VS Code #2027

Open lycfight opened 1 week ago

lycfight commented 1 week ago

1) If you can, please include a screenshot of your problem 2) Please include the name of your operating system 3) If you can, steps to reproduce are super helpful


I am developing using Windows 11 + WSL: Ubuntu 24.04. After installing Cursor and importing the VSCode extension, the terminal shows the following when entering Cursor:

[2024-09-29 07:18:15.385] Extension version: 0.88.4
[2024-09-29 07:18:15.385] L10N bundle: none
[2024-09-29 07:18:15.388] WSL extension is supported only in Microsoft versions of VS Code

Does Cursor not support WSL?

markjfisher commented 5 days ago

Also just got this. Using a WSL folder from my "recents" list I get this: image

markjfisher commented 5 days ago

I tried going to the extensions, and it showed WSL like this: image

Clicking it reopened cursor, but then I get the error:

[2024-09-30 19:08:01.189] WSL extension activating for a local WSL instance
[2024-09-30 19:08:01.196] Resolving wsl+ubuntu-24.04, resolveAttempt: 1
[2024-09-30 19:08:01.196] NodeExecServer run: C:\Windows\System32\wsl.exe --status
[2024-09-30 19:08:01.234] WSL feature installed: true (wsl --status)
[2024-09-30 19:08:01.235] NodeExecServer run: C:\Windows\System32\wsl.exe --list --verbose
[2024-09-30 19:08:01.270] 3 distros found
[2024-09-30 19:08:01.271] Starting VS Code Server inside WSL (wsl2)
[2024-09-30 19:08:01.271] Windows build: 22631. Multi distro support: available. WSL path support: enabled
[2024-09-30 19:08:01.271] Scriptless setup: false
[2024-09-30 19:08:01.271] No shell environment set or found for current distro.
[2024-09-30 19:08:01.352] WSL daemon log file: 
[2024-09-30 19:08:01.355] Probing if server is already installed: if [ -d ~/.cursor-server/bin/51c8aff7cb5a89f4a0e462fbacab938bdbfaf140 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf alpine-; fi; uname -m
[2024-09-30 19:08:01.355] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu-24.04 -e sh -c if [ -d ~/.cursor-server/bin/51c8aff7cb5a89f4a0e462fbacab938bdbfaf140 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf alpine-; fi; uname -m
[2024-09-30 19:08:01.437] Probing result: x86_64
[2024-09-30 19:08:01.437] No server install found in WSL, needs linux-x64
[2024-09-30 19:08:01.437] Getting server from client side
[2024-09-30 19:08:01.438] Server available at 
[2024-09-30 19:08:01.439] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu-24.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 51c8aff7cb5a89f4a0e462fbacab938bdbfaf140 stable cursor-server .cursor-server --host=127.0.0.1 --port=0 --connection-token=2093602930-2684626555-3433266563-2095195016 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2024-09-30 19:08:01.672] Setting up server environment: Looking for /home/fenrock/.cursor-server/server-env-setup. Not found.
[2024-09-30 19:08:01.672] WSL version: 5.15.153.1-microsoft-standard-WSL2 Ubuntu-24.04
[2024-09-30 19:08:01.672] Updating VS Code Server to version 51c8aff7cb5a89f4a0e462fbacab938bdbfaf140
[2024-09-30 19:08:01.672] Removing previous installation...
[2024-09-30 19:08:01.672] Installing VS Code Server for x64 (51c8aff7cb5a89f4a0e462fbacab938bdbfaf140)
[2024-09-30 19:08:01.672] Downloading:     100%
[2024-09-30 19:08:01.672] Failed
[2024-09-30 19:08:01.673] --2024-09-30 20:08:01--  https://update.code.visualstudio.com/commit:51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/server-linux-x64/stable
[2024-09-30 19:08:01.673] Resolving update.code.visualstudio.com (update.code.visualstudio.com)... 13.107.246.64, 2620:1ec:bdf::64
[2024-09-30 19:08:01.673] Connecting to update.code.visualstudio.com (update.code.visualstudio.com)|13.107.246.64|:443... connected.
[2024-09-30 19:08:01.673] HTTP request sent, awaiting response... 404 Not Found
[2024-09-30 19:08:01.673] 2024-09-30 20:08:01 ERROR 404: Not Found.
[2024-09-30 19:08:01.673] 
[2024-09-30 19:08:01.673] ERROR: Failed to download https://update.code.visualstudio.com/commit:51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/server-linux-x64/stable to /home/fenrock/.cursor-server/bin/51c8aff7cb5a89f4a0e462fbacab938bdbfaf140-1727723281.tar.gz
[2024-09-30 19:08:01.673] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
markjfisher commented 5 days ago

Ok, I then followed the linked guide from the last line of the log, and what I was missing was the path to windows VS Code on my WSL path, so I added:

export PATH=$PATH:"/mnt/c/Program Files/Microsoft VS Code/bin"

to my bashrc file, restarted cursor, and the server was able to download and install correctly, and the project opened up correctly. So it was a missing path for me.

alvaradojl commented 4 days ago

I have the same problem, but the PATH was not an issue, it was already there, I also added the cursor (windows mounted path) to my zshrc profile but didn't help.

Just to be clear, both programs start fine with code . and cursor . WSL plugin works fine under VSCode but not in Cursor

My Ubuntu version is 22.04, VSCode is 1.93.1 and WSL Plugin is 0.88.4

FelipeB12 commented 4 days ago

I had the same problem with Ubuntu 22.04 and it was solved closing VS and starting Ubuntu from CMD, then reload cursor and connect to WSL with the cursor extension

bnurzhanov commented 4 days ago

I had the same problem with Ubuntu 22.04 and it was solved closing VS and starting Ubuntu from CMD, then reload cursor and connect to WSL with the cursor extension

This sounds promising. Can you please provide a link to the cursor extension?

alvaradojl commented 3 days ago

@FelipeB12 do you mean the VSCode WSL extension? because I don't see any Cursor-specific extension in the gallery

FelipeB12 commented 3 days ago

Screenshot_1

Yes, I had it on VSCode, and cursor imported it from VScode, the extension ID is "ms-vscode-remote.remote-wsl"

alvaradojl commented 3 days ago

mmm I see, I think the new WSL extension 0.88.4 is the culprit, don't update your extension or cursor will stop working 😅

danperks commented 2 days ago

Seems like the extension has some code to specifically check for when's it's being used in the usual VSCode environment vs Cursor or any 3rd party VSCode-based editor.

If an older version works, my best suggestion would be to downgrade to the latest working version for now. Not sure if this will get a fix, as if the extension has been coded to block Cursor like this, there's not much Cursor can do to resolve it besides pretend to be VSCode, which probably wouldn't go down very well.

Unfortunately, Microsoft have every right to block their own extensions from working on anything besides their own VSCode releases.