{"record":{"id":"bf4356bfa4d3ee63","repo":"beemdevelopment/Aegis","slug":"accounts-txt","errorCode":null,"errorMessage":"Accounts.txt","messagePattern":"Accounts\\.txt","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/com/beemdevelopment/aegis/importers/AuthenticatorPlusImporter.java","lineNumber":59,"sourceCode":"\n        private EncryptedState(byte[] data) {\n            super(true);\n            _data = data;\n        }\n\n        protected State decrypt(char[] password) throws DatabaseImporterException {\n            try (ByteArrayInputStream inStream = new ByteArrayInputStream(_data);\n                 ZipInputStream zipStream = new ZipInputStream(inStream, password)) {\n                LocalFileHeader header;\n                while ((header = zipStream.getNextEntry()) != null) {\n                    File file = new File(header.getFileName());\n                    if (file.getName().equals(FILENAME)) {\n                        GoogleAuthUriImporter importer = new GoogleAuthUriImporter(null);\n                        return importer.read(zipStream);\n                    }\n                }\n\n                throw new FileNotFoundException(FILENAME);\n            } catch (IOException e) {\n                throw new DatabaseImporterException(e);\n            }\n        }\n\n        @Override\n        public void decrypt(Context context, DecryptListener listener) {\n            Dialogs.showPasswordInputDialog(context, password -> {\n                try {\n                    DatabaseImporter.State state = decrypt(password);\n                    listener.onStateDecrypted(state);\n                } catch (DatabaseImporterException e) {\n                    listener.onError(e);\n                }\n            }, dialog1 -> listener.onCanceled());\n        }\n    }\n}","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/beemdevelopment/Aegis/blob/d6f4e5925a97e4e91593f1542085eae03432a759/app/src/main/java/com/beemdevelopment/aegis/importers/AuthenticatorPlusImporter.java#L41-L77","documentation":"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.","triggerScenarios":"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.","commonSituations":"Partial backup (data exported as CSV instead); re-zipped archive that renamed the file; picking the wrong zip from a device backup.","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"],"exampleFix":"// before\nthrow new FileNotFoundException(FILENAME);\n// after\nthrow new DatabaseImporterException(\n    String.format(\"%s not found in archive; this does not look like an Authenticator Plus backup\", FILENAME));","handlingStrategy":"validation","validationCode":"try (ZipFile zip = new ZipFile(backupPath)) {\n    if (zip.getEntry(\"Accounts.txt\") == null) {\n        throw new IllegalArgumentException(\"Zip is missing Accounts.txt — not an Authenticator Plus backup\");\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    importer.read(stream);\n} catch (DatabaseImporterException | FileNotFoundException e) {\n    showUserError(\"Backup zip must contain Accounts.txt\");\n}","preventionTips":["Export the full backup (not CSV-only) from Authenticator Plus","Never rename files inside the backup zip","Verify zip contents before import"],"tags":["import","zip","file-not-found","android"],"backgroundTag":"file-not-found","analyzedSha":"d6f4e5925a97e4e91593f1542085eae03432a759","analyzedAt":"2026-09-08T00:46:31.111Z","contentChangedAt":"2026-09-08T00:46:31.111Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}