Mobile: master password is not persisted when keychain support is unavailable
Operating system
Android
Joplin version
3.7.10 (Android 13, Onyx BOOX, OS build 2026-08-06)
Desktop version info
Joplin 3.7.6 desktop, syncing to self-hosted Joplin Server (appMinVersion 3.7.0)
Current behaviour
On a device where the Android keystore is unavailable, Joplin correctly detects this and disables keychain support:
KeychainService: could not set test password - keychain support will be disabled
KeychainService: check was already done - skipping. Supported: 0However, the master password is then never persisted. After entering it in the encryption config screen and pressing Save (which gives no feedback), the e2ee layer still reports that no master password exists:
e2ee/utils: findMasterKeyPassword: No master password is defined - trying to get master key specific password
EncryptionService: Cannot load master key <key-id>. Invalid password? Error: Authentication failed! Error: Cipher.final(...): Cipher final failed
e2ee/utils: Loaded master keys: 0
DecryptionWorker: cannot start because no master key is currently loaded.Sync then halts on the first item it cannot encrypt:
Synchronizer: Error: Could not encrypt item <item-id>: Master key is not loaded: <key-id>The sync target state is healthy — a single master key, active and enabled, and the sanity check passes:
e2ee/utils: activeMasterKeySanityCheck: Active key is an enabled key - nothing to doThe same account and master password work correctly on desktop. Reinstalling the mobile app several times (clean installs, database rebuilt from version 0 to 53) reproduces the issue every time. A device PIN is set.
Note that the encryption config screen displays "Master password: Loaded" even though the e2ee layer reports none is defined, which makes this hard to diagnose from the UI alone.
Expected behaviour
When keychain support is disabled, secure settings such as
encryption.masterPassword should fall back to database storage so that E2EE
remains usable on devices without a working Android keystore.
Additionally, the Save button should report success or failure rather than silently doing nothing, and the encryption screen should not show the master password as "Loaded" when it has not been stored.
Source: laurent22/joplin