zed-industries/zed · error
connection timed out
Error message
connection timed out
What it means
After a successful staff sign-in, Zed staff users additionally call connect_with_credentials to reach the collab server. This error means that connection attempt timed out — the server was unreachable within the connection timeout window. The task is detached and logged, so it typically surfaces in logs rather than the UI.
Source
Thrown at crates/client/src/client.rs:1074
if let Some(is_staff_tx) = is_staff_tx.take() {
is_staff_tx.send(state.is_staff).log_err();
}
})
.detach();
});
let credentials = self.sign_in(try_provider, cx).await?;
self.connect_to_cloud(cx);
cx.update(move |cx| {
cx.spawn({
let client = self.clone();
async move |cx| {
let is_staff = is_staff_rx.await?;
if is_staff {
match client.connect_with_credentials(credentials, cx).await {
ConnectionResult::Timeout => Err(anyhow!("connection timed out")),
ConnectionResult::ConnectionReset => Err(anyhow!("connection reset")),
ConnectionResult::Result(result) => {
result.context("client auth and connect")
}
}
} else {
Ok(())
}
}
})
.detach_and_log_err(cx);
});
Ok(())
}
pub async fn connect(
self: &Arc<Self>,View on GitHub (pinned to bc538def45)
Solutions
- Verify network access to the collab server (try `curl -I https://zed.dev` and check DNS)
- Disable or configure VPN/proxy so zed.dev is reachable, then restart Zed
- Check https://status.zed.dev for an ongoing incident
- Retry after confirming connectivity; the task re-runs on next sign-in
Defensive patterns
Strategy: retry
Validate before calling
// preflight connectivity before the staff connect path
cx.background_spawn(async move {
if tcp::connect("zed.dev:443", chrono::Duration::seconds(5)).await.is_err() {
log::warn!("collab server unreachable; skipping staff connect");
}
}) Try / catch
match client.connect_with_credentials(credentials, cx).await {
ConnectionResult::Timeout | ConnectionResult::ConnectionReset => {
// backoff and retry: network-level failure, not an auth failure
cx.background_executor().timer(Duration::from_secs(5)).await;
}
ConnectionResult::Result(result) => result?,
} Prevention
- Verify outbound access to zed.dev:443 from restricted networks
- Treat Timeout/ConnectionReset distinctly from auth errors when logging
- Detach-and-log these tasks so UI does not block on staff connect
When it happens
Trigger: is_staff is true and ConnectionResult::Timeout is returned from connect_with_credentials: the collab endpoint (zed.dev RPC over TCP/TLS) is unreachable due to firewall, DNS, proxy, or outage.
Common situations: Corporate networks blocking the collab port; VPN split-tunnel misrouting; zed.dev infrastructure incidents; local packet filters dropping long handshakes.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Failed to connect to Sentry API: {error.reason}
- Failed to connect to Sentry API: {err.reason}
- {err:?}
- failed to connect to Cloud WebSocket: {error}
- Failed to parse UNIT_DATA as JSON: ${e.message}
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/9374f2a2d7ff8f70.
Report an issue: GitHub.