zed-industries/zed · error
didn't receive login redirect
Error message
didn't receive login redirect
What it means
During native sign-in, Zed serves the OAuth redirect from a local HTTP server and waits for the callback request containing user_id and encrypted access_token. This error means the server loop ended without ever receiving that redirect — the browser never delivered the callback.
Source
Thrown at crates/client/src/client.rs:1541
http.build_url("/native_app_signin_succeeded");
req.respond(
tiny_http::Response::empty(302).with_header(
tiny_http::Header::from_bytes(
&b"Location"[..],
post_auth_url.as_bytes(),
)
.unwrap(),
),
)
.context("failed to respond to login http request")?;
return Ok((
callback_params.user_id,
callback_params.access_token,
));
}
}
anyhow::bail!("didn't receive login redirect");
})
.await?;
let access_token = private_key
.decrypt_string(&access_token)
.context("failed to decrypt access token")?;
Ok(Credentials {
user_id: user_id.parse()?,
access_token,
})
})
.await?;
cx.update(|cx| cx.activate(true));
Ok(credentials)
})
}View on GitHub (pinned to bc538def45)
Solutions
- Retry sign-in and complete the whole flow in the opened browser without closing the tab
- Allow redirects to 127.0.0.1 in the browser (disable blocking extensions for the auth flow)
- Set a stable default browser before starting sign-in
Defensive patterns
Strategy: retry
Try / catch
match receive_callback(&server, timeout).await {
Ok(params) => Ok(params),
Err(err) if err.to_string() == "didn't receive login redirect" => {
// user-driven failure: prompt to retry instead of surfacing a raw error
ui::show_message("Sign-in was not completed in the browser. Try again?");
Err(err)
}
Err(err) => Err(err),
} Prevention
- Complete the browser flow in the tab that opened; do not close it early
- Whitelist 127.0.0.1 redirects in restrictive browser extensions
- Offer an explicit retry affordance whenever this error appears
When it happens
Trigger: The user closes the sign-in tab before completing login, the system browser fails to navigate back to 127.0.0.1:<port>, or something (popup blocker, redirect to a different port, aggressive tab management) prevents the redirect request.
Common situations: Browser extensions blocking cross-site redirects to localhost; user switching browsers between starting sign-in and completing it; slow auth provider page timing out the wait.
Related errors
- authentication canceled
- failed to bind callback port
- Failed to parse UNIT_DATA as JSON: ${e.message}
- HTTP error! status: ${response.status}
- refusing to follow redirect to non-HTTP(S) URL {target}
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/0fce484cdf9fceca.
Report an issue: GitHub.