Joplin GUI hangs while processing

Joplin 2.1.7 (prod, win32)
Sync Version: 2
Profile Version: 39
Keychain Supported: Yes
Revision: 04c4015c8

I have had to reset my Joplin installation four times now. I'm fairly certain it has something to do with the SQLite database. While the GUI is up, the wheels just spin. I abort the task and restart Joplin, but then the GUI never appears again. I am able to get the Joplin system working again via a process that I have documented, but each time it takes like 20 hours to reimport all my data and rebuild a good working database.

What files do you need to from me so that I can further trouble shoot this and give you the data needed to resolve this recurring issue? My last 2 resets I have saved the .config subdirs so I still have any logs.

The last lines from log.txt are:
2021-06-30 07:04:46: "Trying to load 3 master keys..."
2021-06-30 07:04:46: "Loaded master keys: 3"
2021-06-30 07:04:47: "Trying to load 3 master keys..."
2021-06-30 07:04:47: "Loaded master keys: 3"

Does this help at all? What else can I provide? Thanks.

Try enabling debug as described here How to enable debugging | Joplin
Then start Joplin, it should open the dev console, check there for any errors

I tried that. The debug console is not accessible when the GUI locks up.

There is also a button that is supposed to do my manual procedure automatically, but I can't reach it because the GUI locks up.

This is strange, the console should come up immediately at startup. Can you show a screenshot of when it's locked?

No screenshot, but it looks the same as in normal use, and it always happens when it's synchronizing (button graphic active). If I tab away and return, the GUI image repaints fine enough. CANCEL button does not respond. I let it sync over lunch and it was still running when I came back; no update message changes. Status was something like "Decrypting 7 of 8"...
So I will force close the GUI from the Task Manager, all 5 Joplin processes terminate. I then restart Joplin, but the GUI never appears, however some processes are shown in Task Manager. The GUI never appears, so I know it's hung beyond my knowledge and start my manual restore process. 20 hours later Joplin is running fine again.

This is strange. There may be a way to get a dump of the app to see what it's doing when it locks up but I'm not sure how to do it for Electron.

Is there anything suspicious at all in log.txt? These lines you've posted look ok

The log.txt lines tell me that there is a problem either with the processing of the master keys or there is some unhandled error immediately after those keys are loaded.

Now it's happening on my work machine. Same thing. Here's that screen shot you wanted, but it's from my work machine, not my home machine.

Spinning wheel on the CANCEL button. I can resize the GUI, minimize, maximize show no problems. CPU on the Joplin tasks are at 35% all night.
Last log.txt update was 12 hours ago, here are the last lines from it.
2021-07-01 18:18:37: "Sync: updateLocal: remote is more recent than local: Folder: (Local 79ea6d9b62af49f69b5ac46a8b6a4538): (Remote"
2021-07-01 18:18:38: "Sync: fetchingProcessed: Processing fetched item"
2021-07-01 18:18:38: "Sync: updateLocal: remote is more recent than local: Folder: (Local 78a0d2a648e94db3b4435d9d59769000): (Remote"
2021-07-01 18:18:39: "Sync: fetchingProcessed: Processing fetched item"
2021-07-01 18:18:39: "Sync: updateLocal: remote is more recent than local: Folder: (Local 038cab7750f64068a3d595fafa3214d4): (Remote"
2021-07-01 18:18:40: "DecryptionWorker: completed decryption."
2021-07-01 18:18:40: "ResourceFetcher: Auto-add resources: Mode: always"
2021-07-01 18:18:40: "ResourceFetcher: Auto-added resources: 0"
2021-07-01 18:18:40: "Sync: fetchingProcessed: Processing fetched item"
2021-07-01 18:18:41: "Sync: updateLocal: remote is more recent than local: Folder: (Local 7aa0a0bed3c346d39f8586efc2bc286b): (Remote"
2021-07-01 18:18:41: "DecryptionWorker: starting decryption..."
2021-07-01 18:18:42: "Sync: fetchingProcessed: Processing fetched item"
2021-07-01 18:18:42: "Sync: updateLocal: remote is more recent than local: Folder: (Local 565076c8843740b8b4700fd6c41e6c58): (Remote"
2021-07-01 18:18:44: "Sync: fetchingProcessed: Processing fetched item"
2021-07-01 18:18:44: "Sync: updateLocal: remote is more recent than local: Folder: (Local ee96b9bd7b5647d58d6e2866ff88ffd3): (Remote"
2021-07-01 18:18:45: "Sync: fetchingProcessed: Processing fetched item"
2021-07-01 18:18:45: "Sync: updateLocal: remote is more recent than local: Folder: (Local 3b9949b193014346b25c19c7677225fb): (Remote"
2021-07-01 18:18:47: "Sync: fetchingProcessed: Processing fetched item"
2021-07-01 18:18:47: "Sync: updateLocal: remote is more recent than local: Folder: (Local 29963745b58b4ff3bbaffc635fa11e0b): (Remote"
2021-07-01 18:18:47: "DecryptionWorker: completed decryption."
2021-07-01 18:18:48: "Sync: fetchingProcessed: Processing fetched item"
2021-07-01 18:18:48: "Sync: updateLocal: remote is more recent than local: Folder: (Local 4fe815c0a8a443fdbe75a48667fbaf2f): (Remote"
2021-07-01 18:18:48: "DecryptionWorker: starting decryption..."

