zed icon indicating copy to clipboard operation
zed copied to clipboard

Files not saving on macOS 14.3

Open yashchittora opened this issue 1 year ago • 36 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

The scenario is that I was not editing a existing file. I opened Zed and started writing onto untitled file that is currently unsaved. On saving it , it doesn't respond. The save function , either using menu bar or CMD+S does not work. The app simply stucks and shows a spinning beachball icon (macOS).

Environment

Zed: v0.119.20 (Zed) OS: macOS 14.3.0 Memory: 8 GiB Architecture: aarch64

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

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

yashchittora avatar Feb 02 '24 05:02 yashchittora

just experienced this on Zed Preview. Was trying to properly port a theme

image

tecandrew avatar Feb 02 '24 06:02 tecandrew

may not be related to Zed... might be MacOS related? Seems like I can't save on any other app either. (was trying to save the Zed log file)

image

tecandrew avatar Feb 02 '24 06:02 tecandrew

Mac OS:Apple M2 Pro 14.2.1 (23C71) Zed: v0.119.20 (Zed)

me too. writing in untitled zed, when save or save other and zed begin not respond.

bainian avatar Feb 02 '24 08:02 bainian

Mac OS: Apple M2 Air 14.1.2 (23B92) Zed 0.120.6

Made changes to an existing file and saving does not work. On exit the save or don't save prompt appeared but pressing save did not save the file. Pressing don't save did work.

Edit: Turns out I had insufficient permissions but hadn't seen any warnings and only realised once VSCode complained. I ran sudo chown -R username directory_name

Sakib25800 avatar Feb 04 '24 19:02 Sakib25800

Thanks for that addition @Sakib25800! So you opened a directory but were missing write-permissions in that directory?

Can the others in here confirm that this is the issue?

mrnugget avatar Feb 05 '24 08:02 mrnugget

Yep, exactly.

Sakib25800 avatar Feb 05 '24 15:02 Sakib25800

Is there a pretty way we can present the file permissions?

JosephTLyons avatar Feb 05 '24 18:02 JosephTLyons

Yes. This is an actual issue. It can't save file even with the permission. It completely hangs on Cmd+S.

iamkeyur avatar Feb 17 '24 16:02 iamkeyur

It can't save file even with the permission.

You have write and execute permissions for a directory but can't save a file in it?

mrnugget avatar Feb 19 '24 08:02 mrnugget

It can't save file even with the permission.

You have write and execute permissions for a directory but can't save a file in it?

Yes. That's true.

iamkeyur avatar Feb 21 '24 04:02 iamkeyur

I want to add what I hope is a related aspect. On macOS 14.3.1 with the latest Zed Preview, I've noticed that I cannot save e.g. /etc/zshrc. Pressing ⌘S has no effect. To be clear, there are two problems here: (a) failing silently; (b) not saving.

On the other hand, when saving a file without sufficient permissions many editors (such as Sublime Text) will request permissions from macOS like the following:

image
-r--r--r--   1 root  wheel    3261 Feb 27 07:10 zshrc

xpe avatar Feb 27 '24 12:02 xpe

I had the same issue, FIXED by adding a folder to project first (File-->Add Folder to Project). Now I can save.

arielgamino avatar Feb 29 '24 15:02 arielgamino

same issue here: macOS 13.2.1 Zed 0.123.6

steps:

  1. command + n for new file
  2. type a few lines
  3. command + s to save: hangs for a while, eventually stops hanging, does nothing at all
  4. click File > Save As: hangs for a while, eventually stops hanging, does nothing at all

I currently have it open in this state and can reproduce, lmk if you want me to run any diagnostics while I do it

i-a-n avatar Feb 29 '24 17:02 i-a-n

Broadly, I have same 'cannot save' issue. Always with new files, sometimes with others.

An expectation for users to apply configuration before they can save files is out of alignment with the application's otherwise high standard of quality, so high that I continue to use Zed despite this fundamental flaw.. though eventually some scenario will trigger a rage-existential event.

I am using MacOS 14.1.1

daoulruke avatar Mar 01 '24 02:03 daoulruke

@i-a-n in which folder? which project? or no project open?

mrnugget avatar Mar 01 '24 08:03 mrnugget

I’m certain the issue has struck when no folder or project has been open, I think other scenarios too.

  1. Load Zed [new empty window opens]
  2. File->New [new file opens]
  3. Type content…
  4. Attempt File->Save [no response*]
  5. Attempt File->Save As [no response*]
  • Sometimes I briefly see the rainbow wheel of death, other times nothing at all.

