Comfy-Org/ComfyUI · error · LocalNetworkError

Unable to connect to the network. Please check your internet

Error message

Unable to connect to the network. Please check your internet connection and try again.

What it means

After a ClientError/OSError exhausted retries, the helper runs _diagnose_connectivity(); when the machine itself cannot reach the internet it raises LocalNetworkError advising the user to check their connection. This distinguishes 'my network is down' from 'the service is down' (see error 776).

Source

Thrown at comfy_api_nodes/util/download_helpers.py:195

                )
                return
        except asyncio.CancelledError:
            raise ProcessingInterrupted("Task cancelled") from None
        except (ClientError, OSError) as e:
            if attempt <= max_retries:
                request_logger.log_request_response(
                    operation_id=op_id,
                    request_method="GET",
                    request_url=url,
                    error_message=f"{type(e).__name__}: {str(e)} (will retry)",
                )
                await sleep_with_interrupt(delay, cls, None, None, None)
                delay *= retry_backoff
                continue

            diag = await _diagnose_connectivity()
            if not diag["internet_accessible"]:
                raise LocalNetworkError(
                    "Unable to connect to the network. Please check your internet connection and try again."
                ) from e
            raise ApiServerError("The remote service appears unreachable at this time.") from e
        finally:
            if stop_evt is not None:
                stop_evt.set()
            if monitor_task:
                monitor_task.cancel()
                with contextlib.suppress(Exception):
                    await monitor_task
            if req_task and not req_task.done():
                req_task.cancel()
                with contextlib.suppress(Exception):
                    await req_task
            if session:
                with contextlib.suppress(Exception):
                    await session.close()
            if fhandle:

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Verify basic connectivity: curl https://example.com from the same machine/user.
  2. Check DNS (nslookup the API host) and proxy env vars (HTTP_PROXY/HTTPS_PROXY) — set them for the ComfyUI process if a proxy is required.
  3. Restart the router/VPN or rejoin the network, then re-run the workflow.
  4. If in Docker, ensure the container has network access and the host firewall allows egress.
Defensive patterns

Strategy: validation

Validate before calling

async def check_egress(host: str = 'https://example.com') -> bool:
    try:
        async with aiohttp.ClientSession() as s:
            async with s.get(host, timeout=aiohttp.ClientTimeout(total=5)) as r:
                return r.status < 500
    except Exception:
        return False

if not await check_egress():
    raise RuntimeError('No internet egress from this machine; fix network before running API nodes')

Try / catch

try:
    await download(url, ...)
except LocalNetworkError:
    show_user_message('Check your internet connection (DNS/proxy/VPN) and retry.')
except ApiServerError:
    show_user_message('The API provider is unreachable; check their status page.')

Prevention

When it happens

Trigger: aiohttp raises ClientConnectorError/OSError for every attempt AND a probe to a well-known endpoint also fails — machine offline, DNS broken, firewall/proxy blocking all egress, captive portal, or Airplane mode.

Common situations: Disconnected Wi-Fi, corporate proxy requiring configuration, DNS failure, VPN dropped, container without network access, or a firewall blocking the ComfyUI process specifically.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/8cca95af91200216. Report an issue: GitHub.