{"record":{"id":"2cc9b82a3812194d","repo":"beemdevelopment/Aegis","slug":"unsupported-otp-type-2cc9b8","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/FreeOtpImporter.java","lineNumber":322,"sourceCode":"\n                String issuer = obj.getString(\"issuerExt\");\n                String name = obj.optString(\"label\");\n\n                OtpInfo info;\n                switch (type) {\n                    case \"totp\":\n                        int period = obj.optInt(\"period\", TotpInfo.DEFAULT_PERIOD);\n                        if (issuer.equals(\"Steam\")) {\n                            info = new SteamInfo(secret, algo, digits, period);\n                        } else {\n                            info = new TotpInfo(secret, algo, digits, period);\n                        }\n                        break;\n                    case \"hotp\":\n                        info = new HotpInfo(secret, algo, digits, obj.getLong(\"counter\"));\n                        break;\n                    default:\n                        throw new DatabaseImporterException(\"unsupported otp type: \" + type);\n                }\n\n                return new VaultEntry(info, name, issuer);\n            } catch (DatabaseImporterException | OtpInfoException | JSONException e) {\n                throw new DatabaseImporterEntryException(e, obj.toString());\n            }\n        }\n    }\n\n    private static byte[] parseNonce(byte[] parameters) throws IOException {\n        ASN1Primitive prim = ASN1Sequence.fromByteArray(parameters);\n        if (prim instanceof ASN1OctetString) {\n            return ((ASN1OctetString) prim).getOctets();\n        }\n\n        if (prim instanceof ASN1Sequence) {\n            for (ASN1Encodable enc : (ASN1Sequence) prim) {\n                if (enc instanceof ASN1OctetString) {","sourceCodeStart":304,"sourceCodeEnd":340,"githubUrl":"https://github.com/beemdevelopment/Aegis/blob/d6f4e5925a97e4e91593f1542085eae03432a759/app/src/main/java/com/beemdevelopment/aegis/importers/FreeOtpImporter.java#L304-L340","documentation":"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.","triggerScenarios":"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.","commonSituations":"Version drift between FreeOTP export schema and Aegis importer; custom token types added by forks; hand-edited backups with typos (e.g. \"TOTP\" uppercase).","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"],"exampleFix":"// before\ndefault:\n    throw new DatabaseImporterException(\"unsupported otp type: \" + type);\n// after\ndefault:\n    if (type.equalsIgnoreCase(\"totp\")) { type = \"totp\"; /* re-dispatch */ }\n    else throw new DatabaseImporterException(\"unsupported otp type: \" + type);","handlingStrategy":"try-catch","validationCode":"String type = tokenObj.optString(\"tokentype\", \"\").toLowerCase();\nif (!type.equals(\"totp\") && !type.equals(\"hotp\")) {\n    // unsupported — skip or warn before import\n}","typeGuard":null,"tryCatchPattern":"try {\n    entry = importer.convertEntry(encObj, tokenObj);\n} catch (DatabaseImporterEntryException e) {\n    log.warn(\"Unsupported token type, entry skipped: \" + e.getMessage());\n}","preventionTips":["Pre-scan the backup JSON for unknown tokentype values","Update Aegis for new FreeOTP token types","Recreate exotic tokens manually in Aegis"],"tags":["import","freeotp","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"}