On Fri, 1 Mar 2024 at 21:48, Thorsten Ball @.***> wrote:

@i-a-n https://github.com/i-a-n in which folder? which project? or no project open?

— Reply to this email directly, view it on GitHub https://github.com/zed-industries/zed/issues/7269#issuecomment-1972764743, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ7CER5AE2QNUTZ7NL46ODYWA6FBAVCNFSM6AAAAABCWDOQXOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZSG43DINZUGM . You are receiving this because you commented.Message ID: @.***>

daoulruke avatar Mar 01 '24 09:03 daoulruke

FYI: after updating from 0.123.2 to 0.124.8 it seems the bug is gone.

daoulruke avatar Mar 01 '24 09:03 daoulruke

Can others confirm that it's fixed in the newest version? I assume the file-permission problems are still there, though.

mrnugget avatar Mar 01 '24 12:03 mrnugget

After updating it works perfectly fine for me.

Sakib25800 avatar Mar 01 '24 13:03 Sakib25800

Im on 0.124.8 and still can not save.

SaidAbedi avatar Mar 01 '24 15:03 SaidAbedi

Can others confirm that it's fixed in the newest version? I assume the file-permission problems are still there, though.

I upgraded to 0.124.8 and the workflow that wasn't working now works. I'll report back if it fails again 👍

i-a-n avatar Mar 01 '24 16:03 i-a-n

Im on 0.124.8 and still can not save.

What are your exact steps to reproduce?

As a general note in this issue here: exact steps to reproduce and clarity about what exactly doesn't work are essential. Otherwise we might lump two different issues together and not address root problems.

mrnugget avatar Mar 04 '24 08:03 mrnugget

I've just updated to 0.125.4 (eae06aaca98f0dd941c03679bf2428ad236ba217) and the issue is still there, i.e. anything that gets created outside of any project setup – cannot be saved via either Cmd-S or Cmd-Shift-S. Same steps to reproduce, as above:

  1. New window via Cmd-Shift-N
  2. Modify new buffer that is created automatically
  3. Try saving (Cmd-S/Cmd-Shift-S)
  4. Nothing happens

Ceesaxp avatar Mar 18 '24 10:03 Ceesaxp

@Ceesaxp thanks for the steps!

(FWIW, the newest release is 0.126.2. Not sure that will change anything, but worth a shot.)

Do you see any errors in ~/Library/Logs/Zed/Zed.log when you try to save?

mrnugget avatar Mar 18 '24 10:03 mrnugget

@Ceesaxp thanks for the steps!

(FWIW, the newest release is 0.126.2. Not sure that will change anything, but worth a shot.)

Do you see any errors in ~/Library/Logs/Zed/Zed.log when you try to save?

It got me first up to 0.125.4, now after update to 0.126.2 – it works. And File/Open also works (did not in 0.125.4).

Super!

Ceesaxp avatar Mar 18 '24 10:03 Ceesaxp

Just ran into this issue.

macOS 14.3.1 Zed 0.126.3

No errors in Zed.log when I try to save. Permissions look fine on the new directory. Steps I took:

mkdir ~/Documents/some-folder
zed ~/Documents/some-folder
Open new untitled buffer
Try saving
Nothing happens / beach ball

It does look like Zed auto-downloaded an update (0.127.3) since I ran into this, and now it works fine.

In the previous version (0.126.3), I had an error in the log when I first opened Zed.

2024-03-22T10:28:05-07:00 [ERROR] crates/workspace/src/persistence/model.rs:267: No path stored for this editor

dacort avatar Mar 22 '24 17:03 dacort

Thanks for the comment, @dacort. Sounds like it's fixed in 0.127.3 but I want to confirm something: does Zed.app have access to your Documents folder?

screenshot-2024-03-25-09 30 43@2x

mrnugget avatar Mar 25 '24 08:03 mrnugget

@mrnugget Confirmed that it does. image

dacort avatar Mar 25 '24 16:03 dacort

Still cannot save any file: macOS 14.4.1 Zed 0.135.2 Zed has permission to write files on mac in "Privacy & Security / Files and Folders" I have writing permission in the directory where the project resides

steps:

command + n for new file type a few lines command + s to save: no response command + w to close file: it warns "xxx.txt contains unsaved edits. Do you want to save it?"

using the menu option to save also does nothing.

juliocoelho avatar May 20 '24 12:05 juliocoelho

@juliocoelho anything in the logs?

mrnugget avatar May 21 '24 08:05 mrnugget