When working with WSL sometimes there seems to be an issue connecting to the WSL service. Sometimes this resolves itself in 30 seconds other times it just won’t connect. Typically this happen on startup after working on some code rewrites. You can see on the right that I don’t see my file structure in the file browser and I get a warning when trying to shut down
Steps to Reproduce
Run your code from WSL using Ubuntu. Work on the repo and then chut down cursor. This is one of those annoying intermittent issues. I’m not sure what triggers this.
Expected Behavior
You should see your file system and be able to save files. Note that if I go through the WSL desktop environment I’m able to log in and see my linux files through the command terminal.
I’m wondering if there was any progress on this issue or if anyone was encountering similar issues. I do have the official WSL installed. Its probably an issue with this Anysphere version of the WSL extension?
I have tried shutting down restarting, using the command prompt to shut down and clear any WSL related files for cursor.
Eventually it ends up working but it takes around 30 minutes to start up cursor if this starts acting up. Lots of restarts and then eventually it ends up connecting. It has nothing to do with WSL since I’m able to access my repo through WSL in explorer and through the WSL/Ubunto terminal. Its something related to how cursor connects to WSL.
I will check if 2.3 solves any of these issues. Its not available for download via early access. I don’t want to go with the nightly commits, since that might introduce some regressions.
If anyone else is having this issue just start sursor with a windows based repo, uninstall WSL then reinstall it. Once that is done you can reopen your WSL based project.
That seems to do the trick. Otherwise you are going to waiting minutes potentially hours for this to work. Its very brittle and fidgety. The only thing that seems to work reliable is an uninstall and install.
Thanks for sharing the workaround - that’s helpful for others experiencing this. I’ve passed this on to the extensions team. Please update to version 2.3 when it becomes available (should roll out soon) as it includes stability improvements that may help.
Following up on this. I upgraded to the latest version but the WSL is still very buggy. Its an issue each time I start and stop cursor so its becoming a real pain point
Another observation if anyone is having this issue. I noticed that things have improved with the latest update. I just need to wait for a while on startup before launching cursor. It seems that some background process might be blocking the connection and if it doesn’t catch initially then it just keeps trying to connect.
If you wait for windows to completely finish any startup tasks and then launch cursor that seems to work much better.