beemdevelopment/Aegis · error · FileNotFoundException
Accounts.txt
Error message
Accounts.txt
What it means
The Authenticator Plus importer expects a zip archive containing a file named "Accounts.txt" holding the encrypted entries. When no zip entry with that name is found, it throws FileNotFoundException with that constant name (wrapped flow), signaling the archive is not a valid Authenticator Plus export.
Solutions
- Re-export a full backup from Authenticator Plus (must include Accounts.txt) and import that zip
- Unzip the archive and confirm Accounts.txt exists at the top level; re-zip preserving the name if needed
- Do not rename or convert Accounts.txt (e.g. to CSV-only exports)
- Verify you selected the correct zip, not another app's backup
Example fix
// before
throw new FileNotFoundException(FILENAME);
// after
throw new DatabaseImporterException(
String.format("%s not found in archive; this does not look like an Authenticator Plus backup", FILENAME)); Defensive patterns
Strategy: validation
Validate before calling
try (ZipFile zip = new ZipFile(backupPath)) {
if (zip.getEntry("Accounts.txt") == null) {
throw new IllegalArgumentException("Zip is missing Accounts.txt — not an Authenticator Plus backup");
}
} Try / catch
try {
importer.read(stream);
} catch (DatabaseImporterException | FileNotFoundException e) {
showUserError("Backup zip must contain Accounts.txt");
} Prevention
- Export the full backup (not CSV-only) from Authenticator Plus
- Never rename files inside the backup zip
- Verify zip contents before import
When it happens
Trigger: User selects an Authenticator Plus backup zip that lacks Accounts.txt — e.g. an incomplete export, a different app's zip, or an archive where the file was renamed/relocated.
Common situations: Partial backup (data exported as CSV instead); re-zipped archive that renamed the file; picking the wrong zip from a device backup.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Unable to find pack.json in the root of the ZIP file
- Unable to find relative to the root of the ZIP file
- Invalid number of iterations for PBKDF
- Unexpectedly high number of iterations
- Key not found
AI-assisted analysis of beemdevelopment/Aegis@d6f4e5925a (2026-09-08).
Data as JSON: /api/errors/bf4356bfa4d3ee63.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/com/beemdevelopment/aegis/importers/AuthenticatorPlusImporter.java:59
private EncryptedState(byte[] data) {
super(true);
_data = data;
}
protected State decrypt(char[] password) throws DatabaseImporterException {
try (ByteArrayInputStream inStream = new ByteArrayInputStream(_data);
ZipInputStream zipStream = new ZipInputStream(inStream, password)) {
LocalFileHeader header;
while ((header = zipStream.getNextEntry()) != null) {
File file = new File(header.getFileName());
if (file.getName().equals(FILENAME)) {
GoogleAuthUriImporter importer = new GoogleAuthUriImporter(null);
return importer.read(zipStream);
}
}
throw new FileNotFoundException(FILENAME);
} catch (IOException e) {
throw new DatabaseImporterException(e);
}
}
@Override
public void decrypt(Context context, DecryptListener listener) {
Dialogs.showPasswordInputDialog(context, password -> {
try {
DatabaseImporter.State state = decrypt(password);
listener.onStateDecrypted(state);
} catch (DatabaseImporterException e) {
listener.onError(e);
}
}, dialog1 -> listener.onCanceled());
}
}
}View on GitHub (pinned to d6f4e5925a)