{"record":{"id":"941adeb694a7b1a2","repo":"beemdevelopment/Aegis","slug":"unsupported-otp-type-s","errorCode":null,"errorMessage":"Unsupported OTP type: %s","messagePattern":"Unsupported OTP type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/main/java/com/beemdevelopment/aegis/otp/GoogleAuthInfo.java","lineNumber":113,"sourceCode":"                        throw new GoogleAuthInfoException(uri, \"Parameter 'counter' is not present\");\n                    }\n                    hotpInfo.setCounter(Long.parseLong(counter));\n                    info = hotpInfo;\n                    break;\n                case YandexInfo.HOST_ID:\n                    String pin = uri.getQueryParameter(\"pin\");\n                    if (pin != null) {\n                        pin = new String(parseSecret(pin), StandardCharsets.UTF_8);\n                    }\n\n                    info = new YandexInfo(secret, pin);\n                    issuer = info.getType();\n                    break;\n                case MotpInfo.ID:\n                    info = new MotpInfo(secret);\n                    break;\n                default:\n                    throw new GoogleAuthInfoException(uri, String.format(\"Unsupported OTP type: %s\", type));\n            }\n        } catch (OtpInfoException | NumberFormatException | EncodingException e) {\n            throw new GoogleAuthInfoException(uri, e);\n        }\n\n        // provider info used to disambiguate accounts\n        String path = uri.getPath();\n        String label = path != null && path.length() > 0 ? path.substring(1) : \"\";\n\n        String accountName = \"\";\n\n        if (label.contains(\":\")) {\n            // a label can only contain one colon\n            // it's ok to fail if that's not the case\n            String[] strings = label.split(\":\");\n            if (strings.length == 2) {\n                issuer = strings[0];\n                accountName = strings[1];","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/beemdevelopment/Aegis/blob/d6f4e5925a97e4e91593f1542085eae03432a759/app/src/main/java/com/beemdevelopment/aegis/otp/GoogleAuthInfo.java#L95-L131","documentation":"The URI's host (OTP type) parsed and was non-null but is not one of the supported types (totp, hotp, steam, YandexInfo.HOST_ID, motp). The library rejects unknown OTP types via this default-branch throw.","triggerScenarios":"parseUri(Uri) with a host like otpauth://xotp/... or a typo such as otpauth://TOTP (case-sensitive switch), or proprietary host IDs from other authenticators.","commonSituations":"Importing URIs generated by other apps with custom types, typos in hand-built URIs, uppercase or trailing-whitespace hosts.","solutions":["Use a supported type in the URI host: totp, hotp, steam, or the supported vendor IDs","Lowercase and trim the host before building the URI","Map the unsupported type to totp if it's a standard TOTP variant, or import the entry manually"],"exampleFix":"// before\nString uri = \"otpauth://TOTP/x?secret=JBSWY3DPEHPK3PXP\";\n// after\nString uri = \"otpauth://totp/x?secret=JBSWY3DPEHPK3PXP\";","handlingStrategy":"validation","validationCode":"Set<String> ok = Set.of(\"totp\",\"hotp\",\"steam\"); if (!ok.contains(uri.getHost())) throw new IllegalArgumentException(\"unsupported OTP type: \" + uri.getHost());","typeGuard":null,"tryCatchPattern":"try { return GoogleAuthInfo.parseUri(uri); } catch (GoogleAuthInfoException e) { showUnsupportedTypeError(uri.getHost()); return null; }","preventionTips":["Normalize the type host to lowercase before generating URIs","Only use documented types: totp, hotp, steam","Map vendor-specific types to a supported equivalent or import manually"],"tags":["android","otp","unsupported-type","uri"],"backgroundTag":"invalid-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"}