apache/superset · error

Invalid language pack version

Error message

Invalid language pack version

What it means

Error "Invalid language pack version" thrown in apache/superset.

Source

Thrown at superset/views/core.py:724

    @expose("/language_pack/<lang>/<version>/script.js")
    def language_pack_script(self, lang: str, version: str) -> FlaskResponse:
        """Serve the language pack as a content-addressed classic script.

        spa.html loads this BEFORE the entry bundle so translations are
        configured synchronously (no race with code-split chunks), while the
        versioned URL lets browsers cache the pack as immutable and pick up a
        fresh copy whenever translations change.

        Deliberately unauthenticated: translation catalogs are static, public
        content shipped in the Superset repo, contain no user or tenant data,
        and must load for anonymous principals (login page, embedded).
        """
        # Only allow expected language formats like "en", "pt_BR", etc.
        if not LANGUAGE_CODE_RE.match(lang):
            abort(400, "Invalid language code")
        if not re.match(r"^[0-9a-f]{12}$", version):
            abort(400, "Invalid language pack version")

        current_version: Optional[str] = get_language_pack_version(lang)
        if current_version is None:
            return json_error_response(
                "Language pack doesn't exist on the server", status=404
            )
        pack: Optional[dict[str, Any]] = get_language_pack(lang)
        if pack is None:
            return json_error_response(
                "Language pack doesn't exist on the server", status=404
            )

        response: Response = Response(
            f"window.__SUPERSET_LANGUAGE_PACK__ = {json.dumps(pack)};",
            mimetype="application/javascript; charset=utf-8",
        )
        if version == current_version:
            # Content-addressed URL: safe to cache forever.

View on GitHub (pinned to f4587218dd)

Solutions

  1. Rebuild/reinstall the frontend assets so the language pack version matches the application version.

When it happens

Trigger: The frontend language pack version does not match the backend version.

Common situations: Posting a language pack whose declared version does not match the running Superset version.


AI-assisted analysis of apache/superset@f4587218dd (2026-08-14). Data as JSON: /api/errors/3bf2e96705295a28. Report an issue: GitHub.