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?
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.
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.
@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.
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.
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.