zed-industries/zed · error
OAuth callback server was shut down before receiving a respo
Error message
OAuth callback server was shut down before receiving a response
What it means
Error "OAuth callback server was shut down before receiving a response" thrown in zed-industries/zed.
Source
Thrown at crates/context_server/src/oauth.rs:1103
/// redirect URI in the authorization request, open the browser, then await
/// the future to receive the callback.
///
/// The server accepts exactly one request on `/callback`, validates that it
/// contains `code` and `state` query parameters, responds with a minimal
/// HTML page telling the user they can close the tab, and shuts down.
///
/// The callback server shuts down when the returned future is dropped (e.g.
/// because the authentication task was cancelled), or after a timeout.
pub fn start_callback_server() -> Result<(String, BoxFuture<'static, Result<OAuthCallback>>)> {
let (redirect_uri, rx) = oauth_callback_server::start_oauth_callback_server()?;
let future = async move {
match rx.await {
Ok(Ok(params)) => Ok(OAuthCallback {
code: params.code,
state: params.state,
}),
Ok(Err(e)) => Err(e),
Err(_) => Err(anyhow!(
"OAuth callback server was shut down before receiving a response"
)),
}
}
.boxed();
Ok((redirect_uri, future))
}
// -- JSON fetch helper -------------------------------------------------------
async fn fetch_json<T: serde::de::DeserializeOwned>(
http_client: &Arc<dyn HttpClient>,
url: &Url,
) -> Result<T> {
validate_oauth_url(url)?;
let request = Request::builder()
.method(http_client::http::Method::GET)View on GitHub (pinned to bc538def45)
When it happens
Trigger: Thrown at crates/context_server/src/oauth.rs:1103 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/f6378d08feb85707.
Report an issue: GitHub.