{"record":{"id":"5a0f5df275732778","repo":"beemdevelopment/Aegis","slug":"unsupported-otp-type-5a0f5d","errorCode":null,"errorMessage":"unsupported otp type: ","messagePattern":"unsupported otp type: ","errorType":"exception","errorClass":"DatabaseImporterException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/com/beemdevelopment/aegis/importers/GoogleAuthImporter.java","lineNumber":112,"sourceCode":"        }\n\n        private static VaultEntry convertEntry(Entry entry, Context context) throws DatabaseImporterEntryException {\n            try {\n                if (entry.isEncrypted()) {\n                    throw new DatabaseImporterException(context.getString(R.string.importer_encrypted_exception_google_authenticator, entry.getEmail()));\n                }\n                byte[] secret = GoogleAuthInfo.parseSecret(entry.getSecret());\n\n                OtpInfo info;\n                switch (entry.getType()) {\n                    case TYPE_TOTP:\n                        info = new TotpInfo(secret);\n                        break;\n                    case TYPE_HOTP:\n                        info = new HotpInfo(secret, entry.getCounter());\n                        break;\n                    default:\n                        throw new DatabaseImporterException(\"unsupported otp type: \" + entry.getType());\n                }\n\n                String name = entry.getEmail();\n                String[] parts = name.split(\":\");\n                if (parts.length == 2) {\n                    name = parts[1];\n                }\n\n                return new VaultEntry(info, name, entry.getIssuer());\n            } catch (EncodingException | OtpInfoException | DatabaseImporterException e) {\n                throw new DatabaseImporterEntryException(e, entry.toString());\n            }\n        }\n    }\n\n    private static class Entry extends SqlImporterHelper.Entry {\n        private int _type;\n        private boolean _isEncrypted;","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/beemdevelopment/Aegis/blob/d6f4e5925a97e4e91593f1542085eae03432a759/app/src/main/java/com/beemdevelopment/aegis/importers/GoogleAuthImporter.java#L94-L130","documentation":"GoogleAuthImporter.convertEntry maps a parsed Google Authenticator entry to an Aegis OTP info object. Only TYPE_TOTP and TYPE_HOTP are supported; any other type value in the source entry makes it throw DatabaseImporterException, meaning the entry uses an OTP scheme this importer cannot convert.","triggerScenarios":"Importing a Google Authenticator export (or compatible database) that contains an entry whose type code is neither TOTP nor HOTP — e.g. a vendor-specific or future type value.","commonSituations":"Migrating from a modified/older Google Authenticator or a third-party app that stores extra OTP types; exports containing entries for unsupported schemes (e.g. mobile-OTP style tokens); corrupted type field in the source database.","solutions":["Remove or re-create the offending entry in the source app so the export only contains TOTP/HOTP entries, then re-import.","Manually add the unsupported token to Aegis by entering its secret as a TOTP/HOTP entry.","Check the source app version and export again with a stock Google Authenticator build.","If the type is a known variant, add a case in convertEntry mapping it to the appropriate OtpInfo subclass."],"exampleFix":"// before\ncase TYPE_HOTP:\n    info = new HotpInfo(secret, entry.getCounter());\n    break;\ndefault:\n    throw new DatabaseImporterException(\"unsupported otp type: \" + entry.getType());\n// after: skip unsupported entries instead of failing the whole import\ndefault:\n    result.addError(entry.getType(), \"unsupported otp type\");\n    continue;","handlingStrategy":"validation","validationCode":"// Filter entries before import\nfor (Entry entry : entries) {\n    int type = entry.getType();\n    if (type != TYPE_TOTP && type != TYPE_HOTP) {\n        reportSkipped(entry); // handle manually or drop\n    }\n}","typeGuard":"boolean isSupportedOtpType(int type) {\n    return type == TYPE_TOTP || type == TYPE_HOTP;\n}","tryCatchPattern":"try {\n    result = importer.importFromUri(uri);\n} catch (DatabaseImporterException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"unsupported otp type\")) {\n        showError(\"The export contains an OTP type Aegis can't convert; re-create that token manually.\");\n    }\n}","preventionTips":["Check the source app's export for non-TOTP/HOTP entries before migrating.","Migrate from stock Google Authenticator exports only.","Re-create exotic tokens manually as TOTP/HOTP in Aegis.","Keep Aegis updated for new type mappings."],"tags":["importer","otp","unsupported-type"],"backgroundTag":"unsupported-enum-value","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"}