zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
48.8k stars 2.93k forks source link

Zed can't spawn a task: error: can not save history #17495

Open AndreiEres opened 1 month ago

AndreiEres commented 1 month ago

Check for existing issues

Describe the bug / provide steps to reproduce it

After a few runs zed stops spawning tasks. Need to reinstall to fix it.

error: can not save history
warning-path: Unable to locate data directory derived from $HOME: '/Users/andrei
/.local/share/fish'.
warning-path: The error was 'Permission denied'.
warning-path: Please set $HOME to a directory where you have write access.

error: can not save universal variables or functions
warning-path: Unable to locate config directory derived from $HOME: '/Users/andrei
/.config/fish'.
warning-path: The error was 'Permission denied'.
warning-path: Please set $HOME to a directory where you have write access.

error: could not create home directory: '/Users/andrei
/.rustup': Permission denied (os error 13)

⏵ Task `cargo test -p my_lib` finished with non-zero error code: 1
⏵ Command: '/opt/homebrew/bin/fish -i -c `cargo test -p my_lib`'

Environment

Zed: v0.151.1 (Zed) OS: macOS 14.6.1 Memory: 32 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log


notpeter commented 1 month ago

The permissions of your home directory are likely overly restrictive. Did you perhaps accidentally did a chown or chmod to your home dir?

Please paste the output of the following command:

ls -lad $HOME/ $HOME/.local $HOME/.config $HOME/.rustup
Cammisuli commented 1 month ago

I'm getting the exact same error:

error: can not save history
warning-path: Unable to locate data directory derived from $HOME: '/Users/jon
/.local/share/fish'.
warning-path: The error was 'Permission denied'.
warning-path: Please set $HOME to a directory where you have write access.

error: can not save universal variables or functions
warning-path: Unable to locate config directory derived from $HOME: '/Users/jon
/.config/fish'.
warning-path: The error was 'Permission denied'.
warning-path: Please set $HOME to a directory where you have write access.

error: could not create home directory: '/Users/jon
/.rustup': Permission denied (os error 13)

⏵ Task `cargo test -p powerpack_license should_activate_and_get_powerpack_license -- --nocapture` finished with non-zero error code: 1
⏵ Command: '/opt/homebrew/bin/fish -i -c `cargo test -p powerpack_license should_activate_and_get_powerpack_license -- --nocapture`'

Running the ls command I get this:

drwxr-x---+ 123 jon  staff  3936 Aug 22 15:47 /Users/jon//
drwx------@  35 jon  staff  1120 Aug 16 09:36 /Users/jon/.config/
drwxr-xr-x@   5 jon  staff   160 Dec 16  2022 /Users/jon/.local/
drwxr-xr-x@   7 jon  staff   224 Dec 17  2022 /Users/jon/.rustup/