Android sync never finishes

Operating system

Android

Joplin version

3.5.8

Sync target

Joplin Cloud

What issue do you have?

I am trying out Joplin as a replacement for Evernote, which has gotten too expensive. The program is great, but I have not been able to get synchronization to work to my phone running Android. It's pretty much always synchronizing. The counters get bigger and I get hopeful, then I come back to the phone and they are starting from zero again.

  • I have 53469 total items, per Synchronization Status on the desktop
  • I have synched between two Macs without problems
  • I'm using Joplin Cloud to sync

On the phone:

  • Check synchronization configuration passes
  • I set to E2EE. When I got to the configuration for it, though, it says the master password is not set or is invalid. If I paste in the master password and hit SAVE, nothing happens
  • I ended up with two master keys. One from a week ago and one from yesterday when I removed and reinstalled the app to get a fresh start.
  • On the Tools->Sync Status page Sync Status shows 44540/44540 for the total, and all of the other status numbers are non-zero and complete. In the attachments section it shows 16639 attachments not downloaded and the number is increasing. 11069 show downloaded and encrypted.

Any suggestions on getting the Android app to sync to Joplin Cloud?

See FAQ | Joplin

You need to enable developer options and disable screen timeout, or use a third party app such as Caffeine to toggle off the screen timeout. Then keep Joplin in the foreground and the screen on while it syncs

I knew I'd leave something out. I enabled Stay awake in the developer options yesterday and have kept it plugged into the charger.

If the count goes up and up way beyond 54,000, possibly killing the app and then leaving it for another few hours might resolve it

The total from the Sync status section is slowly increasing, now to 45254. The number of attachments now downloaded has also increased to 17235.

Should I be concerned that the Android app has two master keys and that the Encryption Config says the master password is not set or is invalid?

That is potentially a concern. Did you definately enter the master password correctly?

See details about the encryption bug which is fixed in Joplin 3.6 How to delete corrupt server items which cannot be decrypted

I'm copying and pasting the password from 1Password, so it shouldn't be a typo. If I paste in my Joplin Cloud password and hit SAVE, I correctly get a popup error saying that the password is incorrect. If I paste in the master password and hit SAVE nothing happens.

Ok, its probably a good idea to update to this prerelease via sideloading the apk, just to be safe Release android-v3.6.17 · laurent22/joplin-android · GitHub

The new version helps. It takes the master password now and it shows as Loaded. It has restarted the sync and the Synchronisation Status shows numbers increasing from before the upgrade.

Are the two master keys a problem?

You'll probably want to disable the key which is not set to active (on the desktop app), but only do this after the sync finally completes on your phone.

You get a new master ket created if you set the encryption password before syncing. If you have enabled encryption on one device, then when you sync another device you will automatically get be prompted to enter the password, so if you enter the password then, rather before clicking sync, that's how you avoid creating additional keys

My phone eventually finished syncing after about a day and a half. Here's what it took in the end:

  • Disabling screen timeout in developer mode
  • I left my phone on the charger. This is part of disabling the screen timeout in developer mode.
  • Leaving my phone alone. I could do some other things during syncing, but other times the sync would restart. This maybe wasn't a problem if it picked up where it left off, which I think it did.
  • Check Configuration->Tools->Sync status to see how things are going and compare with the numbers on the desktop. These numbers correlate better with the desktop ones than the running status at the bottom of the screen. Note that it may take a bit for the Sync status to appear on the screen.
  • In the end I left the extra key alone, as I got even more as I shared notebooks.
  • I just had to be patient, as advised elsewhere for the first sync. I had around 7 GB of data I had brought over from Evernote and it just takes a while.
  • Upgrade the Android app to 3.6.17. This made the encryption password work and presumably helped in other ways.