OneDrive sync problem

Operating system

macOS

Joplin version

3.1.24

Desktop version info

Joplin 3.1.24 (prod, darwin)

Sync target

OneDrive

What issue do you have?

A few days ago, I was having sync problems with the Joplin app on iOS, so I decided to check if the app on my iMac needed updating. It did, so I proceded to download the app directly from Microsoft. When I installed it, there was some problem. I got a message that the previous version was downloaded from the App Store. I forget the details but I had to somehow remove the app from the trash and relaunch the new app. All seemed fine until I was out shopping and my Shopping notebook wasn't syncing the updates I had made on iMac. I deleted the iOS app and installed it again and logged in to my OneDrive account. It still did not sync with my iMac data. I have gotten 2 emails that stated "We noticed that you recently deleted a large number of files from your OneDrive. If you want to restore these files, go to the OneDrive recycle bin, select what you want to restore, and click the Restore button." Since all the files have hashes as names, I wouldn't know what to restore or why. I opened the iOS app and it started deleting many files. I immediately removed the app because I couldn't cancel the sync. Now I don't know what to do. I depend on Joplin for many purposes so I need to fix this problem ASAP. What would be the procedure to fix this?

It's difficult to say what has happened exactly, however I can say for sure that you do not want to try restoring those files from within OneDrive. Ideally, you should have a backup file created automatically in your Joplin profile folder on the Mac.

If the backup file is there, then you could try the following, also on the Mac:

  1. Delete all notes locally, then "re-upload local data" to OneDrive.
  2. Restore all notes from backup.
  3. "Re-upload local date" to OneDrive again.
  4. "Delete local data and re-download" from OneDrive on other devices.

The "re-upload local data to sync target" and "delete local data and re-download from sync target" options are available in the Advanced Settings under Synchronisation.

~/.config/joplin-desktop/JoplinBackup is empty.

Thanks for your speedy reply tomasz86. Sorry for the delay. I am very busy now and this sounds complicated. I think it was the update of the OneDrive app that caused this problem due to some conflict with the App Store app.

I made a backup of everything first, but now after syncing the iOS app, I have a random collection of notes that can no longer be sorted by date, with newer ones gone.

I'm not exactly sure what you mean. This is complicated and not very intuitive. Since this could end in disaster, I need some clarification. It would be best to list the actual steps to take with each app in sequence, step by step, indicating menu items to use in each step.

Thank you for your help.

I can't provide a step-by-step solution, but I can rule out that the problem is caused by OneDrive's client app as Joplin connects directly to remote storage via API. You might as well delete the OneDrive app on your devices and Joplin is going to function nonetheless.

That's just it. When I downloaded the installer from MS, I got a message that the previous version was from the App Store. That's when all hell broke loose. I do have the app running so I can access my OneDrive account online and in the Finder. Also, the iOS app destroyed the current sync of the desktop app.

One further idea about OneDrive: Have you tried to exclude Joplin‘s folder from syncing to your hard drive through Microsofts‘s client? That‘s what I did when using OneDrive for Joplin (now it‘s Owncloud via WebDAV, and I follow the same procedure).

You mean uncheck this?

SCR-20250117-hler

Exactly. I can't say if it resolves existing sync problems, but it's a good choice in terms of performance and disk usage nevertheless. Some years ago, I performed an initial Joplin sync on a new machine, and the OneDrive client was busy all the time writing superfluous duplicates on my SSD and wasting time syncing all those tiny files Joplin produces, especially when dealing with web clippings.

Oh, so it syncs files to the hard drive when enabled. That would be unnecessary and consume resources besides. I will do that but I still need to understand exactly how to do the others steps and in what order. Thanks.