Intermittent data loss for current document

This seems like an important bug: sometimes, seemingly at random, the entire text of the current document besides the title will get deleted. It won’t merely become invisible: the number of words becomes 0, and strangely, if it happens while typing, a message saying “[Document] has been modified externally, merging changes automatically”.

What’s odd is that I am not even signed in. I do not have Obsidian sync, I am operating in restricted mode with no CSS snippets, and the bug occurs even when using the default theme. (It also occurs after reinstalling obsidian.) However, I can’t (yet) reproduce it in the sandbox vault, in part because it’s intermittent and occurs randomly, without any intervention on my part.

Notably, it seems to occur whether I’m typing or not: I can leave obsidian open, come back to the window, and find all of my text gone.

Luckily, the text can be retrieved with undo.

I understand that this sort of issue is probably extremely difficult to debug. I’m happy to help, though. What can I do to gather more information?

Steps to reproduce

Type in a document. After a while, observe that all the text besides the title has been suddenly deleted.

Did you follow the troubleshooting guide? [Y/N]

Yes. My vault is in restricted mode, not signed in, with no snippets, and I’m using the default theme. However, I haven’t observed the bug in the sandbox vault (yet).

Expected result

No data loss.

Actual result

Sudden data loss.

Environment

SYSTEM INFO:
Obsidian version: v1.7.4
Installer version: v1.7.4
Operating system: Darwin Kernel Version 24.0.0: Mon Aug 12 20:54:30 PDT 2024; root:xnu-11215.1.10~2/RELEASE_X86_64 24.0.0
Login status: not logged in
Language: en
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

This sounds like a sync service is removing or changing the file under Obsidian’s nose.

Is your vault in OneDrive, iCloud Drive, Google Drive, etc., or a location watched by a sync service? If so, is the service set properly to always keep a local, downloaded, copy of the entire vault?

I’d start my investigation there.

1 Like

:person_facepalming: Of course, that makes sense. It is in iCloud drive, but I’ve never had this problem before, and I’ve been using this vault for a year or so. I think the issue was that Apple changed something under my nose with the latest OS update: after checking, it seems that all of my files in the vault’s location which used to stay downloaded locally are now up in the cloud. Thanks! :slight_smile:

Yup, this sounds likely. iCloud Drive has a habit of resetting things during an OS update, so it could be the reason it was fine until you recently did a major OS update.


edit: just for anyone else who comes along with the same issue →

Set the vault folder to always be downloaded (if you are using macOS Sequoia or above) or turn off Optimize Mac Storage for the entire iCloud Drive. It should be fine after that, but keep an eye on those settings with any major macOS updates.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.