beemdevelopment/Aegis · error · DatabaseImporterException
unsupported otp type:
Error message
unsupported otp type:
What it means
FreeOTP stores each token's type ("tokentype"). The importer maps totp/hotp to TotpInfo/HotpInfo; any other type string is rejected with DatabaseImporterException because Aegis has no corresponding OTP scheme. The exception is wrapped in a DatabaseImporterEntryException naming the offending entry.
Solutions
- Update Aegis to the latest version for newer FreeOTP type support
- Check the entry's type value in the JSON; fix typos/casing to "totp" or "hotp"
- Re-add unsupported tokens manually in Aegis (they can't be converted automatically)
- File an issue/PR with Aegis to add the missing token type
Example fix
// before
default:
throw new DatabaseImporterException("unsupported otp type: " + type);
// after
default:
if (type.equalsIgnoreCase("totp")) { type = "totp"; /* re-dispatch */ }
else throw new DatabaseImporterException("unsupported otp type: " + type); Defensive patterns
Strategy: try-catch
Validate before calling
String type = tokenObj.optString("tokentype", "").toLowerCase();
if (!type.equals("totp") && !type.equals("hotp")) {
// unsupported — skip or warn before import
} Try / catch
try {
entry = importer.convertEntry(encObj, tokenObj);
} catch (DatabaseImporterEntryException e) {
log.warn("Unsupported token type, entry skipped: " + e.getMessage());
} Prevention
- Pre-scan the backup JSON for unknown tokentype values
- Update Aegis for new FreeOTP token types
- Recreate exotic tokens manually in Aegis
When it happens
Trigger: A FreeOTP backup contains a token whose type is not "totp" or "hotp" — e.g. an internal/unrecognized type from a FreeOTP fork or a manually edited JSON.
Common situations: Version drift between FreeOTP export schema and Aegis importer; custom token types added by forks; hand-edited backups with typos (e.g. "TOTP" uppercase).
Related errors
- unsupported otp type:
- Unexpected master key KDF
- Unexpected master key cipher
- Unexpected cipher
- unsupported otp type:
AI-assisted analysis of beemdevelopment/Aegis@d6f4e5925a (2026-09-08).
Data as JSON: /api/errors/2cc9b82a3812194d.
Report an issue: GitHub.
Appendix: source
Thrown at app/src/main/java/com/beemdevelopment/aegis/importers/FreeOtpImporter.java:322
String issuer = obj.getString("issuerExt");
String name = obj.optString("label");
OtpInfo info;
switch (type) {
case "totp":
int period = obj.optInt("period", TotpInfo.DEFAULT_PERIOD);
if (issuer.equals("Steam")) {
info = new SteamInfo(secret, algo, digits, period);
} else {
info = new TotpInfo(secret, algo, digits, period);
}
break;
case "hotp":
info = new HotpInfo(secret, algo, digits, obj.getLong("counter"));
break;
default:
throw new DatabaseImporterException("unsupported otp type: " + type);
}
return new VaultEntry(info, name, issuer);
} catch (DatabaseImporterException | OtpInfoException | JSONException e) {
throw new DatabaseImporterEntryException(e, obj.toString());
}
}
}
private static byte[] parseNonce(byte[] parameters) throws IOException {
ASN1Primitive prim = ASN1Sequence.fromByteArray(parameters);
if (prim instanceof ASN1OctetString) {
return ((ASN1OctetString) prim).getOctets();
}
if (prim instanceof ASN1Sequence) {
for (ASN1Encodable enc : (ASN1Sequence) prim) {
if (enc instanceof ASN1OctetString) {View on GitHub (pinned to d6f4e5925a)