beemdevelopment/Aegis · error · DatabaseImporterException
Password incorrect
Error message
Password incorrect
What it means
During Aegis vault import, decrypt runs PasswordSlotDecryptTask with the user-supplied password against the vault's password slots. When the task's result comes back null — meaning no password slot could be decrypted with that password — a DatabaseImporterException("Password incorrect") is thrown. It signals the entered password cannot derive a key matching the file's key slots.
Solutions
- Re-enter the password carefully (check keyboard layout, caps lock, trailing spaces)
- Try passwords used for older vault versions if the export is from an older backup
- Confirm the file being imported is actually an Aegis encrypted vault export
- If the password is truly lost, the vault data cannot be recovered — restore from another backup
Example fix
// before PasswordSlotDecryptTask.Params params = new PasswordSlotDecryptTask.Params(slots, password.trim()); // after — no code fix; retry with the correct credential Dialogs.showPasswordInputDialog(context, listener); // re-prompt user until decrypt succeeds
Defensive patterns
Strategy: retry
Validate before calling
// nothing to validate programmatically — verify with the user that the password // and the source file (an Aegis-encrypted vault export) are correct before decrypting
Try / catch
try {
State state = importer.decrypt(creds);
listener.onStateDecrypted(state);
} catch (DatabaseImporterException e) {
if ("Password incorrect".equals(e.getMessage())) {
Dialogs.showPasswordInputDialog(context, R.string.enter_password_aegis_title, listener); // re-prompt
}
} Prevention
- Prompt the user to re-enter the password rather than failing outright
- Confirm the export file is an Aegis vault and matches the password's era
- Trim whitespace and mind keyboard layout when capturing passwords
- Keep backups exported before password changes
When it happens
Trigger: Calling decrypt on an Aegis vault file while supplying a password that doesn't match any PasswordSlot in the file: wrong password, wrong file's password, password changed after the export was made, or whitespace/encoding issues in the input.
Common situations: User forgot or mistyped the vault password; trying the current vault password on an older backup encrypted with a previous password; importing a different authenticator's file as an Aegis vault; trailing newline or wrong keyboard layout when typing the password.
Related errors
- Invalid number of iterations for PBKDF
- Unexpectedly high number of iterations
- unsupported otp type:
- Accounts.txt
- Key not found
AI-assisted analysis of beemdevelopment/Aegis@d6f4e5925a (2026-09-08).
Data as JSON: /api/errors/1b42e7ae1b6a8fd0.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/com/beemdevelopment/aegis/importers/AegisImporter.java:96
return new DecryptedState(obj, creds);
}
public State decrypt(char[] password) throws DatabaseImporterException {
List<PasswordSlot> slots = getSlots().findAll(PasswordSlot.class);
PasswordSlotDecryptTask.Result result = PasswordSlotDecryptTask.decrypt(slots, password);
VaultFileCredentials creds = new VaultFileCredentials(result.getKey(), getSlots());
return decrypt(creds);
}
@Override
public void decrypt(Context context, DecryptListener listener) {
Dialogs.showPasswordInputDialog(context, R.string.enter_password_aegis_title, 0, (Dialogs.TextInputListener) password -> {
List<PasswordSlot> slots = getSlots().findAll(PasswordSlot.class);
PasswordSlotDecryptTask.Params params = new PasswordSlotDecryptTask.Params(slots, password);
PasswordSlotDecryptTask task = new PasswordSlotDecryptTask(context, result -> {
try {
if (result == null) {
throw new DatabaseImporterException("Password incorrect");
}
VaultFileCredentials creds = new VaultFileCredentials(result.getKey(), getSlots());
State state = decrypt(creds);
listener.onStateDecrypted(state);
} catch (DatabaseImporterException e) {
listener.onError(e);
}
});
Lifecycle lifecycle = ContextHelper.getLifecycle(context);
task.execute(lifecycle, params);
}, (DialogInterface.OnCancelListener) dialog -> listener.onCanceled());
}
}
public static class DecryptedState extends State {
private JSONObject _obj;View on GitHub (pinned to d6f4e5925a)