Comfy-Org/ComfyUI · error · UploadError
EMPTY_UPLOAD
EMPTY_UPLOAD
Error message
Uploaded file is empty.
What it means
Raised as ApiServerError (comfy_api_nodes/util/client.py:943) when the request could not connect AND the diagnosis shows the internet is reachable (at least one of google.com/baidu.com responded), meaning the failure sits at the API host or the path to it. The message names default_base_url() and suggests a service-side outage.
Source
Thrown at app/assets/api/upload.py:154
"UNSUPPORTED_FIELD",
"Client-provided 'id' is not supported. Asset IDs are assigned by the server.",
)
elif fname == "mime_type":
provided_mime_type = ((await field.text()) or "").strip() or None
elif fname == "preview_id":
provided_preview_id = ((await field.text()) or "").strip() or None
if not file_present and not (provided_hash and provided_hash_exists):
raise UploadError(
400, "MISSING_FILE", "Form must include a 'file' part or a known 'hash'."
)
if (
file_present
and file_written == 0
and not (provided_hash and provided_hash_exists)
):
delete_temp_file_if_exists(tmp_path)
raise UploadError(400, "EMPTY_UPLOAD", "Uploaded file is empty.")
return ParsedUpload(
file_present=file_present,
file_written=file_written,
file_client_name=file_client_name,
tmp_path=tmp_path,
tags_raw=tags_raw,
provided_name=provided_name,
user_metadata_raw=user_metadata_raw,
provided_hash=provided_hash,
provided_hash_exists=provided_hash_exists,
provided_mime_type=provided_mime_type,
provided_preview_id=provided_preview_id,
)
def delete_temp_file_if_exists(tmp_path: str | None) -> None:
"""Safely remove a temp file and its parent directory if empty."""View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Check the provider's status page for an active incident
- Retry after a wait — connection-level outages are usually transient
- Verify DNS resolution of the API host from your machine (nslookup/dig) if outages are not reported
- Report to the provider if it persists while their status page is green
Defensive patterns
Strategy: retry
Type guard
from comfy_api_nodes.util.common_exceptions import ApiServerError
def is_api_server_error(e: BaseException) -> bool:
return isinstance(e, ApiServerError) Try / catch
from comfy_api_nodes.util.common_exceptions import ApiServerError
try:
result = await sync_op(...)
except ApiServerError:
await asyncio.sleep(30)
result = await sync_op(...) # transient outage retry
# cap retries; check provider status page if persistent Prevention
- Catch NetworkError subtypes explicitly to separate local vs server causes
- Check the provider status page before debugging your own setup
- Add exponential backoff with a retry cap for connection-level failures
When it happens
Trigger: API host down or restarting during a provider deploy; DNS for the API domain failing while general internet works; the API host's /health probe failing (>=500) or being unreachable; datacenter/regional outage between the user and the API.
Common situations: Provider outages and maintenance windows; API domain DNS propagation issues after provider migration; routing/peering problems affecting only the API host; provider rate-limiting at TCP/connection level.
Related errors
- The remote service appears unreachable at this time.
- UNSUPPORTED_MEDIA_TYPE
- HASH_CHECK_FAILED
- UPLOAD_IO_ERROR
- MISSING_FILE
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/2cdcf04c3e1e0569.
Report an issue: GitHub.