Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential file loss? #40

Open
jonasdiemer opened this issue Jan 4, 2022 · 4 comments
Open

Potential file loss? #40

jonasdiemer opened this issue Jan 4, 2022 · 4 comments

Comments

@jonasdiemer
Copy link

@jonasdiemer jonasdiemer commented Jan 4, 2022

Hi,

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

obsidian://advanced-uri?daily=true&mode=append&data=

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 - theory is that the following happened:

  1. I wrote the note on Mac
  2. I ran the Shortcut, 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. Boom

Not sure Advanced URI is the culprit, but maybe you could have a look if the above theory could be plausible and fixed from advanced URI side (e.g. change step 3).

@Vinzent03
Copy link
Owner

@Vinzent03 Vinzent03 commented Jan 4, 2022

Sorry, but I don't think that I can do anything for you. I can't control the syncing of iCloud. I'm not familiar with iCloud, but you could ask on the forum or discord for help.

@jonasdiemer
Copy link
Author

@jonasdiemer jonasdiemer commented Jan 4, 2022

Thanks for the quick response. Looks like the forum is full of issues with iCloud :( I have opened a thread there: https://forum.obsidian.md/t/bug-icloud-sync-issue-file-loss-via-community-plugin/29923

Just noticed when opening Obsidian on iOS that it shows "waiting for syncing with iCloud" (or similar) in the beginning. Might this be something Advanced URI could "block on" before attempting to access the Daily Note? Or maybe it has to be done from the mobile app...

@coddingtonbear
Copy link

@coddingtonbear coddingtonbear commented Jan 21, 2022

Incidentally, this is less of an icloud problem and more of a problem of generated (in this case: daily) notes and synchronization in general If you're using obsidian-sync, it's possible for you to get into the exact same conflict scenario (I've run into it myself!), I'm absolutely sure you can run into it with obsidian-git having used it as well, and I can't imagine the same problem isn't possible when using an external synchronization tool like Dropbox.

In any case, the way I get around this is by opening Obsidian first and waiting for its synchronization to complete before attempting to use an advanced-uri on my mobile device. I'm afraid that's almost certainly the only workable general solution -- how could the plugin possibly know when an entirely-external sync process (e.g. Dropbox) was complete?. On the bright side, it does seem remotely possible that the folks at Obsidian might provide an API someday in the future that allows plugins to at least be aware of obsidian-sync's synchronization state, but I don't believe any such API exists at the moment.

@jonasdiemer
Copy link
Author

@jonasdiemer jonasdiemer commented Jan 21, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants