Android out of sync

My android app is way out of sync. I’ve added a few notes from Windows 10, created new notebooks and rearranged a bunch of notes. None of this can be synced with the android app at all. I have E2EE enabled. The sync status doesn’t output any errors on both applications.

I have an installation on Ubuntu as well but I might need to do a clean install of that OS because of some other issues. However while setting up Joplin on Ubuntu I created y mistake a new encryption key because I was confused. When I noticed that the app wasn’t decrypting the notes it was syncing I realised I was using a wrong mastrkey and I fixed it. It worked but now I have an unused masterkey inside Joplin. The only error I can see in the log is about that masterkey for which I don’t have the password anymore (I thought it really didn’t matter and that I could delete it completely, but I couldn’t).

Let me tell you, this app is free, open source and potentially a great alternative to Evernote and I LOVE and support all this. But honestly in the actual state of development it’s really a struggle to use it and make it work properly, even for more techy users like myself that can get their hands dirty with quite complex configurations, logs and stuff.

What do you sync with?

Any error in the Android app log?

I sync with Nextcloud. No errors in the log, if we don’t consider this:

“No master key is defined as active. Check this: Either one or more master keys exist but no password was provided for any of them. Or no master key exist. Or master keys and password exist, but none was set to active”.

As I wrote before, I have 2 master keys: an unused one which I couldn’t get rid of without password and the actual correct one with the correct password and set as active (as far as I can tell).

Can you take a screenshot of the log showing your last sync?

here you go

FYI I had the same issue with some notes not being synced to Android. I did what @notetaker suggested and it helped (I had 4 tries until I got everything right, so it took some time).

This is still an issue, and I’d say an important one to fix.

I encountered the same problem immediately when I started using Joplin.

  • Installed Joplin in Windows (version 1.0.175) and created a few notes
  • Enabled Dropbox sync
  • Installed the Joplin Android app (1.0.312). Enabled dropbox sync and received the notes from desktop.
  • Enabled encryption on the desktop app and synced
  • Did not read the encryption docs so at this point I manually enabled encryption on Android and synced
  • Received the encrypted notes from dropbox with the desktop master key, and pushed the android master key to dropbox
  • Realized I made a mistake, tried to get rid of the extra master key, but ended up creating a third one on the Android app while toggling encryption on and off
  • Tried one last time to get rid of extra keys by wiping app data on Android, disabling encryption on desktop, syncing to Dropbox, verifying data in dropbox is unencrypted, re-enabling encryption. Now I have 4 master keys.
  • Started up the cleaned android app, synced from dropbox, received the encrypted notes. Added the password for the correct key (the latest one which desktop app was using for encryption). At this point all is well.
  • Created new notes on desktop and synced them to dropbox. Noticed Android app is out of sync, even though the synchronization button says sync completed and displays no errors.

At this point I am at the same situation as the others. Android seemingly syncs, but actually neither receives nor sends anything. In the log the only thing resembling an error is the “No master key is defined as active.". If I wipe the data of the android app, the first sync always works (both receives the notes and sends the default Welcome notes), but after entering the password for the key and decrypting, the sync no longer works.

Quickly glancing at the react native code it would look like that activeMasterKeyId is only set if

  • enabling encryption on the device and generating a new master key in the process
  • downloading a new master key from the sync target - but ONLY if there are no master keys present previously

Having removed the passwords from those unnecessary keys I generated, I am probably left with no active key and no way to set one active.

Yes indeed, after putting back the passwords to all of the keys on the android app, the sync works again.

One of the old keys must be the one the app thinks should be the active master key, and when loading that succeeds, the app can continue without exceptions and use the other keys for decryption.

The problem is I don’t know which key the android app is using for encryption. I would prefer to use the latest one for encryption on all devices and get rid of the extra ones in the future. Now if I create notes on the Android app I can no longer remove the key later even if I knew which one it used.