{"record":{"id":"4eccc414f99e8ace","repo":"HMCL-dev/HMCL","slug":"theme-is-missing-required-localized-text-field-na","errorCode":null,"errorMessage":"Theme is missing required localized text field: name","messagePattern":"Theme is missing required localized text field: name","errorType":"validation","errorClass":"JsonParseException","httpStatus":null,"severity":"error","filePath":"HMCL/src/main/java/org/jackhuang/hmcl/theme/Theme.java","lineNumber":121,"sourceCode":"        }\n        if (id == null && requireIdentity) {\n            throw new JsonParseException(\"Theme is missing the id\");\n        }\n        @Nullable LocalizedText name;\n        try {\n            name = LocalizedText.fromJson(object.get(\"name\"));\n            if (name != null && name.mayBeEmpty()) {\n                throw new JsonParseException(\"Theme name is empty: \" + name);\n            }\n        } catch (JsonParseException | IllegalArgumentException e) {\n            if (requireIdentity) {\n                throw e;\n            }\n            LOG.warning(\"Ignored invalid theme name\", e);\n            name = null;\n        }\n        if (name == null && requireIdentity) {\n            throw new JsonParseException(\"Theme is missing required localized text field: \" + \"name\");\n        }\n\n        List<ThemePackAuthor> authors;\n        try {\n            authors = ThemePackAuthor.parseAuthors(object.get(\"authors\"));\n        } catch (Exception e) {\n            LOG.warning(\"Failed to parse authors\", e);\n            authors = List.of();\n        }\n\n        @Nullable LocalizedText description;\n\n        try {\n            description = LocalizedText.fromJson(object.get(\"description\"));\n            if (description != null) {\n                description = ThemePackManifest.requireLocalizedText(description, \"description\");\n            }\n        } catch (Exception e) {","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/HMCL-dev/HMCL/blob/24702dc5a0214034f4c27166d5fd30cad08cec19/HMCL/src/main/java/org/jackhuang/hmcl/theme/Theme.java#L103-L139","documentation":"Raised in Theme.fromJson() when a required localized text field — here the 'name' field — is missing or cannot be parsed as LocalizedText, and identity is required. The theme is unusable in the picker without a display name, so parsing aborts instead of logging and continuing (the tolerant branch only applies when requireIdentity is false).","triggerScenarios":"Thrown at HMCL/src/main/java/org/jackhuang/hmcl/theme/Theme.java:121 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a valid localized 'name' object (e.g. {\"en_US\": \"...\", \"zh_CN\": \"...\"}) to the theme JSON.","Ensure the 'name' value is a JSON object of locale-to-string mappings, not a bare string or null.","Re-download the theme pack; the file may be corrupted or truncated."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24702dc5a0214034f4c27166d5fd30cad08cec19","analyzedAt":"2026-09-10T12:36:46.680Z","contentChangedAt":"2026-09-10T12:36:46.680Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}