This happens when using Obsidian Sync on multiple devices (Macs + iOS devices).
For a specific file (Daily Note for example), one device (Mac) starts with version 1 and sync across all devices using Sync. Then I add some update to the file, making it version 2. At this time the iOS device hasn’t sync this version 2 due to lack of background sync when the app is not opened. If I now open Obsidian on iOS with daily note at version 1, and immediately add some content, if it works correctly, the file should be version 2, and try to resolve merge with server-side version 2 to make it version 3. But no, Obsidian think this updated file on iOS (version 1 + update) is version 3, and overrides the file on the mac with current content on iOS, so essentially the previous updates on the Mac was erased.
I now have to keep an eye on the Sync status every time I open Obsidian on iOS, and have to wait for the sync to complete before I can edit the note or use QuickAdd plugin, otherwise it would intermittently trigger the above issue.
And moreover, there is no warning or merge conflict in this case, the file overwrite process is silent. If I notice the data loss, I have to use “View Sync version history” to restore the previous version and redo my current edit. But most of the time I wouldn’t even notice the file content was missing part of my previous update…
Steps to reproduce
I currently don’t have a clear minimal reproducible case / procedure. But it can be briefly illustrated as follows:
Assume two devices using Obsidian Sync: Mac and iPhone.
1. Start new file with content on Mac
Version 1 content:
# Heading
- This line was from Mac, initial version
2. Wait for it to sync to iPhone
Now both devices have file at Version 1.
3. Close iOS Obsidian app
4. Make Edit on Mac
Version 2 content:
# Heading
- This line was from Mac, initial version
+- This line was updated on Mac, line 2
5. Open Obsidian app, and immediately edit the file
Usually Sync was not yet completed (either not started or in progress). Now the file on iOS should look like:
# Heading
- This line was from Mac, initial version
+- This line was updated on iPhone, line 3
6. Sync override the Mac updates
Version 3 content:
# Heading
- This line was from Mac, initial version
+- This line was updated on iPhone, line 3
Line 2 update was lost.
Expected result
Either properly handle the merge, resulting in:
# Heading
- This line was from Mac, initial version
+- This line was updated on Mac, line 2
+- This line was updated on iPhone, line 3
Or handle it as conflict, concat both versions
# Heading
- This line was from Mac, initial version
- This line was updated on Mac, line 2
+# Heading
+- This line was from Mac, initial version
+- This line was updated on iPhone, line 3
Actual result
# Heading
- This line was from Mac, initial version
+- This line was updated on iPhone, line 3
Environment
- Operating system: macOS & iOS
- Debug info:
SYSTEM INFO:
Obsidian version: v0.13.24
Installer version: v0.12.15
Operating system: Darwin Kernel Version 21.4.0: Tue Jan 18 13:02:08 PST 2022; root:xnu-8020.100.406.0.1~18/RELEASE_ARM64_T8101 21.4.0
Login status: logged in
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Legacy editor: off
Base theme: light
Community theme: Minimal
Snippets enabled: 1
Safe mode: off
Plugins installed: 28
Plugins enabled: 24
1: Advanced Tables
2: Calendar
3: Quick Switcher++
4: Natural Language Dates
5: Linter
6: Custom window title
7: QuickAdd
8: Advanced URI
9: Metadata Extractor
10: Graph Analysis
11: Diagrams
12: Tasks
13: Annotator
14: Open vault in VSCode
15: Highlightr
16: Local images
17: Contextual Typography
18: Global Hotkeys
19: Templater
20: Minimal Theme Settings
21: Dataview
22: Admonition
23: Excalidraw
24: Style Settings
RECOMMENDATIONS:
Custom theme: for cosmetic issues, please first try updating your theme to latest. If still not fixed, please try to make the issue happen in the help vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the help vault or disable community plugins.
Additional information
File content is private, but notice the file size. I did not delete anything when edit on the iPhone (only appended one line). All the edits from Mac between the two iPhone edits was lost. The last iPhone edit was based on the 1.47KB file version.
I can provide the screenshot of Sync Version History screenshots with file content to the developers privately upon request.