I solved Android stopped syncing (dropbox)

** Android sync gets permanently stuck whilst seemingly doing nothing · Issue #8402 · laurent22/joplin · GitHub **

I ran into the same problem as the link above, and all attempts failed.

However, I found a solution

Make sure to initialize your mobile Joplin data before trying.

  1. Discard the Mobile Joplin - Dropbox connection.

  2. Synchronize my Dropbox folder with my smartphone folder via Android App : Dropsync (or Autosync).

  3. Start syncing with the Offline folder in Mobile Joplin.

I don't have this problem anymore.

Otherwise, I'd recommend Joplin Cloud over Dropbox.

2 Likes

Great workaround for those willing to try it.

Ideally, users shouldn't have to trust additional parties on top of Dropbox to sync notes reliably. See a similar sentiment here: Allan_Quartermain comments on What's a good free solution to syncing between Windows, Android, and Linux?

If this bug is on Dropbox's end, that should be clarified. If not, the Joplin team should still resolve it. Does the linked Github issue lack anything needed to start working on a solution?

Dropsync requires payment to sync more than one folder. Autosync requires payment after a 14-day free trial. Would established FOSS alternatives like Syncthing or others work for this purpose instead?

I tried Syncthing as you suggested.

I was only able to sync when I had a wifi connection at home, but it seems to have some advantages.

I don't seem to need syncthing's E2EE encryption because it trusts the registered devices that are interconnected (my local PC and smartphone).

My PC SSD partition has Luks2 encryption set up, so no problem... of course. I can't encrypt the Joplin data on my Android smartphone separately. Is it necessary?

With Joplin encryption turned off, it's a pleasant experience: frequent encryption/decryption is not required, which reduces synchronization time. (Does it clean up disconnected resource files even with encryption? Sometimes I feel like I'm running into trouble. I'm not sure.)

Compared to the Linux application Dropbox, Syncthing is lighter and seems to be better optimized. While the Dropbox installation files are not Foss, Syncthing can be installed directly from the Debian repositories. Syncthing is Berry Good.

But I think Android Dropsync is not bad solution. When someone needs Dropbox, Dropsync provides a seamless synchronization solution with Joplin. I also suspect that the dropbox stopping syncing issue might be related to encryption, but I don't know at this point.

At the time I was experiencing this, there were a lot of resource file errors that failed to decrypt when syncing from the mobile Joplin app. Could it be disconnected resource files? I don't know. If I manually removed the one resource file with the error, the decryption error in the mobile app went away by one line. In

I was at the time... I didn't want to see the error message, so I kept trying again and again. I would encrypt, then unencrypt, then set another encryption. Could this be the cause of a bigger problem?

Dropbox on mobile... Has anyone else had this issue without encryption?

I'm surprised the bug you linked isn't prioritized yet. I haven't seen a developer response for this specific issue. Maybe I'm not looking hard enough?

This doesn't seem to be Android-specific. No responsive feedback when sync gets stuck doesn't help.

Third-party workarounds to Dropbox like Dropsync and Syncthing can work for some. Caveats like Syncthing's wifi-only sync, lack of iOS support, storage bloat by encrypted copies, and other snags can also be dealbreakers.

If slow or stuck sync is just a symptom of no direct filesystem access and everything going through Android FUSE, causing slow performance, then perhaps that should be visibly communicated? I doubt it is, though.

I can't speak to most of the encryption points but I'm looking forward to someone else filling in, as well as a first-party solution for this issue.

1 Like

One of the comments in the above issue mentions sync locks.

Joplin uses sync locks to prevent multiple apps from using the sync target at the same time (in ways that might conflict).

If encountering a sync lock error for more than a few minutes, the following may be relevant:

This can happen if one Joplin client is still syncing (or was closed during a sync). Re-opening and re-syncing the client that was interrupted may fix the issue.

If this was caused by a Joplin client that no longer exists (e.g. was uninstalled), you can try the following:

  1. Make a backup
  2. Delete files from Apps/Joplin/locks on OneDrive

Originally posted here

The above should also apply to DropBox.

According to @laurent,

To add up to this, the locks expire so if you wait a few minutes it should start working again

Originally posted here

As such, the bug referenced above may be related to sync lock expiration.

1 Like

I'm using Autosync to synchronize Joplin in Android, in Linux I use file system sync too.
Notes and notebooks created in Android gonfine to Linux.
Notes created in Linux don't go to Android.

Joplin uses sync locks to prevent multiple apps from using the sync target at the same time (in ways that might conflict).

If encountering a sync lock error for more than a few minutes, the following may be relevant:

This can happen if one Joplin client is still syncing (or was closed during a sync). Re-opening and re-syncing the client that was interrupted may fix the issue.

If this was caused by a Joplin client that no longer exists (e.g. was uninstalled), you can try the following:

Make a backup
Delete files from Apps/Joplin/locks on OneDrive
Originally posted here 4

The above should also apply to DropBox.

According to @laurent,

To add up to this, the locks expire so if you wait a few minutes it should start working again

Originally posted here 6

As such, the bug referenced above may be related to sync lock expiration.

Thanks @personalizedrefriger !

This seemed to resolve my problem - its been happening to me for years
I thought I'd note down some diagnostic info for posterity.

My Setup:

  • E2EE
  • Dropbox sync
  • Windows client (currently 2.14.20 though have had problem on and off for years)
  • Android client (currently 2.14.9, though have had problem on and off for years)

Win Client never has any issues syncing, seems to be able to resolve issues with Sync lock.
Possibly something in it's code is able to handle these errors better?

Android client tends to take ages to sync or never does it, similar to the descriptions in this thread.

Going to my dropbox Apps\Joplin\Locks folder I found this:

I deleted all of these files (bravely / foolishly didn't backup), force close the android app, reopened app, therefore auto sync.

This seemed to immediately resolve the issue.

From watching this folder while sync occurs, it seems that a sync lock file gets created and then upon sync completion, the file gets deleted. Probably one should expect nothing to be permanently there?

Hopefully this fixes the problem long term.

1 Like