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

  1. Verify network access to the collab server (try `curl -I https://zed.dev` and check DNS)
  2. Disable or configure VPN/proxy so zed.dev is reachable, then restart Zed
  3. Check https://status.zed.dev for an ongoing incident
  4. 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

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

Related errors


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/9374f2a2d7ff8f70. Report an issue: GitHub.