{"record":{"id":"0fce484cdf9fceca","repo":"zed-industries/zed","slug":"didn-t-receive-login-redirect","errorCode":null,"errorMessage":"didn't receive login redirect","messagePattern":"didn't receive login redirect","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/client/src/client.rs","lineNumber":1541,"sourceCode":"                                        http.build_url(\"/native_app_signin_succeeded\");\n                                    req.respond(\n                                        tiny_http::Response::empty(302).with_header(\n                                            tiny_http::Header::from_bytes(\n                                                &b\"Location\"[..],\n                                                post_auth_url.as_bytes(),\n                                            )\n                                            .unwrap(),\n                                        ),\n                                    )\n                                    .context(\"failed to respond to login http request\")?;\n                                    return Ok((\n                                        callback_params.user_id,\n                                        callback_params.access_token,\n                                    ));\n                                }\n                            }\n\n                            anyhow::bail!(\"didn't receive login redirect\");\n                        })\n                        .await?;\n\n                    let access_token = private_key\n                        .decrypt_string(&access_token)\n                        .context(\"failed to decrypt access token\")?;\n\n                    Ok(Credentials {\n                        user_id: user_id.parse()?,\n                        access_token,\n                    })\n                })\n                .await?;\n\n            cx.update(|cx| cx.activate(true));\n            Ok(credentials)\n        })\n    }","sourceCodeStart":1523,"sourceCodeEnd":1559,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/client/src/client.rs#L1523-L1559","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match receive_callback(&server, timeout).await {\n    Ok(params) => Ok(params),\n    Err(err) if err.to_string() == \"didn't receive login redirect\" => {\n        // user-driven failure: prompt to retry instead of surfacing a raw error\n        ui::show_message(\"Sign-in was not completed in the browser. Try again?\");\n        Err(err)\n    }\n    Err(err) => Err(err),\n}","preventionTips":["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"],"tags":["authentication","oauth","redirect","sign-in"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}