{"record":{"id":"0eb4be3782ce40a0","repo":"Comfy-Org/ComfyUI","slug":"dist-zip-not-found-in-the-release-assets","errorCode":null,"errorMessage":"dist.zip not found in the release assets","messagePattern":"dist\\.zip not found in the release assets","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"app/frontend_management.py","lineNumber":184,"sourceCode":"        elif version == \"prerelease\":\n            return self.latest_prerelease\n        else:\n            for release in self.all_releases:\n                if release[\"tag_name\"] in [version, f\"v{version}\"]:\n                    return release\n            raise ValueError(f\"Version {version} not found in releases\")\n\n\ndef download_release_asset_zip(release: Release, destination_path: str) -> None:\n    \"\"\"Download dist.zip from github release.\"\"\"\n    asset_url = None\n    for asset in release.get(\"assets\", []):\n        if asset[\"name\"] == \"dist.zip\":\n            asset_url = asset[\"url\"]\n            break\n\n    if not asset_url:\n        raise ValueError(\"dist.zip not found in the release assets\")\n\n    # Use a temporary file to download the zip content\n    with tempfile.TemporaryFile() as tmp_file:\n        headers = {\"Accept\": \"application/octet-stream\"}\n        response = requests.get(\n            asset_url, headers=headers, allow_redirects=True, timeout=REQUEST_TIMEOUT\n        )\n        response.raise_for_status()  # Ensure we got a successful response\n\n        # Write the content to the temporary file\n        tmp_file.write(response.content)\n\n        # Go back to the beginning of the temporary file\n        tmp_file.seek(0)\n\n        # Extract the zip file content to the destination path\n        with zipfile.ZipFile(tmp_file, \"r\") as zip_ref:\n            zip_ref.extractall(destination_path)","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/app/frontend_management.py#L166-L202","documentation":"download_release_asset_zip iterates the 'assets' array of a GitHub release object looking for one named exactly 'dist.zip' (the bundled frontend build). If the release exists but has no dist.zip asset — or the cached release dict has an empty/missing assets list — it raises ValueError before attempting any download.","triggerScenarios":"Requesting a frontend version whose GitHub release was published without the dist.zip artifact (e.g. a draft, a source-only tag, or an asset still uploading); using a manually constructed Release dict from get_release('latest') when asset upload was delayed.","commonSituations":"Hitting a release seconds after publication before assets finished uploading; upstream publishing a release with a differently named artifact; GitHub returning a pruned asset list under rate limiting.","solutions":["Retry after a few minutes — assets are sometimes uploaded shortly after the release appears.","Choose an adjacent older release tag known to include dist.zip.","Verify the release on GitHub actually has dist.zip attached; if not, report/switch to one that does.","Check GitHub API rate limits if the assets list looks empty."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"asset_names = [a[\"name\"] for a in release.get(\"assets\", [])]\nif \"dist.zip\" not in asset_names:\n    raise SystemExit(\"release has no dist.zip asset; pick another version\")","typeGuard":"def release_has_dist_zip(release: dict) -> bool:\n    return any(a.get(\"name\") == \"dist.zip\" for a in release.get(\"assets\", []))","tryCatchPattern":"try:\n    download_release_asset_zip(release, dest)\nexcept ValueError as e:\n    if \"dist.zip\" in str(e):\n        release = fm.get_release(\"latest\")  # fallback release\n        download_release_asset_zip(release, dest)\n    else:\n        raise","preventionTips":["Check the assets list of the release object before downloading.","Retry shortly after a fresh release is published."],"tags":["frontend","network","github-api","download"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}