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

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

I’m having the same issue. I also had some conflicts show up when I was on my windows PC, after I just setup a new macbook. These are the same file and showed up while editing the same note on Windows. Macbook was closed at the time.

image

I do currently have my vault set to a folder that’s in Dropbox so it might explain some of my issues. I plan to move away from that today or tomorrow when I have time.

Can we please keep this on topic? This is about Obsidian Sync Only. We have already recommended to not mix sync with other sync solutions.

Hi there, I’m also facing this issue.
It seems like a combination of plugins

Steps to reproduce

  1. Vault connected to Obsidian sync
  2. Daily notes has checked “Open daily note on startup”
  3. You are using a template that contains
---
 some_data_here: something
---

at the bottom, I'm also having "dataview"
```dataview
Somethings
'''
  1. At the beginning of a new day open Obsidian on Android(the same is true for Windows) and edit this daily note
  2. Open Obsidian at Mac and notice a new template was applied, but it’s concatenated to edited one during sync.

Examples:

  1. Edited note
---
 some_data_here: something
---

Today is a great day! – this is a new line

at the bottom, I'm also having "dataview"
```dataview
Somethings
'''
  1. Synced note
---
 some_data_here: something
---

at the bottom, I'm also having "dataview"
```dataview
Somethings
'''
```---
 some_data_here: something
---

Today is a great day! – this is a new line

at the bottom, I'm also having
```dataview
Somethings
'''

So it seems like a new template/page is created before “sync” and the merging process doing bad with --- and “```” backslashes

The issue with daily notes is well known. It happens because the daily note is created/opened before sync has the chance to download it. I am not sure we’ll do anything to fix this.

The rest of the reports in this thread are too vague and not actionable. I am going to close this thread. If anybody has this issue with Obsidian Sync and is able to provide reproduce steps, please open another bug report.

1 Like

I wrote Licat here how it happened. These aren’t exact repro steps because it doesn’t happen often enough, but it does happen now and then (without any other sync services running).

This was his reply.

What has happened according to Licat:
the file was downloaded, accepted, but then the next server push it was determined to be in conflict, which it normally shouldn’t if it was just downloaded

This is not a problem with daily notes (the automatic creation), but could also happen in them because they are normal notes.

Note: the links go to discord and are only accessible for mods

1 Like

This has been happening for weeks for me and it’s kinda nerve-wrecking to have to clean up every time as it’s not always obvious which version is newest. It’s not just daily notes for me, it’s also notes that I do work on generally. Here’s an example of a new MOC that just had a “stacked sync” condition as described. I find that my mobile app disconnects from the vault quite often, and whenever I reconnect it does this to all notes with data where the mobile note is different from what’s synced from desktop. Most often, for me the newest content ends up at the bottom. I think the order of where the newest content ends up has to do with 1. which device the newest content was edited in (for me, usually desktop), and 2. which device (in my case, mobile phone/vault) got disconnected from the synced vault and has to reconnect - possibly pushing outdated content to the cloud. Here’s a screenshot of what the stacked syncing actually looks like: Screen Shot 2021-09-02 at 8.41.29 AM|330x500

5 Likes

I have created a new post with (I hope) a clear description of what happened to me.

I will close this report, because it also contains different issues. If you experience the same issue as described in the post linked above, please add a comment to it.
If your issue is different, please open a new bug report.