Issue using Obsidian Sync: sometimes duplication of content in same note

Using

  • Obsidian on windows and MacOS, syncing using Obsidian Sync
  • Obsidian on Android, syncing using Obsidian Sync

Issue
Sometimes content in a note is duplicated. Actually not duplicated, but previous version seems to be below latest version. The complete previous version of the note is available below the complete new version of the note.

Questions

  • Couldn’t find another topic in this forum. Do you know if there is a topic existing?
  • Is this a known issue?
  • Any more info needed to solve the bug?

Thanks

7 Likes

I’m seeing something matching this description in my vault FYI, though I’m not totally sure if it’s due to Sync or not.

Are you creating the daily note on startup? In which notes is this happening?

I just had something like this happen as well.

I’ve moved this to bug reports now and have sent Licat a detailed report.

1 Like

Yes, daily notes are created on startup, but the duplication in the note, is not limited to daily notes. It occurs in other notes as well

2 Likes

Related: Does anyone have tips on how to clean up mass duplication caused by this? I’m looking at Simian (a code duplication detector) and other options.

I’m finding this regularly. This morning a key document I’ve been working on has the content appended three times. It happens frequently with the daily notes too.

1 Like

I think the challenge for any code will be to determine which is the correct content to keep. I had two files corrupted today - one had the content three times, with the most recent in the middle of the file, the other had the latest content at the end.

1 Like

@davidrsim If this happens with daily notes and you have daily notes to load on startup, this is normal (you need to disable autoload daily notes on startup).

If this happens for other notes, can you provide some repro steps?

FWIW, in my case it looks like at least 241 files were affected, and it’s possible that sync race conditions were involved, because I was initially storing my vault in Dropbox and then turned on Obsidian Sync (now using Obsidian Sync only).

I have started to experience something similar this week after migrating from iCloud sync to Obsidian sync. I never had an issue when using iCloud sync but now experience this regularly with Obsidian sync.

By migrating you mean that you removed the folder from iclould and put it somewhere else in all computers?

Yes, I moved it from iCloud to a folder in my local profile (a folder that does not sync to iCloud) and then selected the Obsidian Sync vault.

which files do you get duplicates?

I get it for the daily note if I use Obsidian on more than one device in a day.

I also experienced something similar to one of the comments above where a note that I had edited on my Mac earlier was appended to an earlier version the same note when I looked at it on my iPhone later. That was pretty easy to spot and fix but it does concern me about other conflicts in other notes that I may not have noticed.

I have a similar issue syncing between Windows 10 and Garuda Linux. I have discovered that the line endings are frequently causing Obsidian Sync to merge files. Windows 10 uses CRLF and Garuda uses LF. I use Git as a backup and have set Git to convert eol to LF before committing. That is the only solution I have found thus far. Unless I am mistaken, Mac also uses LF line endings. This may be related to your issue.

2 Likes

That is interesting. Do you think this would still apply if all of the devices are Apple? For example, I have only accessed my vault on a Mac, iPhone or iPad.

It shouldn’t if the vault has been accessed by the same system every time. I assume Apple uses the same line endings on all of their devices.
I used a diff tool to check what changes were occurring to confirm that the issues were not with the Obsidian Sync service.

Same, wasn’t sure if it was the daily note as well or not.