[Bug] iCloud Sync issue - file loss via Community Plugin?


[ X ] iOS
[ ] Android

Obsidian Mobile version: v1.0.5


I am using Advanced URI community plugin on iOS in my shortcut to append a clipping (e.g. website) to my Daily Note like this:


My vault is synced between Mac and iOS via iCloud. Today (and I think also yesterday) I noticed that my daily note got overwritten by my iPhone with an empty template - my theory is that the following happened:

  1. I wrote the note on Mac
  2. I ran the Shortcut on iPhone, i.e. asked advanced-uri to append to my daily note
  3. Instead of downloading the note from iCloud, advanced-uri saw it was missing and created it (I hadn’t opened Obsidian on iOS on that day)
  4. The newly created file was synced back via iCloud to my Mac, overwriting the note I wrote in step 1

My assumption is that Advanced URI does not wait for Obsidian Mobile to fully sync. I noticed that sometimes a dialog “waiting for sync from iCloud” (or similar) is shown on the app. Does this maybe only block the UI, but not plugins from executing?

Thanks in advance!

I know you were sent here from the issue on Github. I went there to get the link so I could send you there. Sorry if that is frustrating. :frowning:

There isn’t really anything to be done here either. Obsidian also can’t control iCloud. (As far as I understand, I’m surprised it can actually detect and warn you that iCloud is syncing.)

I assume your assumption is correct, and you’re experiencing an unavoidable race condition. It would be up to iCloud to detect that, and either duplicate the file, or do some kind of merge operation. (I have no idea how iCloud handles that. Clearly not well.)

Hopefully someone has a suggestion in terms of help. But I do know WhiteNoise often rejects bugs that are based around community plugins.

If you aren’t aware, for #4, you should hopefully be able to restore your old content with the “File recovery” core plugin on your Mac. Hopefully it grabbed a snapshot. Although hopefully you also have a backup you can restore. Please don’t rely on iCloud as a full backup solution! (imo)

I also experienced issues with daily notes conflicts between PC and mobile devices shared via iCloud.
I disabled the “start daily notes on startup” and that seemed to have helped.

Thanks a lot for the pointer to File Recovery - I wasn’t aware and could recover the lost data.

@udracing, Thanks, will try to disable that option too and see if it improves.