When I add a note to a page before it has synced, everything on that page gets deleted on the other devices

Steps to reproduce

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

  1. Open up Obsidian on an unsynced device, like a phone
  2. Add something to a note, like for instance a daily note
  3. Sync device later
  4. Every other device deletes whatever was on that note already, and instead only shows what I included back on step 1.
  5. I can’t get back the note because its not “deleted” so its not available in bulk restore.
  6. The OLD version of the note has to be found in the revision history. Madness ensues.

This is problematic because I use Obsidian as a journal. Sometimes its not open and doesn’t finish syncing before I add something. Losing items WITHIN a note is especially difficult to fix, even more so than scrolling through everything in bulk restore.

Expected result

The expected result is that once everything is synced, the information that I added to the note is just appended to the bottom of the note.

Actual result

The original notes lose all their information, overwritten by the unsynced version of the mostly empty note.

Environment

Windows
iPad
Android Phone


Additional information

This diff shows what happens:

I am a bit confused by this report.

How can you add something if Obsidian is not open?

With sync, you have the sync-specific version history, have you looked there?

Could you kindly provide screenshots of the sync logs from two devices when this behavior happens?

Thanks

Sure, sorry for the confusing wording.

When I use Obsidian on two different devices—let’s call them “device A” and “device B”—the syncing process can create issues. If device B has had Obsidian open for some time and I then open Obsidian on device A, it may take a while for device A to fully sync with device B. During this syncing period, I might start adding new notes on device A.

The problem arises when a note that appears empty on device A finally syncs. Instead of combining the content from both devices, the sync process overwrites whatever I’ve added on device A with the content from device B. This issue is particularly noticeable with daily notes, where I’m frequently updating the same note throughout the day.

Windows Log:

Android Log:
The sync log from that same time is no longer appearing.

I am still a bit confused. Are you describing this or something else?

We are aware of another recent problem with sync that we fixed in 1.4.14. Let me know if your issues are solved when you get it.

Yeah @WhiteNoise , pretty close, except I am experience a different type of this problem. Obsidian deletes the content of the remote note, instead replacing it with the new sync’d local note.

So I’ll need to manually merge the two later using “retrieve history”. This seems to be a bug, because the expected outcome would be to append information to my daily notes, rather delete information.

If it happens again can you kindly provide the logs from the mobile side? Thanks

Hi, following back on this.

I kept forgetting to grab the logs from my mobile device, so I just ended up turning off “Open daily note on startup” on all my devices, and I’m just careful not to open a daily note until the device syncs.

Maybe I’ll check back every so often to see if the bug is eventually fixed. Thanks for trying to help though!

(Incidentally I also turned off the ‘Text Extractor’ plugin because it would create so many .json files that syncing was slowing down. That didn’t really fix anything, but it was something that might be tangentially related.)

This happens with me all the time with the Android app. Only found this thread now, so don’t have log log at hand, but will catch it again.

Here’s the flow that reliably triggers things though, just for reference (and to check against others’ worflows):

  • Ensure that the Android app is not running, for reproducibility
  • Create a daily note in the desktop app (MacOS, Linux, either works), write some stuff there, wait till it syncs
  • On Android take a link from the browser, using the “share” icon, and share it to Obsidian
  • When Obsidian opens, select “insert into daily note” quickly
  • A note will get created in the Android app with the shared link in there
  • The device then syncs, and the note gets overwritten by whatever was added in the Desktop app (the shared link disappears from the note text).

@rrr is it close to what happens to you as well?

Which logs are the most useful? The sync log? Or something else?

I’ve just done the same flow today:

  1. Open the daily note on a laptop, write some content, let it sync
  2. On Android open an app (e.g. a browser), select some link to share
  3. Share to Obsidian, when the pop-up regarding where to insert it pops quickly select into the daily note
  4. See the new daily note created, link pasted
  5. As the app catches up with the sync, see my paste disappear.

The sync logs are below, is there some other log to include?

2024-06-07 11:35 - Connecting to server
2024-06-07 11:35 - Connection successful. Detecting changes...
2024-06-07 11:35 - Server pushed [Gergely-Imreh.local] journal/2024-06-07.md
2024-06-07 11:35 - Merging conflicted file journal/2024-06-07.md
2024-06-07 11:35 - Accepted journal/2024-06-07.md
2024-06-07 11:35 - Fully synced

Android and Desktop versions are both on v1.5.12 (134), for reference.

This just happened for me on the desktop app as well.

I had opened today’s Daily note on one device, but haven’t added any content.
Then I opened Obsidian on this particular device, opened today’s daily note, it was empty, I started writing, then about a line-and-a-half in, the text dissappeared (when the sync was done).

2024-06-22 07:45 - Connecting to server
2024-06-22 07:45 - Connection successful. Detecting changes...
2024-06-22 07:45 - Server pushed [Gergely-Imreh.local] literature-notes/@Ericsson2016.md
2024-06-22 07:45 - Downloading file literature-notes/@Ericsson2016.md
2024-06-22 07:45 - Downloading complete literature-notes/@Ericsson2016.md
2024-06-22 07:45 - Accepted literature-notes/@Ericsson2016.md
2024-06-22 07:45 - Fully synced
2024-06-22 07:45 - Uploading file journal/2024-06-22.md
2024-06-22 07:45 - Upload complete journal/2024-06-22.md
2024-06-22 07:45 - Fully synced
2024-06-22 07:45 - Uploading file journal/2024-06-22.md
2024-06-22 07:45 - Upload complete journal/2024-06-22.md
2024-06-22 07:45 - Fully synced

The sync logs are different here, there’s no note on any merging or anything that is received, rather than pushed?

The version history of the file shows two versions, nonetheless:

Screenshot_2024-06-22_07-53-00

Desktop is on v1.6.3, Linux.