I have Joplin running on three computers (Fedora Linux) and one phone (Android).
Zero real incidences for a very long time. Years.
They sync to Joplin Cloud. Encryption is enabled.
I just added another Android. It will be my "focus device".
Mobile versions for both phones is 3.1.8
Desktop versions for all three desktops is 3.1.24
PROBLEM:
I CANNOT get the new phone to sync without error: Last error: [object Object]
A number of folders remain encrypted.
CONFIGURATIONS ATTEMPTED:
Shut done all instances except the problem phone so that there can't be a conflict during sync
Uninstalled then reinstalled Joplin on mobile over and over and over again. Resyncing from scratch every time.
I have tried both entering the one master password and saving and also the master password for each key.
ADDITIONAL INFO:
My Joplin repo is very old and has 4 encryption keys maintained, but 3 of which are disabled.
I have only ONE master password. I plug that in twice where indicated. The one and only key that is enabled uses that same master password.
The old keys do have different passwords, I also tried plugging their passwords in individually as well. And still get the same result.
And the logs keep talking about a row too big to fit into CursorWindow:
12-07T18:33:07: RevisionService: maintenance:
{"message":"On query {\"sql\":\"SELECT * FROM revisions
WHERE item_updated_time < ?
ORDER BY item_updated_time
DESC\",\"params\":[1725838387440]}: Row too big to fit into CursorWindow requiredPos=920, totalRows=921","code":0}
How do I …
(a) troubleshoot what is going on here (see log file),
and (b) is there a preferred way to start fresh, remove all of these keys and re-encrypt? And is that even recommended?
or (c) should I wait until v3.2+ is released to do something like a full refresh since it will be moving to a new encryption mechanism?
Note. You often ask for areas of improvement. Here's one: make encryption easy and fix the mobile client in that regard so that both desktop and mobile UIs are more similar. Also, the mobile app can sometimes be so sluggish it seems like it has stopped utterly, when it hasn't. But there is no "I'm thinking" feedback. Like, for example, when I save an encryption configuration. Or even just opening the notebook list sometimes.
I haven't had the heartache that others have had with mobile syncing, but I am seeing it now.
Thanks for any help offered. Note that this is a sizeable but not huge Joplin install: 5000 objects or so and a couple hundred MB.
Attached are the logs for two different installation sessions. The screenshot shows the error that both produce.
12-07T19:52:17: Synchronizer: Error: Cannot acquire exclusive lock because there is an active sync lock for client: 2 #7ebca78259324b938e573b3fdad2a0e6
Code: hasSyncLock
Error: Cannot acquire exclusive lock because there is an active sync lock for client: 2
If the sync issue isn't caused by "Row too big to fit into CursorWindow requiredPos=920", it might be related to sync locks.
The error message references RevisionService. Based on this, setting the note history setting to a large number may help. This setting can be found in Configuration > Note history > Keep note history for.
Ok. I turned off that lock. And then maxed out revision history setting … got the same result. (didn't download the log file — I will rerun that test sometime soon)
Then I simply disabled the revision history (and tuned off the sync lock). Sorta the same result, but maybe not.
So, in preparation for another test I opened Joplin on one of the desktops and on the working mobile phone. And … Joplin is now "Updated remote items" for all of the notes. I have been waiting hours for that to complete. But what triggered a resync of everything? Gah!
What I think I am going to do is
shut everything down on all of the clients and obliterate the mobile installs
then re-encrypt everything from the main client
let it sync until it is done
turn everyone else back on and ... see what happens
once they are sync, shut everyone back down and reinstall on the problematic mobile device
... and then maybe it will all work again. Dunno.
Otherwise, I may just nuke it all and start fresh from a backup. PITA but, if it simplifies things, then great.
result on screen: precisely the same minus time and elapsed seconds
And so, I'm at a loss. I find it interesting that even though revision history is disabled, this message appears in the log:
12-10T09:23:02: RevisionService: maintenance: {"message":"On query {\"sql\":\"SELECT * FROM revisions WHERE item_updated_time < ? ORDER BY item_updated_time DESC\",\"params\":[1670768582153]}: Row too big to fit into CursorWindow requiredPos=920, totalRows=921","code":0}
But there is also this in there …
12-10T09:19:09: Synchronizer: {"message":"On query {\"sql\":\"SELECT * FROM revisions WHERE id IN ('b5e1f8d983a8498180a19e1742594a14','0e64010321fa49689ce45c3ae8de0140','e250428e5ff14cf8adcac9b1b35a0e27','82a293e669fe41629e214941159fd17c','503166a9dc6f4f7f838b2eccb9901171','456d16271fc44ccb8547f07a993f9784','0361f7ead3fe4f559ca4c48b69e95a65','69711bee5fca4d52a20df5f4f820581f','76571b8df76246bf99392d3d2b4f3567','6d0d01b12fe94daeb617358e4b4c9bc9','228230e302e34d62bae343cd9f7827a5','b261d6b1ae884ee5a2c512ed88f71259','341503566f044a9ba1a6deed8c314992', [ … a zillion IDs … ], ,'87fb8b9b43af4b26ad3dcc130ceec014','39e72f50b7584dde8f79224bb4e2431c')\",\"params\":[]}: Row too big to fit into CursorWindow requiredPos=138, totalRows=139","code":0}
If you are starting over, I think you should make sure you disable history on the desktop app, then make sure all revisions are deleted, and the deletions are synced to the server. Then when you start over with the mobile app, the large revisions should be gone.
Yeah. I was trying to avoid that since I do actually sometimes use revision history. But … this is so incredibly annoying that I will live without for now.
I will try that first. I will let you know how it goes.
But. If I understand you correctly, the revision settings in each instance of the application determines that instance's view of the past, right? And that whoever has the longest setting will sync all of that to Joplin Cloud. I.e., everyone syncs all that that revision history regardless of the individual setting. Do I understand that correctly?
Revision settings are global
Since all the revisions are synced across all devices, it means these settings are kind of global. So for example, if on one device you set it to keep revisions for 30 days, and on another to 100 days, the revisions older than 30 days will be deleted, and then this deletion will be synced. So in practice it means revisions are kept for whatever is the minimum number of days as set on any of the devices. In that particular case, the 100 days setting will be essentially ignored, and only the 30 days one will apply.
But that means I have to wait a full day before continuing this testing. Wee!
I have set one desktop to 1 day and disabled it everywhere else. And now I wait the day for the history to clear out.
Yes this is unfortunate, it's a bug we never managed to replicate so that makes it very hard to fix.
I've always hoped the bug would disappear eventually as mobile phones become more powerful but it seems it still happens. What phone model do you have?
How precisely do we "make sure all revisions are deleted and the deletions are synced to the server." I set it to one day … over a day ago … and the disk usage in Joplin Cloud has not changed. (Previously, it was set at 90 days, I believe.) Is there something I am not doing? Or is there a better way to examine this?
Mind you, the diffs of my revisions possibly could have been less than 1MB difference (the level of detail shown by the cloud service) but I somehow doubt it. Anyway. Just wondering if there is an easier way to determine that revisions have been deleted and synced.
UPDATE: 2024-12-11 8:37pm UTC
It's been over a day since I set main installation to 1 day revision history
I reinstalled Joplin on the problem phone
turned off sync locks and disabled revision history
connected it to Joplin Cloud
set the encryption
Stalls at precisely the same spot with precisely the same error and Fetched items: 7816/8016
And I turned off OCR stuff. And then I waited a full day so that any revisions disappeared.
The largest markdown file that remains is 246MB. The largest HTML file is 1.5MB. The largest "resource" is a 20MB PDF. Those should all be managed just fine, right?
I got FURTHER this time. But still errors out eventually. Interestingly, so many Notebooks simply disappear though some of the notes that go in those Notebooks do exist. I can't really compare the inventories though, and so it is hard to tell. I don't see the "Encrypted" label anywhere. So, presumably everything it has access to is decrypted.
Here's a graphic showing my top-level trees. On the left is for my desktop and on the right is my phone. There are notebooks missing underneath these layers as well.
Here's my new log file. Note, I had to sync twice. Once that didn't error out but Notebooks were missing. The second time I synced, I got the usual "Laste error: [object Object]"