{"record":{"id":"8b4552a19f238208","repo":"beemdevelopment/Aegis","slug":"empty-secret-empty-authority","errorCode":null,"errorMessage":"Empty secret (empty authority)","messagePattern":"Empty secret \\(empty authority\\)","errorType":"exception","errorClass":"GoogleAuthInfoException","httpStatus":null,"severity":"error","filePath":"app/src/main/java/com/beemdevelopment/aegis/importers/BitwardenImporter.java","lineNumber":119,"sourceCode":"            return result;\n        }\n\n        private static VaultEntry convertEntry(String obj) throws DatabaseImporterEntryException {\n            try {\n                GoogleAuthInfo info = BitwardenImporter.parseUri(obj);\n                return new VaultEntry(info);\n            } catch (GoogleAuthInfoException | EncodingException | OtpInfoException | URISyntaxException e) {\n                throw new DatabaseImporterEntryException(e, obj);\n            }\n        }\n    }\n\n    private static GoogleAuthInfo parseUri(String s) throws EncodingException, OtpInfoException, URISyntaxException, GoogleAuthInfoException {\n        Uri uri = Uri.parse(s);\n        if (Objects.equals(uri.getScheme(), \"steam\")) {\n            String secretString = uri.getAuthority();\n            if (secretString == null) {\n                throw new GoogleAuthInfoException(uri, \"Empty secret (empty authority)\");\n            }\n            byte[] secret = Base32.decode(secretString);\n            return new GoogleAuthInfo(new SteamInfo(secret), \"Steam account\", \"Steam\");\n        }\n\n        return GoogleAuthInfo.parseUri(uri);\n    }\n}\n","sourceCodeStart":101,"sourceCodeEnd":128,"githubUrl":"https://github.com/beemdevelopment/Aegis/blob/d6f4e5925a97e4e91593f1542085eae03432a759/app/src/main/java/com/beemdevelopment/aegis/importers/BitwardenImporter.java#L101-L128","documentation":"The Bitwarden importer handles Bitwarden's special \"steam://\" URIs, where the TOTP secret is carried in the URI authority. If a steam URI has no authority component (empty secret), GoogleAuthInfoException is thrown since a Steam TOTP entry cannot exist without a secret.","triggerScenarios":"Importing a Bitwarden export whose otp:// (steam) URI looks like \"steam://\" or \"steam://?...\" with no secret before the query string — i.e. the item's TOTP seed was empty or malformed.","commonSituations":"Bitwarden vault item with an empty/invalid TOTP custom field; hand-crafted URI missing the secret; copy-paste truncation of the seed before saving in Bitwarden.","solutions":["Open the item in Bitwarden and fill in the correct Steam TOTP secret, then re-export","Fix the URI in the export so the secret appears in the authority: steam://BASE32SECRET","Remove or skip entries with empty secrets during import","Verify the seed is valid Base32 after editing"],"exampleFix":"// before\nString secretString = uri.getAuthority();\nif (secretString == null) {\n    throw new GoogleAuthInfoException(uri, \"Empty secret (empty authority)\");\n}\n// after\nString secretString = uri.getAuthority();\nif (secretString == null || secretString.isEmpty()) {\n    throw new GoogleAuthInfoException(uri, \"Empty secret (empty authority): steam URIs must be steam://<base32secret>\");\n}","handlingStrategy":"validation","validationCode":"Uri uri = Uri.parse(s);\nif (\"steam\".equals(uri.getScheme()) && (uri.getAuthority() == null || uri.getAuthority().isEmpty())) {\n    throw new IllegalArgumentException(\"steam:// URI missing base32 secret in authority\");\n}","typeGuard":"static boolean hasSteamSecret(Uri uri) {\n    return !\"steam\".equals(uri.getScheme())\n        || (uri.getAuthority() != null && !uri.getAuthority().isEmpty());\n}","tryCatchPattern":"try {\n    info = GoogleAuthInfo.parseUri(s);\n} catch (GoogleAuthInfoException e) {\n    if (e.getMessage().contains(\"Empty secret\")) {\n        skipEntry(uri, \"missing Steam seed\");\n    }\n}","preventionTips":["Ensure each Bitwarden item has a non-empty TOTP seed before export","Sanity-check exported otpauth/steam URIs for empty authorities","Fix truncated seeds at the source app, not in the export file"],"tags":["import","uri","steam","validation"],"backgroundTag":"empty-required-field","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"}