Skip to content

'No workspace open' error #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lucabol opened this issue Dec 17, 2024 · 51 comments
Open

'No workspace open' error #4

lucabol opened this issue Dec 17, 2024 · 51 comments
Assignees
Labels
bug Something isn't working Cursor This issue specifically relates to Cursor

Comments

@lucabol
Copy link

lucabol commented Dec 17, 2024

I open Cursor with cursor .. I can see the composer history in the sidebar, but when I CTRL+P SpecStory: Save Composer and Chat History I get an empty markdown file with

# No Workspace Open

Please open a workspace to view its data.

I am on:

Version: 0.43.6
VSCode Version: 1.93.1
Commit: a846435528b4b760494a836f96f0739889253530
Date: 2024-12-06T05:11:55.168Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.26100

@empyriumz
Copy link

I got the same error as well:
Failed to read workspace storage: Error: ENOENT: no such file or directory, scandir '/root/.config/Cursor/User/workspaceStorage'

Version: 0.43.6
VSCode Version: 1.93.1
Commit: a846435528b4b760494a836f96f0739889253530
Date: 2024-12-06T05:11:55.168Z (1 wk ago)
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0

@belucid
Copy link

belucid commented Dec 17, 2024

Thanks @lucabol and @empyriumz . We're looking into this now. Might get back to you with some follow up questions.

@belucid belucid added the bug Something isn't working label Dec 17, 2024
@belucid
Copy link

belucid commented Dec 17, 2024

@lucabol and @empyriumz, Cursor made some substantial changes to how they store chat and composer history in 0.43.6. So even though you are both running that version, our extension doesn't "see" chats and composers that were done with 0.43.5 and before.

Can your verify that you have had some new Chat or Composer conversations with Cursor in this workspace since you upgraded? Can you have a quick conversation in a chat or composer, and try it again, and see if this new conversation shows up when you save with the extension.

Thanks!

@belucid
Copy link

belucid commented Dec 17, 2024

@empyriumz what's a bit odd about the error message you posted is that's the Linux path, not the macOS path. The Linux path is the fall through when Node's process.platform isn't darwin or win32.

@empyriumz
Copy link

@belucid I'm running a remote docker container so I guess that's the reason. There is no /root/.config directory here. I can find this /root/.cursor-server/data/User/workspaceStorage, which I think is one containing chat history?

@nickknyc
Copy link

windows too

Version: 0.43.6
VSCode Version: 1.93.1
Commit: a846435528b4b760494a836f96f0739889253530
Date: 2024-12-06T05:11:55.168Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.26120

@lucabol
Copy link
Author

lucabol commented Dec 18, 2024

@belucid I have not upgraded. I have used Cursor composer yesterday for the first time with 0.43.6. All my history should be with that version.

@danlannan777
Copy link

I'm also having this issue. I'm running Cursor on Windows with WSL. I'm not sure if WSL is the cause of the issue.

This is a sick idea though. I've been thinking about how I could attach https://github.com/mem0ai/mem0 to my composer to solve this problem

image

@cjsauer
Copy link

cjsauer commented Dec 18, 2024

Thanks all for reporting. The latest extension release v0.2.3 should address workspace loading issues. I tested on Windows and verified it's working for me. @empyriumz I think there's a small chance that this also fixes your issue, but admittedly I have not yet tested using a remote docker session. If that ends up not being the case, please open a separate issue and I'll look into it.

@cjsauer cjsauer closed this as completed Dec 18, 2024
@cjsauer
Copy link

cjsauer commented Dec 18, 2024

Tip: in Cursor, open the command palette with cmd+shift+p (ctrl+shift+p on windows) and run Check for extension updates. It should pick up and update SpecStory automatically.

@nickknyc
Copy link

nickknyc commented Dec 19, 2024

Did the update

I am still having trouble - new project - one file - main.py, ask composer to write a hello world. Accept change
Ctrl-Shift-P - select save my composer and chat history - then it creates a file "# No Workspace Open.md"

