{"record":{"id":"8cca95af91200216","repo":"Comfy-Org/ComfyUI","slug":"unable-to-connect-to-the-network-please-check-you","errorCode":null,"errorMessage":"Unable to connect to the network. Please check your internet connection and try again.","messagePattern":"Unable to connect to the network\\. Please check your internet connection and try again\\.","errorType":"exception","errorClass":"LocalNetworkError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/util/download_helpers.py","lineNumber":195,"sourceCode":"                )\n                return\n        except asyncio.CancelledError:\n            raise ProcessingInterrupted(\"Task cancelled\") from None\n        except (ClientError, OSError) as e:\n            if attempt <= max_retries:\n                request_logger.log_request_response(\n                    operation_id=op_id,\n                    request_method=\"GET\",\n                    request_url=url,\n                    error_message=f\"{type(e).__name__}: {str(e)} (will retry)\",\n                )\n                await sleep_with_interrupt(delay, cls, None, None, None)\n                delay *= retry_backoff\n                continue\n\n            diag = await _diagnose_connectivity()\n            if not diag[\"internet_accessible\"]:\n                raise LocalNetworkError(\n                    \"Unable to connect to the network. Please check your internet connection and try again.\"\n                ) from e\n            raise ApiServerError(\"The remote service appears unreachable at this time.\") from e\n        finally:\n            if stop_evt is not None:\n                stop_evt.set()\n            if monitor_task:\n                monitor_task.cancel()\n                with contextlib.suppress(Exception):\n                    await monitor_task\n            if req_task and not req_task.done():\n                req_task.cancel()\n                with contextlib.suppress(Exception):\n                    await req_task\n            if session:\n                with contextlib.suppress(Exception):\n                    await session.close()\n            if fhandle:","sourceCodeStart":177,"sourceCodeEnd":213,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/util/download_helpers.py#L177-L213","documentation":"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).","triggerScenarios":"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.","commonSituations":"Disconnected Wi-Fi, corporate proxy requiring configuration, DNS failure, VPN dropped, container without network access, or a firewall blocking the ComfyUI process specifically.","solutions":["Verify basic connectivity: curl https://example.com from the same machine/user.","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.","Restart the router/VPN or rejoin the network, then re-run the workflow.","If in Docker, ensure the container has network access and the host firewall allows egress."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"async def check_egress(host: str = 'https://example.com') -> bool:\n    try:\n        async with aiohttp.ClientSession() as s:\n            async with s.get(host, timeout=aiohttp.ClientTimeout(total=5)) as r:\n                return r.status < 500\n    except Exception:\n        return False\n\nif not await check_egress():\n    raise RuntimeError('No internet egress from this machine; fix network before running API nodes')","typeGuard":null,"tryCatchPattern":"try:\n    await download(url, ...)\nexcept LocalNetworkError:\n    show_user_message('Check your internet connection (DNS/proxy/VPN) and retry.')\nexcept ApiServerError:\n    show_user_message('The API provider is unreachable; check their status page.')","preventionTips":["Verify egress and DNS from the ComfyUI host before running API-node workflows.","Configure HTTP_PROXY/HTTPS_PROXY for the process when behind a corporate proxy.","Distinguish LocalNetworkError from ApiServerError in UI handling — they need different user actions."],"tags":["network","connectivity","local-network-error","download"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}