reflex-dev/reflex · error · ArchiveUploadError
could not reach the deployment service: {ex}
Error message
could not reach the deployment service: {ex} What it means
Thrown by upload_archives when reserving the upload fails at the transport level (any httpx.HTTPError that is not a status error): DNS failure, connection refused, timeout, TLS error. The CLI cannot reach the hosting deployment service at all, so no reservation could be made.
Source
Thrown at packages/reflex-hosting-cli/src/reflex_cli/utils/hosting.py:2236
Returns:
The deployment id the archives now live under, or None if this control
plane has no reserve endpoint and they have to be relayed instead.
Raises:
ArchiveUploadError: The archives could not be put where they belong.
"""
import httpx
for attempt in range(UPLOAD_ATTEMPTS):
try:
reservation = reserve_archive_upload(app_id, sizes, client)
except httpx.HTTPStatusError as ex:
raise ArchiveUploadError(
_response_detail(ex.response, f"HTTP {ex.response.status_code}")
) from ex
except httpx.HTTPError as ex:
raise ArchiveUploadError(
f"could not reach the deployment service: {ex}"
) from ex
if reservation is None:
return None
try:
_put_reserved_archives(zip_dir, reservation, sizes)
except httpx.HTTPStatusError as ex:
if ex.response.status_code != HTTPStatus.FORBIDDEN:
raise ArchiveUploadError(
f"could not upload the build to storage: HTTP {ex.response.status_code}"
) from ex
if attempt < UPLOAD_ATTEMPTS - 1:
logger.warning("the upload window expired; reserving another one")
except httpx.HTTPError as ex:
raise ArchiveUploadError(f"could not upload the build: {ex}") from ex
else:
return reservation["deployment_id"]
raise ArchiveUploadError(View on GitHub (pinned to 45b8ed5ab7)
Solutions
- Check network connectivity to the Reflex hosting service endpoint
- Configure proxy environment variables (HTTP_PROXY/HTTPS_PROXY) if behind a corporate proxy
- Retry the deploy once connectivity is restored
Defensive patterns
Strategy: retry
Validate before calling
import socket socket.gethostbyname(urlparse(constants.Hosting.HOSTING_SERVICE).hostname) # fails fast if DNS is broken
Try / catch
try:
upload_archives(...)
except ArchiveUploadError as ex:
if 'could not reach the deployment service' in str(ex):
wait_and_retry_with_backoff() Prevention
- Verify connectivity to the hosting endpoint before deploying
- Set HTTP_PROXY/HTTPS_PROXY in proxied environments
- Wrap deploys in retry with exponential backoff for transport failures
When it happens
Trigger: reserve_archive_upload raises httpx.ConnectError/ConnectTimeout/ReadTimeout during create_deployment; network down, proxy blocking, firewall, or the hosting service endpoint unreachable.
Common situations: Corporate proxy/VPN intercepting requests; no internet connectivity; custom HOSTING_SERVICE URL misconfigured; transient network outage.
Related errors
- _response_detail(ex.response, f"HTTP {ex.response.status_cod
- could not upload the build: {ex}
- could not upload the build to storage: HTTP {ex.response.sta
- the upload did not finish before its window closed; this usu
- _security_review_detail(ex.response)
AI-assisted analysis of reflex-dev/reflex@45b8ed5ab7 (2026-08-28).
Data as JSON: /api/errors/246fe24985df304f.
Report an issue: GitHub.