# How do I get rid of 2nd master key

**URL:** <https://discourse.joplinapp.org/t/how-do-i-get-rid-of-2nd-master-key/39885>\
**Category:** Support\
**Created:** [29 August 2024 16:35 UTC](https://discourse.joplinapp.org/t/how-do-i-get-rid-of-2nd-master-key/39885 "2024-08-29T16:35:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkS](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@MarkS](https://discourse.joplinapp.org/u/MarkS)\
**Post date:** [29 August 2024 16:35 UTC](https://discourse.joplinapp.org/t/how-do-i-get-rid-of-2nd-master-key/39885/1 "2024-08-29T16:35:14Z")

</div>

### Operating system

Android

### Joplin version

3.0.12

### Desktop version info

3.0.12

### Sync target

OneDrive

### What issue do you have?

I have Joplin synchronized to Onedrive with encryption on the desktop. In the process of setting up Android, I seem to have created two master keys. And have (maybe) encrypted a few unimportant items with those keys. But when I try to synchronized the android, it can't load the original key, and stops.

I want to start over, but now the system knows about two keys and it won't forget the new, useless one. And the Android app isn't smart enough apparently to use both keys.

None of the controls on the desktop or on the Android seem to do anything.

All I want to do is get rid of the bad key and start over. Deleting the Android instance doesn't help because the change (of the 2nd key) has been written to the main onedrive repository.

It looks like I might be stuck exporting everything, undoing my original set up, reloading, re-encrypting ... all just because I can't fix one bad key.

Please help!

---

<div class="post-metadata">

**Author:** ![MarkS](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@MarkS](https://discourse.joplinapp.org/u/MarkS)\
**Post date:** [29 August 2024 17:05 UTC](https://discourse.joplinapp.org/t/how-do-i-get-rid-of-2nd-master-key/39885/2 "2024-08-29T17:05:07Z")

</div>

I may have been able to find the solution.

I used Onedrive to restore info.json to the way it was before I installed the Android app.

Uninstalled/reinstalled Joplin for Android and then synchronized properly.

Hopefully everything on the desktop will still work too.

Thanks!

---

<div class="post-metadata">

**Author:** ![personalizedrefriger](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/personalizedrefriger/32/13210_2.png) [@personalizedrefriger](https://discourse.joplinapp.org/u/personalizedrefriger)\
**Post date:** [29 August 2024 21:59 UTC](https://discourse.joplinapp.org/t/how-do-i-get-rid-of-2nd-master-key/39885/3 "2024-08-29T21:59:59Z")

</div>

I'm linking a pull request that should allow disabling master keys on mobile, which should simplify fixing similar issues in the future:

> <https://github.com/laurent22/joplin/pull/10943>
>
> \# Summary
> 
> This pull request:
> 1. Allows disabling master keys on mobile.
> 2. …Skips decrypting disabled master keys on startup.
> - Previously, all master keys were loaded on startup. This can be very slow. This may resolve https://github.com/laurent22/joplin/issues/10856.
> 3. Reloads master keys on mobile in more cases to match the CLI and desktop app's behavior.
> - This was necessary for clicking "enable" on a master key to cause it to load.
> 
> \# Testing plan
> 
> \*\*Web\*\*:
> 1. \*\*Setup\*\* (partially done before fixing the issue): Open the web client on two different browsers (Firefox and Chromium). Enable encryption on both (use different master passwords). Connect both to the same Joplin Server account.
> 2. Sync. For each client, go to settings and verify that two master keys are visible.
> 3. On Chrome:
> - Disable both.
> - Create a note.
> - Click "sync".
> - Verify that sync fails with an error: "Could not encrypt item \[...\] master key is disabled": 
> !\[screenshot: Encryption error message below the sync icon\](https://github.com/user-attachments/assets/eeb58c72-35c5-44c8-9fad-b051e223f7b6)
> - Enable one of the master keys.
> - Click "sync".
> - Verify that sync completes successfully.
> 4. On Firefox, if not already done, enter the password for the remote master key and click save.
> - \*\*Note\*\*: While testing locally, I then refreshed the page to apply the latest changes made locally.
> 5. Still on Firefox,
> - Sync.
> - Verify that sync completes successfully.
> 
> 
> \- \[\] \*\*Android\*\*: \*\*To-do\*\*
> \- \[\] \*\*Desktop\*\*: \*\*To-do\*\*
> \<!--
> 
> Please prefix the title with the platform you are targetting:
> 
> Here are some examples of good titles:
> 
> \- Desktop: Resolves #123: Added new setting to change font
> \- Mobile, Desktop: Fixes #456: Fixed config screen error
> \- All: Resolves #777: Made synchronisation faster
> 
> And here's an explanation of the title format:
> 
> \- "Desktop" for the Windows/macOS/Linux app (Electron app)
> \- "Mobile" for the mobile app (or "Android" / "iOS" if the pull request only applies to one of the mobile platforms)
> \- "CLI" for the CLI app
> 
> If it's two platforms, separate them with commas - "Desktop, Mobile" or if it's for all platforms, prefix with "All".
> 
> If it's not related to any platform (such as a translation, change to the documentation, etc.), simply don't add a platform.
> 
> Then please append the issue that you've addressed or fixed. Use "Resolves #123" for new features or improvements and "Fixes #123" for bug fixes.
> 
> AND PLEASE READ THE GUIDE: https://github.com/laurent22/joplin/blob/dev/readme/dev/index.md
> 
> \--\>

(Thank you for reporting this!)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)\
**Post date:** [28 September 2024 22:00 UTC](https://discourse.joplinapp.org/t/how-do-i-get-rid-of-2nd-master-key/39885/4 "2024-09-28T22:00:05Z")

</div>

Closed on 28 September 2024 22:00 UTC

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