{"record":{"id":"3bf2e96705295a28","repo":"apache/superset","slug":"invalid-language-pack-version","errorCode":null,"errorMessage":"Invalid language pack version","messagePattern":"Invalid language pack version","errorType":"http","errorClass":null,"httpStatus":400,"severity":"error","filePath":"superset/views/core.py","lineNumber":724,"sourceCode":"\n    @expose(\"/language_pack/<lang>/<version>/script.js\")\n    def language_pack_script(self, lang: str, version: str) -> FlaskResponse:\n        \"\"\"Serve the language pack as a content-addressed classic script.\n\n        spa.html loads this BEFORE the entry bundle so translations are\n        configured synchronously (no race with code-split chunks), while the\n        versioned URL lets browsers cache the pack as immutable and pick up a\n        fresh copy whenever translations change.\n\n        Deliberately unauthenticated: translation catalogs are static, public\n        content shipped in the Superset repo, contain no user or tenant data,\n        and must load for anonymous principals (login page, embedded).\n        \"\"\"\n        # Only allow expected language formats like \"en\", \"pt_BR\", etc.\n        if not LANGUAGE_CODE_RE.match(lang):\n            abort(400, \"Invalid language code\")\n        if not re.match(r\"^[0-9a-f]{12}$\", version):\n            abort(400, \"Invalid language pack version\")\n\n        current_version: Optional[str] = get_language_pack_version(lang)\n        if current_version is None:\n            return json_error_response(\n                \"Language pack doesn't exist on the server\", status=404\n            )\n        pack: Optional[dict[str, Any]] = get_language_pack(lang)\n        if pack is None:\n            return json_error_response(\n                \"Language pack doesn't exist on the server\", status=404\n            )\n\n        response: Response = Response(\n            f\"window.__SUPERSET_LANGUAGE_PACK__ = {json.dumps(pack)};\",\n            mimetype=\"application/javascript; charset=utf-8\",\n        )\n        if version == current_version:\n            # Content-addressed URL: safe to cache forever.","sourceCodeStart":706,"sourceCodeEnd":742,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/views/core.py#L706-L742","documentation":"Error \"Invalid language pack version\" thrown in apache/superset.","triggerScenarios":"The frontend language pack version does not match the backend version.","commonSituations":"Posting a language pack whose declared version does not match the running Superset version.","solutions":["Rebuild/reinstall the frontend assets so the language pack version matches the application version."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}