Synchronization of the Joplin App

Hi all,

there is an issue I have been having for a while now and I wanted to inform the community - I hope this is the right place and method!

I have Joplin both on my Android phone and on my laptop. The source of the problem is that the notes on the Joplin phone app only get synchronized when I open the app. This can take a while, and if I write something before it is finished synchronizing, then the phone will upload whatever I just wrote and overwrite what was on the cloud. Thus, the data in the cloud gets lost.

Possible solutions:

  1. Have the Joplin app synchronize in the background like other apps (e.g. Whatsapp, Signal) do.
  2. If the user writes something while the synchronization takes place, have Joplin save the modification on the side, finish the synchronization first and then add the new modification to the synchronized file.
  3. Have the users be aware of this in advance. Not ideal though: I'm aware of this and it still has happened a few times. The reason I have Joplin on my phone is to quickly add an idea that I get through the day. In these situations I can forget to wait/I'm too impatient/stupid.

I hope this helps.
Cheers,
Felipe

It won't be lost if note revisions are turned on as you can always access and restore the previous versions.

Joplin has in built conflict resolution to help solve problems like this. If you update a note locally before a newer revision has downloaded from your sync target then it should create a conflict for review. Just adding the data on like that would be difficult as there are far too many variables so may not be appropriate in many circumstances.

It isn't ideal but has been noted before to the point where there is a related FAQ item about it which details the lack of background sync.

There is still an open issue on github for it which contains more of the background info.

Hi Daeraxa,
thanks for answering.

Generally yes. I have it setup with Nextcloud and for some reasons I could not restore the files today, but this is a cloud issue, independent of Joplin. But having to revert some files on the cloud is not an ideal Joplin experience I would say.

I have had such a conflict resolution before, but it doesn't happen always. I guess the problem is when Joplin doesn't detect a conflict, then data gets lost? So maybe I should report this as a bug?

Thank you for the links, it's an interesting reading.

If it can be reliably replicated then yes. I'm pretty sure it depends on which is the newest file. i.e. if the sync target file is newest then it overwrites the local without conflict but if the local one is newer than the remote one it is attempting to sync then that is when I think it should conflict.

From my experience it is as follows:

  1. I do my work on my laptop and this keeps the cloud synchronized.
  2. At some later point I use my phone and before it updates I change something in a note that is not up to date yet with the cloud version.
  3. The new version on the phone gets then uploaded in the cloud, so what I did on the laptop gets lost.

Why there is no conflict I don't know if it is a Nextcloud or a Joplin problem.

I'm not sure I can help solve this problem, but I wanted to make you aware that something like this does/can happen. Hope this was help, as I think Joplin is awesome :slight_smile:

I'm pretty sure that is the situation in which an conflict would be expected.
I'll have to try it and see.