Environment Variable Parsing Bug in Cursor IDE

Hi,

I finally came back to Cursor after a ~14 day hiatus with a fresh pair of eyes and got Cursor to help me find the root cause of the problem…

The root cause of the problem is the folder where Cursor stores state in the globalStorage folder inside a user’s Library folder

Unfortunately, the solution wiped the chat history, so I’m not able to show what happened, but suffice to say, I was asked to completely shut down Cursor and run the following command in Terminal and I think it’s worked:
rick@Mac ~ % rm ~/Library/Application\ Support/Cursor/User/globalStorage/state.vscdb* 2>/dev/null && echo “State files removed. Please restart Cursor.”
State files removed. Please restart Cursor.
rick@Mac ~ %

Cursor stored my initial .env file which had documentation within it (it was a repo I had cloned), like this:

In the .env file:

CACHE_STORE=database # Other options include ‘filesystem’

Despite changing the value to CACHE_STORE=filesystem, what it actually stored was ‘CACHE_STORE=database # Other options include ‘filesystem’’ as a string…

No matter what I did, nothing would change the value of CACHE_STORE when I tried to run the code in Cursor…It was only when I tried to duplicate the error in Windsurt out of desperation that I realised that this was a bug in Cursor.

I hope this helps the team fix this incredibly painful issue - I lost two weeks worth of work because of this - In sheer desperation I ditched the prototype I was working on and re-built it in another IDE that worked…

It shouldn’t be this hard…Hope this helps others…

4 Likes