Obsidian Sync: updates from one device overwritten by mobile (Android) device

First and foremost, bugs related to Obsidian Sync are challenging to reproduce and isolate. So I’ll start this topic and hopefully be able to improve details and isolate.

Bug description

Sometimes Obsidian Sync will erase file content.
From what I can see, it’s always going to be my Android device, which will overwrite with an almost empty version (only frontmatter with a date).

This empty file with created property is a file generated using a template on new file creation.

Hopefully, the previous state can be restored, but I don’t know how often and on which files this happens, which scares me of losing date without realizing it.
Typically, I will remember that content existed in the note. But in a few years or even months, I won’t necessarily remember that those notes used to hold some content.

Environment

Current setup (device name for sync in parentheses):

Example

Screenshot shows the last record of the file according to Sync version history. As you can see, the file used to have content but my mobile device surprisingly updated with an empty version.

The new content with property and cursor anchor is generated on file creation using Templater plugin. We can see here that the file got overwritten.

Steps to reproduce

Not determined yet. Haven’t been able to isolate and reproduce this on purpose.

Similar reports

Disclaimer: I am not sure that those are related to my issue.

More to be added as I find them or some suggest

I am currently trying the trick described in this discussion in Templater Github: Folder Templates, Obsidian Sync and Obsidian being open on two Machines · SilentVoid13/Templater · Discussion #1096 · GitHub

If that doesn’t help, I recommend taking advantage of the support you’re entitled to by emailing [email protected].

Moving to Help since there aren’t steps to reproduce and it’s not clear if you followed the troubleshooting steps suggested in the bug report template. Good luck!

Yes, I followed the “Troubleshooting Guide”. However, for the steps to reproduce, I cannot provide them as I still don’t understand what is happening to be able to tell those steps. I was hoping for some devs to have ideas about what could cause this, so we can investigate.

Is the Help section checked by the core team?

I believe I’ve got an idea on what’s happening. Let’s say you create a note “A” which automatically also creates “A1” and “A2”. You do this on your desktop and fills in some bits and pieces, but at the same time your Android device is offline and don’t sync up everything.

You then go somewhere, and find the inspiration to write something on “A2”, so you create “A” which b again creates “A1” and “A2” on Android (but it still hasn’t synced this version). You update the “A2” note, and when you get back to sync the sync tool just sees all three notes, and the Android device has the newest modification date, so it blatantly assumes the newer are the better version…


In a larger system we had this issue, and to solve it we needed to implement unique ids and timestamps to be able to discern which files where created, and whether their origin was done “offline” to the main system or not.

I do not have any clue as to whether Obsidian’s sync tool has this kind of detection at some point or not. But if your case is somewhat similar to this, a good workaround is to make sure that Android is up-to-date before going offline…

The surest way to track down a tricky issue with Sync is to email support.