I recently updated from v1.0.218 to v1.0.224 on MacOS and, since then, I get the following error on sync:
No master key is defined as active. Check this: Either one or more master keys exist but no password was provided for any of them. Or no master key exist. Or master keys and password exist, but none was set as active.
I checked my encryption settings and, strangely, there is no master key list! I’ve had encryption setup and running before I did the upgrade and my keys were in there.
I’m not even sure how I can go about adding my keys back in as the master key list has completely vanished
Has anyone else experienced this? How can I go about adding my master keys back in?
That’s strange, there’s nothing in the code that could delete a master key. Could you provide the logs to see if there’s any clue in there? https://joplinapp.org/debugging
Also what service do you sync with?
Thanks for the quick reply!
I’ve attached the log file. Nothing seems to appear in the debug console when attempting a resync.
I sync with a self-hosted webdav server. This server is reachable, SSL certs are up to date and authentication is working (have checked with “check synchronisation configuration” in the sync menu).
The problem seems as if it’s failing to encrypt a note before even pushing it, which makes sense considering the master keys are no longer in there! Even just finding a way of being able to add them again would probably get this sorted for me.
joplin_log_cut-to-recent.txt (23.2 KB)
It seems the master key is just gone, so indeed it can’t encrypt. If you check on your webdav server, is there any .md file that contains the string
type_: 9 (that would be the master key)?
Sadly, I cannot seem to find a file with that string in it, there are other string types though (1, 2, 4, 13).
Something must have deleted the master key on the server then as Joplin in theory cannot do that and I don’t think it ever happened before.
Is there anything on your server log that could tell when and how that file was deleted? Otherwise, if you can’t recover it, you’ll need to disable and re-enable E2EE and re-sync (make sure you backup everything as JEX first). Doing so would create a new master key.
That makes sense. I did recently recreate my webdav server, backup joplin to JEX and do a full resync (had some server issues with a previous host that lead to my data being removed). I figured I had fixed it properly as documents were syncing to my latest webdav server without issue. However, it does seem like this is likely the culprit.
Will perform the steps you’ve recommended now.