zed-industries/zed · error

OAuth callback server I/O error

Error message

OAuth callback server I/O error

What it means

Runtime I/O failure in the OAuth callback server's accept loop: recv_timeout (or request handling) returned an I/O error while waiting for the browser redirect. The server thread surfaces this instead of params, and the pending sign-in fails.

Source

Thrown at crates/oauth_callback_server/src/oauth_callback_server.rs:275

        let (tx, rx) = futures::channel::oneshot::channel();

        std::thread::spawn(move || {
            let deadline = std::time::Instant::now() + OAUTH_CALLBACK_TIMEOUT;

            loop {
                if tx.is_canceled() {
                    return;
                }
                let remaining = deadline.saturating_duration_since(std::time::Instant::now());
                if remaining.is_zero() {
                    return;
                }

                let timeout = remaining.min(Duration::from_millis(500));
                let Some(request) = (match server.recv_timeout(timeout) {
                    Ok(req) => req,
                    Err(_) => {
                        let _ = tx.send(Err(anyhow!("OAuth callback server I/O error")));
                        return;
                    }
                }) else {
                    continue;
                };

                let raw_url = request.url().to_string();
                let raw_path = raw_url.split('?').next().unwrap_or(&raw_url);
                if raw_path == CANCEL_PATH {
                    let response = tiny_http::Response::from_string("Cancelled")
                        .with_status_code(200)
                        .with_header(
                            tiny_http::Header::from_str("Content-Type: text/plain")
                                .expect("failed to construct response header"),
                        )
                        .with_header(
                            tiny_http::Header::from_str("Connection: close")
                                .expect("failed to construct response header"),

View on GitHub (pinned to f4178619ac)

Solutions

  1. Retry the sign-in; transient loopback I/O errors may not recur
  2. Check firewall/loopback configuration on 127.0.0.1
  3. Restart Zed if the listener is stuck
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/oauth_callback_server/src/oauth_callback_server.rs:275 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/4ed64aa66231f8ae. Report an issue: GitHub.