Encrypted orphaned tags lingering and prompting for missing master key

Short version: two devices prompt me for decryption password for orphaned encrypted Welcome tags for which the master key is long gone. How can I get rid of these tags?

I sync encrypted notes across multiple devices of varying OS. I set up Joplin on an iPad back when the Welcome notebook included tags. I accidentally enabled encryption and put in my password before syncing my existing notes - which meant that I created a new master key rather than entering the password for the existing key. The only items that got encrypted with this new key were the ones in the Welcome notebook, which I deleted, so I also deleted the new key.

Unfortunately, while the notes and image resources from the Welcome notebook were eventually purged, the tags weren’t, and furthermore they were synced up from the iPad and synced down to my Chromebook running the Android version. At least, that’s the only explanation I’ve been able to find for the fact that from then on, my iPad and Chromebook have been displaying the orange bar prompting me to enter the decryption password for the same missing master key when there are no encrypted items visible anywhere in the UI and nothing else should ever have been encrypted by that key. Tapping the prompt takes me to the encryption config, which lists the missing master key but doesn’t have anywhere to put in a password, presumably because the key itself is long gone. (My two Windows machines and my iPhone do not give me this prompt or list the missing key under Encryption Config.)

I hoped that the various fixes to tag syncing since the time this happened would mean that if I reinstalled Joplin on the affected devices, the invisible encrypted orphaned tags wouldn’t be present anymore and I would no longer have the prompt permanently nagging me to enter a password that I couldn’t enter for data that doesn’t exist, but this doesn’t seem to be the case. Today I uninstalled Joplin, reinstalled it, and synced on both my iPad (version 10.0.40 with database v25, iOS 12.4.1) and my Chromebook (version 1.0.312 with database v25, Chrome OS 78.0.3904.106) and they both apparently pulled the orphan tags down again as they are again displaying the orange bar prompting me for the password for the missing key.

I know that people have been asking for a while for better tools to clean up orphaned tags, and the response has thus far been to try to make them invisible in the UI instead, which is how you end up with edge cases like this one. In fact, because the tags are invisible, I can’t even delete them in the UI. And because they are encrypted, I can’t add them to more notes to de-orphan them so that I can delete them, and I can’t decrypt them because their master key is long gone. The tags also don’t appear to exist on my other devices (those show that all items are decrypted) so I can’t use command-line tools on Windows to delete them there and sync the deletion. I do have all the synced files on Dropbox, but of course they are all encrypted so I have no idea where the tags are in there or how I might get rid of them from there.

I would like to get rid of these persistent orange bar prompts and ideally the tags themselves. Unless better tag management tools actually get added to the app, the only way I can think to do it is to blow everything away including the Dropbox backup and start fresh from one of the ‘clean’ devices, which is riskier than I want to do without a sanity check. Is there an option I’m overlooking here? Some way to identify and remove the tags from the Dropbox files (they should be the only files encrypted by the second master key) in a way that will sync down to the iPad and Chromebook? Or some way to delete the tags from those devices - or even just one, if that deletion will sync up to Dropbox? It doesn’t even have to sync back down; I can reinstall again on the other device. And just removing all tags indiscriminately is totally an option; I barely use tags and can easily recreate the couple that I have.

Well, this went four weeks without a reply and I didn’t come up with any better ideas, so I went ahead and restarted based on one of the ‘clean’ devices. To do this, I basically had to follow the steps from Can't Start Truly Fresh Install of Jopln which was a bit of a pain.

My immediate issue is resolved, but I’d like to point out that there were a lot of headaches here due to things that aren’t usefully exposed to the user. Things would have been much easier if the following things were actually accessible:

  1. Tags. If I could just actually delete tags, that would have solve this problem instantly.
  2. The ability to not to create the Welcome notebook when faced with a fresh install or empty DB. I know it’s not as bad as it used to be now that it doesn’t come with tags (and the fact that it did come with tags is what caused this problem in the first place), but deleting it is still an extra step and it leaves around revisions and image resources for a while that get copied up to the sync target, and I’ve lost count of the number of times I’ve had to do this - including once per device again as part of this process.
  3. Stored dropbox auth/connection settings. I couldn’t figure out how to get Joplin to just forget the current Dropbox sync situation and start fresh, so I had to blow away the existing DB/files and start with a reimported JEX file instead, which also meant creating a new master key for encryption.
1 Like