MarkS
29 August 2024 16:35
1
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!
MarkS
29 August 2024 17:05
2
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!
I'm linking a pull request that should allow disabling master keys on mobile, which should simplify fixing similar issues in the future:
laurent22:dev
← personalizedrefrigerator:pr/mobile/improve-master-key-startup-perf
opened 09:47PM - 29 Aug 24 UTC
# 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!)