It seems like the DecryptionWorker thread is hanging somehow.

From that log is looks like it's syncing but very slowly. What are you using for sync?

I am synching against DropBox. When I monitor the tasks, DropBox is basically inactive as the local files are synched with the server files almost immediately. I have never had any issues with DropBox, other than every time I need to reset Joplin, I have to reauthorize with DropBox, which creates a new (additional) Master Key. I have 5 master keys now and I can't enter a password for any key until Joplin encounters an item with a "new" master key. There doesn't seem to be any way to remove any master key either.

It indeed just looks like it's slow. Dropbox can throttle the connection for various reasons, and I suspect they don't like encrypted files much as it could be anything, including copyrighted material.

Also do you have any particularly large resources? That could also take time to upload, download or encrypt (decrypting should be fine since it's not done during sync)

The Joplin installation is running via Wifi and through a VPN but that hasn't been an issue. On an average workday I will make edits requiring the sync of 600 items when I get home, and that takes only a few minutes.

I don't doubt that DropBox throttles the connection but I have never seen it affect my work.

I noticed that turning off Note History (setting to zero days) decreases the size of the .Config directory, so it probably increases speed. I have never needed that feature so I recently turned it off on my home machine.

I do have a lot of photo resources, but trim and edit them as best I can. The largest photo is 8MB and I have 3 of them.

"Slow processing" isn't really the issue here for me. If it was slow, it still worked, and works reliably, until the system hangs. The problem where for me is that hang after 18:18:48; no other entries occurred and Joplin was running for ten hours after that time.

As I understand it, DropBox is a rather simple client that just mirrors files between server and client. When I reset the Joplin installation, all the DropBox files are already present on the machine so loading them doesn't require any network time.

Does that help?

That's not how it works. Joplin uses Dropbox API to sync, not files on disk so whenever you reset it's all starts from zero

Yeah I probably have the theory wrong. But practically, after I reset Joplin and it gets authorized by DropBox, while Joplin is synching, I never see the DropBox icon in the system tray change to it's synching icon, meaning that files are being mirrored between client and source, yet I still end up with a full import of all the latest data files. If a call to the DropBox API for the latest version of file does force the DropBox client to check if that file has been updated on the DropBox server, then the network lag appears to be negligible, as I never see the DropBox icon go to "synching" status; it always says "up to date" when I mouse-over the client icon while synching. I do see network activity from Joplin but not from DropBox while Joplin is synching.

Joplin's DropBox sync is process completely independent of the app. For instance you don't need to have the app at all for Joplin to sync.

and if you have the Dropbox client installed you should set the Dropbox/Apps/Joplin folder to not sync locally, using Selective Sync. This will avoid unnecessarily storing and syncing duplicate data.”

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.