HKUDS/nanobot · error · RuntimeError
Slack Socket Mode WebSocket connect timed out
Error message
Slack Socket Mode WebSocket connect timed out
What it means
Error "Slack Socket Mode WebSocket connect timed out" thrown in HKUDS/nanobot.
Source
Thrown at nanobot/channels/slack/runtime.py:179
except Exception as e:
self.logger.warning("auth_test failed: {}", e)
self.logger.info("Starting Socket Mode client...")
try:
await asyncio.wait_for(
self._socket_client.connect(),
timeout=SLACK_SOCKET_CONNECT_TIMEOUT_S,
)
except asyncio.TimeoutError:
self.logger.error(
"Slack Socket Mode WebSocket handshake timed out after {:.0f}s. "
"auth_test uses HTTPS and may still succeed while WSS is blocked. "
"Check outbound access to Slack WebSockets; slack-sdk Socket Mode "
"does not apply HTTP(S)_PROXY to websockets.connect.",
SLACK_SOCKET_CONNECT_TIMEOUT_S,
)
await self.stop()
raise RuntimeError("Slack Socket Mode WebSocket connect timed out") from None
self.logger.info("Slack Socket Mode WebSocket connected (events enabled)")
while self._running:
await asyncio.sleep(1)
async def stop(self) -> None:
"""Stop the Slack client."""
self._running = False
if self._socket_client:
try:
await self._socket_client.close()
except Exception as e:
self.logger.warning("socket close failed: {}", e)
self._socket_client = None
async def send(self, msg: OutboundMessage) -> None:
"""Send a message through Slack."""View on GitHub (pinned to 42f37dc4c0)
When it happens
Trigger: Thrown at nanobot/channels/slack/runtime.py:179 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26).
Data as JSON: /api/errors/7a217860b348ebae.
Report an issue: GitHub.