{"record":{"id":"2dd7eaf8d573dd5b","repo":"reflex-dev/reflex","slug":"could-not-upload-the-build-ex","errorCode":null,"errorMessage":"could not upload the build: {ex}","messagePattern":"could not upload the build: (.+?)","errorType":"exception","errorClass":"ArchiveUploadError","httpStatus":null,"severity":"error","filePath":"packages/reflex-hosting-cli/src/reflex_cli/utils/hosting.py","lineNumber":2251,"sourceCode":"                _response_detail(ex.response, f\"HTTP {ex.response.status_code}\")\n            ) from ex\n        except httpx.HTTPError as ex:\n            raise ArchiveUploadError(\n                f\"could not reach the deployment service: {ex}\"\n            ) from ex\n        if reservation is None:\n            return None\n        try:\n            _put_reserved_archives(zip_dir, reservation, sizes)\n        except httpx.HTTPStatusError as ex:\n            if ex.response.status_code != HTTPStatus.FORBIDDEN:\n                raise ArchiveUploadError(\n                    f\"could not upload the build to storage: HTTP {ex.response.status_code}\"\n                ) from ex\n            if attempt < UPLOAD_ATTEMPTS - 1:\n                logger.warning(\"the upload window expired; reserving another one\")\n        except httpx.HTTPError as ex:\n            raise ArchiveUploadError(f\"could not upload the build: {ex}\") from ex\n        else:\n            return reservation[\"deployment_id\"]\n    raise ArchiveUploadError(\n        \"the upload did not finish before its window closed; this usually means \"\n        \"the connection is too slow for the size of the build\"\n    )\n\n\ndef create_deployment(\n    zip_dir: Path,\n    client: AuthenticatedClient,\n    app_name: str | None,\n    project_id: str | None,\n    regions: list | None,\n    hostname: str | None,\n    vmtype: str | None,\n    secrets: dict | None,\n    packages: list | None,","sourceCodeStart":2233,"sourceCodeEnd":2269,"githubUrl":"https://github.com/reflex-dev/reflex/blob/45b8ed5ab735f8a56bbb09a42384f030eb0208e7/packages/reflex-hosting-cli/src/reflex_cli/utils/hosting.py#L2233-L2269","documentation":"Raised when uploading the build to storage fails with a transport-level httpx.HTTPError (connection dropped, timeout, TLS failure) rather than an HTTP status. The archive bytes could not be delivered to the reserved storage URL.","triggerScenarios":"_put_reserved_archives hits a network error: connection reset during upload, timeout on a large build, DNS/TLS failure to the storage host.","commonSituations":"Slow or unstable connection uploading a large build; proxy killing long uploads; mobile/hotspot networks; storage endpoint blocked by firewall.","solutions":["Retry the deploy on a stable, faster connection","Reduce build size (prune unnecessary assets in .web/static)","If behind a proxy, ensure it permits large PUT requests with long timeouts","Retry — transient resets are common on big uploads"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    upload_archives(...)\nexcept ArchiveUploadError as ex:\n    if str(ex).startswith('could not upload the build:'):\n        retry_with_backoff(max_attempts=3)","preventionTips":["Reduce build size to shorten upload time","Use stable wired connections for large deploys","Retry on transport-level upload failures"],"tags":["network","upload","deployment","timeout","storage"],"backgroundTag":"upload-failed","analyzedSha":"45b8ed5ab735f8a56bbb09a42384f030eb0208e7","analyzedAt":"2026-08-28T19:25:27.644Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}