with the contents...

No Workspace Open

Please open a workspace to view its data.

then I saved as workspace and tried again. Same result.

@lucabol
Copy link
Author

lucabol commented Dec 19, 2024

Fixed it for me but had to download it from MarketPlace instead of 'Check for extension updates', as it didn't show the new version in Cursor.

@belucid belucid reopened this Dec 19, 2024
@belucid
Copy link

belucid commented Dec 19, 2024

@irishcarbomb777 and @empyriumz did you have a chance to try the 0.2.3 update? Did it resolve it for you?

@empyriumz
Copy link

@belucid nope, I updated the extension and now the error message is:
Failed to read composer data from global storage: Error: ENOENT: no such file or directory, open '/root/.cursor-server/data/User/globalStorage/state.vscdb'

@belucid
Copy link

belucid commented Dec 19, 2024

@nickknyc there is a potential timing issue here. SpecStory reads history from Cursor's sqlite database, and that's not written out by Cursor immediately. There's a delay where the history is just in memory, and it eventually gets written. The most we've seen that take is about 20s, but it's not instant. Can you try again now with that same project, and see if it's still got the "No Workspace Open" output?

@belucid
Copy link

belucid commented Dec 19, 2024

@empyriumz can you share more about your remote docker setup? Let us know how (and why) you have the setup you do. Please share in enough detail so that we're able to setup our Cursor in the same configuration and replicate the issue. As you can see from your errors, it is sow checking where you thought the history was, and it turns out it's not actually there. So we need to figure out where it is on your setup.

@nickknyc
Copy link

nickknyc commented Dec 19, 2024

@nickknyc there is a potential timing issue here. SpecStory reads history from Cursor's sqlite database, and that's not written out by Cursor immediately. There's a delay where the history is just in memory, and it eventually gets written. The most we've seen that take is about 20s, but it's not instant. Can you try again now with that same project, and see if it's still got the "No Workspace Open" output?

Same behavior
Screenshot 2024-12-19 111044

@belucid
Copy link

belucid commented Dec 19, 2024

@nickknyc the presence of that particular string ("No Workspace Open") indicates you aren't on the latest version, 0.2.3, which doesn't have that string. Can you check your SpecStory extension version and make sure you get on to the latest version, 0.2.3 and try it again?

@cjsauer
Copy link

cjsauer commented Dec 19, 2024

@nickknyc We are finding that Cursor's marketplace mirror struggles to find and apply new extension versions. In case you run into issues, the latest build can always be found here:

Download link: https://static.specstory.com/vscode-extension/releases/specstory-vscode-latest.vsix

@nickknyc
Copy link

@nickknyc We are finding that Cursor's marketplace mirror struggles to find and apply new extension versions. In case you run into issues, the latest build can always be found here:

Download link: https://static.specstory.com/vscode-extension/releases/specstory-vscode-latest.vsix

will give it a whirl this evening

@nickknyc
Copy link

ok manually installed the vsix - this is what i get when i run save c and c history

a .md file named "# Error.md" that contains the following:

Error

Failed to generate SpecStory: TypeError [ERR_INVALID_URL_SCHEME]: The URL must be of scheme file

@belucid
Copy link

belucid commented Dec 21, 2024

Thanks @nickknyc we'll look into that.

@nickknyc
Copy link

