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

issues with iCloud sync #33

Open
uwe999 opened this issue Dec 16, 2021 · 3 comments
Open

issues with iCloud sync #33

uwe999 opened this issue Dec 16, 2021 · 3 comments

Comments

@uwe999
Copy link

@uwe999 uwe999 commented Dec 16, 2021

not sure if this is a bug in the plugin or the iCloud sync in general but the recent files don't sync between my PC and iphone/ipad app when they use a shared vault from the iCloud drive (.obsidian folder is inside vault and shared as well)
To duplicate:

  • delete any extra data..... .json files
  • write down last opened files on iPad app
  • kill iphone/ipad apps (swipe up)
  • restart obsidian on PC and open a bunch of notes -> data.json gets updated
  • now open ipad app
  • it shows the most recent files opened on the app before (not the ones from the PC)
  • when you open another note it creates a data(1).json file
  • now open iphone app and it will show the most recent files from the ipad
  • opening a another note will update the data(1).json file

So it seems to me that when doing a fresh start of the iphone/ipad app it doesn't load the data.json app but instead uses an internally saved copy. It also doesn't update the data.json but creates the data(1).json instead.

This could be a feature instead of a bug if you want to see what was recently opened on the app ;-)

@uwe999
Copy link
Author

@uwe999 uwe999 commented Dec 16, 2021

looking into the iCloud log it shows
[5352 @ Thu Dec 16 2021 09:38:32.895] 22732 ERROR GetPlaceholderFileIdentity Failed to get placeholder info for 'C:\Users\uwe\iCloudDrive\iCloud~md~obsidian\Obsidian\.obsidian\plugins\recent-files-obsidian\data.json': 0x80070178: The file is not a cloud file.

The data.json file has the green checkbox on my windows file explorer showing that it's synced to the iCloud. I tried to verify with the iphone "Files" app and the web based iCloud accounts but both don't show hidden folders so I can't double check there.

@tgrosinger
Copy link
Owner

@tgrosinger tgrosinger commented Dec 17, 2021

It sounds like the plugin is being loaded before the updated data.json is synced from the computer. This plugin was not really designed with syncing in mind (even Obsidian sync only recently started syncing plugin data). I'm not yet sure how I would like it to behave.

I do not have any devices which support iCloud, so I am not going to be able to directly support this issue.

@theaugy
Copy link

@theaugy theaugy commented Dec 17, 2021

I use obsidian on mac + iphone, and sync via iCloud.

A not-very-good workaround for this is to toggle the plugin off/on in settings. This seems to force it to re-read its recent-files-list (sorry not familiar with internals!), and it reflects the most recently written recent-files-list.

This suggests that maybe the solution could be as simple as watching that recent-files-list (maybe that's the data.json?) and reloading it when it changes.

(P.S., thank you for a useful plugin!)

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