Sync with OneDrive on Android use

I could not get it to accept the old Microsoft account on Android. Presumably it was retaining something on the profile.

1 Like

So here is the next problem, and this is clearly a Joplin issue. I can now access my profile from both Android and my Windows desktop app. However, the desktop still has the original default profile and even though it is not the ‘active’ profile, it cannot be deleted in the ‘Manage profiles’ option. The consequence is I have a large file and a resources folder that is duplicated and redundant.

What is the safe procedure for deleting this old default profile and all its assets?

Hi,

Here are instructions:

Instructions for removing a Joplin profile.

These instructions seem out of date for the Windows desktop version I have (3.5.12). It has a manage profiles option but does not actually allow you to delete an unused (obsolete) default profile, even though there is a delete button.

It is a limitation that you can’t delete the default profile from the ui. You’ll need to do something like LeoW has posted in order to do so

It seems straightforward to delete a ‘lower level’ i.e. a secondary one. Delete the files and edit profiles.json.

But can you safely delete the folders ‘cache, resources, tmp’ and ‘database.sgllite’ at the root level i.e. joplin-desktop, this is the original default profile?

Any new profiles sit in subfolders named profile-xxxxxxxx.

These folder images should illustrate what I am asking.

This is the lower level profile profile-fjicadfp

This is profiles.json

This is the root level ‘joplin-desktop’

It’s only the resources folder and the database.sqlite file which store the profile specific data (and the JoplinBackup folder, but I’m not sure if that is shared for all profiles or not). You can just delete those and then not use the default profile.

If you wanted to move your currently used profile onto the default profile, after deleting the above files/folders you would need to move all the contents of the sub folder of the relevant profile into the root folder, then edit profiles.json appropriately, or delete it completely if you have no other profiles. Make a backup of the whole root folder before you mess about with that though.

I closed Joplin (in the system tray) made a backup, and copied the contents of the sub-folder into root folder.

Reopened Joplin and switched to my original default profile. It opened without error, syncs and syncs on Android too. I didn’t even need to relink the OneDrive sync settings.

I think I can go ahead and delete my secondary profile now.

For the future, it would be better if the default profile were structured as a subfolder rather than the data/files being located at the root level. Perhaps this can be assigned to the ‘wish list’/enhancements?

Hey, I’m having this exact same issue. Tried to submit a ticket with Microsoft and they blew me off.

To clarify, what was the final fix here? Just the profile editing, or was that secondary to migrating everything to a whole new OneDrive account?

Knowing I’m not the only one makes me feel better!

In summary, here is what I did.

  1. Backed-up your existing Joplin to a JEX file.
  2. Created a new Microsoft/OneDrive account.
  3. Linked my Android Joplin to the new account. (You may need to delete and re-install Joplin on Android if you have already been trying to use it, as I suspect it puts something in your profile.)
  4. Create a new profile on Joplin Desktop
  5. Import your backup to the new profile
  6. Linked the new Desktop profile to your new OneDrive.
  7. Synced Desktop.
  8. Synced Android (I suggest that you have the sync settings as ‘disabled’ on Android and sync manually when required. In the Advanced Settings you may want to switch the Attachments Download Behaviour to ‘Manual’.

The last part of the thread above is about deleting the old Default profile.

Hmm, okay… In the interest of using my existing onedrive, I may forego this fix for a bit and see if the Joplin team pushes up a solution in the coming weeks. Thank you so much for the instructions!

@babblingfishes
You can use your existing onedrive account if you log in to your microsoft account and revoke the token issued to joplin.

This will let you re-authorize joplin to onedrive.

1 Like

For everyone else looking for a solution, this worked for me. I did need to login twice to OneDrive on the app, and OneDrive still gave me the same error, but it also displayed success screens (go figure) and seems to have worked under the covers somehow. Joplin was then able to sync with OneDrive. My MacOS Joplin then sync’d normally after prompting me to re-authenticate.

1 Like

I am also having this issue, and doesn’t seem like a resolved/solved issue to me.

  • I have tried deleting the app on my Microsoft Account (with a backup before) and then re-authorizing/re-synchronizing OneDrive on my macOS app, which worked on the macOS app, but on mobile app still displays the same error.
  • I tried re-doing the synchronizing/authentication to Microsoft/OneDrive multiple times afterwards, and the error always persists.
  • I had this workflow working flawlessly for more than a couple years now, but I broke my last Android phone and I was setting up Joplin on my new phone.

Having my notes synced with E2EE and available on my mobile is quite important and convenient for me so, unfortunately, I will have to start looking for alternatives.

May be Microsoft still thinks it's linked to your old phone/Joplin account? I would go into the OneDrive security area and deauthorise before setting up sync afresh on you new phone.

Can’t you just use a different sync target to OneDrive? OneDrive is known to have random reliability issues for some users, which Joplin can’t really do anything about. But if you really want to stick with OneDrive and you’re on the free tier, creating a new Microsoft account and syncing everything from scratch will solve your issue