Sync deleted parts of files

I’m not seeing anything specific like this reported yet. However, I may have not been searching using the correct wording.

The problem I have experienced is when I use my laptop, update a note while away from my desk then come back to my desktop and open that note, all my recent additions are gone. When I go back to my laptop and click undo, the recent additions come back on both machines.

I am using last modified:: =dateformat(this.file.mtime, “DDDD, HH:mm”)`` and the note specifically or the types of specifically I have experiences this with or have caught this happening was with my weekly notes.

Steps to reproduce

  1. On machine #1 (laptop) created a new periodic note, a weekly note, from the calendar widget using a template
  2. I jot down my notes with a few backlinks
  3. Sync completes
  4. Next morning, Obsidian is open on my other machine #2 (desktop)
  5. I open that week’s weekly note and content I had added the evening before is gone
  6. Then I go back to my machine #1 which the note was originally created and content added and click “undo” then my notes from that evening come back
  7. This updates the weekly note file on machine #2

I have not yet tested this in a sandbox. As I have also experienced missing files, files I know I have created. I create “people” files and use them as back links within my notes. People I work with a lot some times come up missing from my vault.

Expected result

I expect that this would not happen at all

Actual result

Inconsistency with syncing

Environment

Both machines run latest versions of MacOS and vaults are not stored in other cloud linked folders, they are not within a documents folder, they sit at the user root folder.

would you mind sharing the sync log of both devices and version history of the note when this happens?

I noticed similar things happening to me. It seems to only happen on Android. I have 2 linux computer (fedora) and one Samsung Android phone all syncing. And it has now happened to 5 of my files that I’ve noticed. They basically get almost emptied. It seems to be some issue with the properties. Attach are screenshot of the diff. If I pressed the restore button, then the file was restored and is correct, no errors in it. It was basically the same with the other 5 files. For some reason it looked like the content was inserted in the properties section. And then the android app removed all the text and synced it back to my computers.

There are no errors in the sync log. I can see it downloads the file. There are 2 rows, first is Downloading and second is Accepted. Then its syncing some plugin file. And the it uploads the now (I guess) broken file.


I am experiencing issues like this as well. See my latest post in the bug reports.

@MagnusWestin This may be the result of a merge with conflict, where multiple devices diverged from the synced state and when the reconciliation happens in one of the two devices, Sync does a best effort merge which does not always produce the expected result. In that case, however, a copy of the original note is stored within file recovery plugin. Have you checked it?

Yes, I manged to recover all notes. But I’m very sure it was not a conflict, because I know for a fact that I hadn’t changed those notes on any other system. I basically only work on one of the computers. The sync is so I have the information available on my phone, but I only have 1 single note that I edit on my phone, which is my “inbox” note. And also, one of the notes that got messed up, was a note I hadn’t touched in weeks.

Yes, but if you use a plugin or daily note that automatically adds a content when the file is created (from a template for example): it can happen that:

  1. You edit the note on device 1
  2. Device 2 hasn’t received the note yet
  3. On Device 2, before sync has had the chance to happen, you open the note. The note is then created and prefilled with template.
  4. At some point device 2 receives note from sync
  5. A merge conflict happens and a best effort merge is done. (A copy of the original note on your device is saved in file recovery)
  6. The merged note is then send to sync server and all the other devices get it.

We are trying to improve the workflow around merge conflicts in a future release because we believe that a sizable fraction of sync BRs are due to this.
We hope that once what happens is clear to the users and they have an easy way to recover from a bad merge, we’ll reduce the number of BRs tied to Sync, so we can tackle eventual other bugs.

1 Like

Awesome reply, this really helped me to understand what’s happening. Now I know what to watch out for and how to avoid the issue. With all the plugin’s and multiple devices to sync, this is surely complex. I’m happy that the Obsidian Team is reviewing and discussing the issues.

Thank you again for the reply and others that have contributed.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.