beemdevelopment/Aegis · error · DatabaseImporterException
unsupported otp type:
Error message
unsupported otp type:
What it means
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.
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.
Example fix
// before
case TYPE_HOTP:
info = new HotpInfo(secret, entry.getCounter());
break;
default:
throw new DatabaseImporterException("unsupported otp type: " + entry.getType());
// after: skip unsupported entries instead of failing the whole import
default:
result.addError(entry.getType(), "unsupported otp type");
continue; Defensive patterns
Strategy: validation
Validate before calling
// Filter entries before import
for (Entry entry : entries) {
int type = entry.getType();
if (type != TYPE_TOTP && type != TYPE_HOTP) {
reportSkipped(entry); // handle manually or drop
}
} Type guard
boolean isSupportedOtpType(int type) {
return type == TYPE_TOTP || type == TYPE_HOTP;
} Try / catch
try {
result = importer.importFromUri(uri);
} catch (DatabaseImporterException e) {
if (e.getMessage() != null && e.getMessage().startsWith("unsupported otp type")) {
showError("The export contains an OTP type Aegis can't convert; re-create that token manually.");
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unrecognized tokenType
- unsupported otp type:
- unsupported otp type:
- Unsupported OTP type
- Unsupported OtpInfo type
AI-assisted analysis of beemdevelopment/Aegis@d6f4e5925a (2026-09-08).
Data as JSON: /api/errors/5a0f5df275732778.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/com/beemdevelopment/aegis/importers/GoogleAuthImporter.java:112
}
private static VaultEntry convertEntry(Entry entry, Context context) throws DatabaseImporterEntryException {
try {
if (entry.isEncrypted()) {
throw new DatabaseImporterException(context.getString(R.string.importer_encrypted_exception_google_authenticator, entry.getEmail()));
}
byte[] secret = GoogleAuthInfo.parseSecret(entry.getSecret());
OtpInfo info;
switch (entry.getType()) {
case TYPE_TOTP:
info = new TotpInfo(secret);
break;
case TYPE_HOTP:
info = new HotpInfo(secret, entry.getCounter());
break;
default:
throw new DatabaseImporterException("unsupported otp type: " + entry.getType());
}
String name = entry.getEmail();
String[] parts = name.split(":");
if (parts.length == 2) {
name = parts[1];
}
return new VaultEntry(info, name, entry.getIssuer());
} catch (EncodingException | OtpInfoException | DatabaseImporterException e) {
throw new DatabaseImporterEntryException(e, entry.toString());
}
}
}
private static class Entry extends SqlImporterHelper.Entry {
private int _type;
private boolean _isEncrypted;View on GitHub (pinned to d6f4e5925a)