image
image
still having issues - have not had it work for me yet. ;^(

@nickknyc
Copy link

also - repeat attempts to save result in duplicate files being created
image
Version: 0.44.9
VSCode Version: 1.93.1
Commit: 316e524257c2ea23b755332b0a72c50cf23e1b00
Date: 2024-12-26T21:58:59.149Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.26120

@jpabbuehl
Copy link

jpabbuehl commented Dec 29, 2024

There is still an error when saving the composer and chat history.

Failed to generate SpecStory: Error: No workspace is currently open

Thank you very much for your extension. I have been looking for something like that and looking forward to using it.

Does it store the cursor rules used as well? I am thinking of using the composer/chat history to optimize the definition of cursor rules on my own.

SpecStory: v0.2.3

Cursor AI info
Version: 0.44.9
VSCode Version: 1.93.1
Commit: 316e524257c2ea23b755332b0a72c50cf23e1b00
Date: 2024-12-26T21:58:59.149Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.9.3-76060903-generic

@murnanedaniel
Copy link

Also get this error

Failed to generate SpecStory: Error: No workspace is currently open

SpecStory v0.2.4

Version: 0.44.9
VSCode Version: 1.93.1
Commit: 316e524257c2ea23b755332b0a72c50cf23e1b00
Date: 2024-12-26T21:58:59.149Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

Very frustrating, as I would love to use this extension! Great idea.

@belucid
Copy link

belucid commented Jan 3, 2025

will do. @jakelevirne does it also fix the agent conversations?

Nope. Not yet. Next release should fix that. We're actively working on it! Thanks for the interest and patience.

@belucid
Copy link

belucid commented Jan 4, 2025

will do. @jakelevirne does it also fix the agent conversations?

@nickknyc the just released 0.2.6 version has initial support for saving and sharing interactions from Composer Agent.

@belucid belucid closed this as completed Jan 7, 2025
@DotDotJames
Copy link

tried marketplace and download neither works just get

Error

Failed to generate SpecStory: Error: No workspace is currently open

Image

Image

@belucid
Copy link

belucid commented Jan 30, 2025

@DotDotJames I'm curious how you are starting Cursor and opening this workspace. Can you describe the steps?

@belucid belucid reopened this Jan 30, 2025
@gabriel-filincowsky
Copy link

gabriel-filincowsky commented Jan 30, 2025

UPDATE 25-01-30 03:15pm EST: I tried the extension in a project opened as a folder and it works. However, even if you open the same project as a folder the Composer/Chat history is gone because Cursor binds it to the way you opened it (maybe?).


I had previously tested the extension as soon as it was launched, but it never worked for me. I tried again after almost 2 months, but it was still the same.

Image

It seems to find the Composer Storage but it does not find anything in the Workspace Storage.
I installed it following the steps described in the extension details.
My project is being opened as a Workspace and not a Folder.

System Info

Version: 0.45.6
VSCode Version: 1.96.2
Commit: 2a665be30468694ca6fd7a317310ea33eef25430
Date: 2025-01-30T02:36:18.698Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

Version

0.4.2

@belucid
Copy link

belucid commented Jan 30, 2025

@gabriel-filincowsky can you enable the debug tools in the Settings, and then open your project (which is enough if auto-save is enabled, otherwise also attempt a save with SpecStory). Then can you go to the SpecStory logs (use command-pallette Output: Focus on Output View and then select "SpecStory" in the dropdown (see screenshot).

Can you then paste everything from the logs here so we can see what's going on? It'll show what we're finding (or not) as your workspace, and the supporting DB for it.

Image

@gabriel-filincowsky
Copy link

I just found a workaround. I am detailing it in another comment.
Thank you for the quick response though.

@belucid
Copy link

belucid commented Jan 30, 2025

@DotDotJames it would be helpful as well if you could follow the above steps ⬆

@gabriel-filincowsky
Copy link

gabriel-filincowsky commented Jan 30, 2025

Okay, I think I have a workaround, not a solution but it might help others.

Apparent Issue

Not sure if that is the same for everyone, but I noticed if I open a project as a workspace the extension does not work. However, if I open a project as a folder the extension works.

You might say, just reopen the same project as a folder! The issue is if you do that all the history of Composer and Chat is "lost". At least you can see it because Cursor creates a new database for it. The same happens if you rename a folder (project root).

Workoround

Although you might think you lost the history, you can still access it if you open the project as a workspace as before. This information is useful because it indicates that the history is not lost. You can actually retrieve the information history and insert it into the 'open as a folder' method (which works with the extension).

Where the information is stored

Cursor stores the Composer and Chat history in the following location (depending on your operating system):

  • Windows: %APPDATA%\Cursor\User\workspaceStorage
  • WSL2: /mnt/c/Users/<USERNAME>/AppData/Roaming/Cursor/User/workspaceStorage
  • macOS: ~/Library/Application Support/Cursor/User/workspaceStorage
  • Linux: `~/.config/Cursor/User/workspace
How to copy the history

If you open this location you will notice a lot of folders. Each folder is related to a project. It is possible to just copy and paste the content of one folder to the other to restore the history. The issue is how can you know which folder is which.

I am sure that you guys will come up with a better solution, but my solution is the following:

  1. Open the project as a folder.
  2. Open Composer and send a message. (select gpt4o-mini to avoid wasting credits).
  3. Go to the location where Cursor stores the history.
  4. Change the directory sorting to show by 'date modified'. This will make the last folder to receive an update go up. And, if before opening the project as a folder you had the project opened as a workspace, you are going to notice that the folder before the top will have a larger size.
  5. Open the folder before the top and copy all content except for the workspace.json file.
  6. Ensure the Cursor is completely closed.
  7. Go back to the main directory where Cursor saves the history.
  8. Open the top folder and paste and replace there.

Now when you open Cursor again you will notice that the full Composer and Chat history for the project will load up. And now you can save it using SpecStory.

Image

Feedback

Let me know if this works for you.

@DotDotJames
Copy link

will try full steps later -- turns out it was saving even though wasn't saying it was error still shows tho seemingly works so thats awesome and seriously appreciate quick replies!

@DotDotJames
Copy link

@DotDotJames it would be helpful as well if you could follow the above steps ⬆

@belucid here's log of workspac, still get same error even tho is actually working, i.e., shows no settings fold (even after fixing a possible folder log at workspace level) hope it helps!

[2025-01-31T04:02:02.401Z] [INFO] Loading current workspace | {"file":"c:\Users\temp\Desktop\Sloop\customers\FAB\c-PAB.code-workspace","hasWorkspaceFolders":true,"folderCount":2,"workspaceFolders":["file:///c%3A/Users/temp/Desktop/Sloop/customers/FAB","file:///c%3A/Users/temp/Desktop/Sloop/legal/ip/all-you-need"]}
[2025-01-31T04:02:02.422Z] [WARN] No matching workspace found | {"file":"c:\Users\temp\Desktop\Sloop\customers\FAB\c-PAB.code-workspace","hasWorkspaceFolders":true,"folderCount":2,"workspaceFolders":["file:///c%3A/Users/temp/Desktop/Sloop/customers/FAB","file:///c%3A/Users/temp/Desktop/Sloop/legal/ip/all-you-need"]}
[2025-01-31T04:02:02.422Z] [ERROR] Failed to auto-save composers (trigger: db-watcher) | {"error":"No workspace is currently open"}

@hp-ekko
Copy link

hp-ekko commented Feb 3, 2025

Failed to auto-save composers (trigger: db-watcher) | {"error":"No workspace is currently open"}
到现在似乎还没有一个好的解决方式

@hp-ekko
Copy link

hp-ekko commented Feb 3, 2025

目前已解决
1、关闭现有工作区
2、重新打开新的工作区,并打开项目或者文件夹
3、配置 SpecStory autosave
4、解决问题,现在已经可以正常工作,恢复正常后,可以看到autosave status on

Image

@belucid
Copy link

belucid commented Feb 3, 2025

@DotDotJames It looks like your logs don't have developer logging enabled.

If you go to "VS Code Settings" and then search for "specstory", it's this checkbox:

Image

That'll provide much more detailed "DEBUG" log output and hopefully we'll be able to see why your workspace isn't being found.

@belucid
Copy link

belucid commented Feb 3, 2025

@gabriel-filincowsky it would still be interesting to know why it's not working for you when opening the project as a workspace. The extension is designed to work no matter if the project is opened from a workspace or from a directory. In general this does work from a workspace, so it would still be useful to see your debug level logs, which will show the details of how the extension is looking for your state DB when opening from a workspace.

@belucid belucid assigned belucid and unassigned cjsauer Feb 3, 2025
@harrisyu
Copy link

Same here on windows 11, cursor 0.45.11.

@belucid
Copy link

belucid commented Feb 26, 2025

@harrisyu @gabriel-filincowsky @DotDotJames @hp-ekko this should be resolved for you in release 0.6.2. There hopefully shouldn't be any cases left where SpecStory reports not being able to ascertain the workspace (whether there is an explicit workspace file or just an opened folder/dir).

Let us know if you still have any cases where it's not working for you.

@belucid belucid closed this as completed Feb 26, 2025
@harrisyu
Copy link

@harrisyu @gabriel-filincowsky @DotDotJames @hp-ekko this should be resolved for you in release 0.6.2. There hopefully shouldn't be any cases left where SpecStory reports not being able to ascertain the workspace (whether there is an explicit workspace file or just an opened folder/dir).

Let us know if you still have any cases where it's not working for you.

Works fine in cursor 0.46.6 ! Thank you !

@belucid
Copy link

belucid commented Feb 27, 2025

@harrisyu 🎉

@moukr
Copy link

moukr commented Mar 8, 2025

Both my CURSOR and SPECSTORY are the latest versions, but this problem still exists.

Image

@moukr
Copy link

moukr commented Mar 8, 2025

and nothing in workspace

@belucid belucid reopened this Mar 8, 2025
@belucid
Copy link

belucid commented Mar 8, 2025

@moukr can you:

  • go to the output view (Command Palette: Output Focus on Output View)
  • then select "SpecStory" from the dropdown on the right (it'll be showing "Tasks" by default)
  • Use the button just to the right of the dropdown to clear the logs, then toggle Auto-save off then on in the SpecStory settings.

This will give us a fresh log of SpecStory's attempt to open the DB for your workspace. If you can provide the logs, we can help you more from there.

Alternatively, you can grab a spot with us here: https://calendly.com/d/crnq-qxh-8m9/specstory-support

@danielmeyer-sa
Copy link

@belucid

I get the same error as @moukr .

Here's my error log when trying to save a specstory.

[2025-04-11T07:44:23.373Z] [INFO] Starting SpecStory save generation
[2025-04-11T07:44:23.373Z] [INFO] Workspace storage path | {"path":"/Users/danielmeyer/Library/Application Support/Cursor/User/workspaceStorage"}
[2025-04-11T07:44:23.373Z] [INFO] Loading current workspace | {"file":"1741683243954","hasWorkspaceFolders":true,"folderCount":1,"workspaceFolders":["file:///Users/danielmeyer/SAProjekt/projectname"]}
[2025-04-11T07:44:23.381Z] [ERROR] No matching workspace found | {"file":"1741683243954","hasWorkspaceFolders":true,"folderCount":1,"workspaceFolders":["file:///Users/danielmeyer/SAProjekt/projectname"]}
[2025-04-11T07:44:23.381Z] [ERROR] Failed to generate save | {"error":"No workspace is currently open","stack":"Error: No workspace is currently open\n\tat $r.getAllWorkspaceComposers (/Users/danielmeyer/.cursor/extensions/specstory.specstory-vscode-0.10.0/dist/extension.js:297:7729)\n\tat async Ur.selectComposers (/Users/danielmeyer/.cursor/extensions/specstory.specstory-vscode-0.10.0/dist/extension.js:297:8395)\n\tat async Ro (/Users/danielmeyer/.cursor/extensions/specstory.specstory-vscode-0.10.0/dist/extension.js:293:2541)\n\tat async aG.h (file:///Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:138:33039)"}

@belucid belucid added the Cursor This issue specifically relates to Cursor label Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cursor This issue specifically relates to Cursor
Projects
None yet
Development

No branches or pull requests