{"record":{"id":"bafdf7a898c7a0aa","repo":"warpdotdev/warp","slug":"error-polling-oauth-status-err-bafdf7","errorCode":null,"errorMessage":"Error polling OAuth status: {err}","messagePattern":"Error polling OAuth status: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/environment.rs","lineNumber":675,"sourceCode":"                                                Some(Err(anyhow::anyhow!(\n                                                    \"GitHub authorization expired. Please try again.\"\n                                                ))),\n                                            );\n                                        }\n                                        Ok(OauthConnectTxStatus::Pending)\n                                        | Ok(OauthConnectTxStatus::InProgress) => {\n                                            // Should not be returned by poll_oauth_until_terminal.\n                                            ctx.terminate_app(\n                                                warpui::platform::TerminationMode::ForceTerminate,\n                                                Some(Err(anyhow::anyhow!(\n                                                    \"Unexpected non-terminal OAuth status returned\"\n                                                ))),\n                                            );\n                                        }\n                                        Err(err) => {\n                                            ctx.terminate_app(\n                                                warpui::platform::TerminationMode::ForceTerminate,\n                                                Some(Err(anyhow::anyhow!(\n                                                    \"Error polling OAuth status: {err}\"\n                                                ))),\n                                            );\n                                        }\n                                    }\n                                },\n                            );\n                        }\n                        (Some(auth_url), None) => {\n                            // Legacy flow: no txId, print URL and exit.\n                            println!(\"\\nAuthorize access here: {auth_url}\\n\");\n                            println!(\"After authorizing, please re-run this command.\");\n                            ctx.terminate_app(\n                                warpui::platform::TerminationMode::ForceTerminate,\n                                None,\n                            );\n                        }\n                        (None, Some(_)) => {","sourceCodeStart":657,"sourceCodeEnd":693,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/environment.rs#L657-L693","documentation":"Terminal error from the OAuth polling branch: the poll future itself returned Err (network/protocol failure while repeatedly querying the OAuth transaction status via the integrations client). The underlying error is formatted into the message ('Error polling OAuth status: {err}'). The user may have already completed authorization — but the client could not confirm it.","triggerScenarios":"Network drop, timeout, or server 5xx occurring between polls of the OAuth connect transaction while the browser flow is in progress; auth token expiring mid-poll; server restart during the transaction.","commonSituations":"Wi-Fi flaps during authorization; laptop sleep/resume mid-poll; server deploys while the transaction is open; long authorization conversations on unstable links.","solutions":["Check connectivity and simply re-run the command — if authorization actually completed, the next run's auth check passes and no new OAuth is needed","Avoid suspending the machine or dropping network between opening the auth URL and completion","Pre-grant the GitHub App access so the poll phase is skipped entirely","If it recurs, inspect logs for the underlying transport error and server health"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Keep the link stable during authorization: verify connectivity right before\n// create with private repos, and avoid machine sleep between URL open and consent.","typeGuard":null,"tryCatchPattern":"Err(err) => {\n    // poll transport error: authorization may have succeeded anyway — re-run the\n    // command; the fresh auth check will confirm without restarting OAuth\n}","preventionTips":["Re-run the command after any polling network error — completed auth persists","Prevent sleep/resume and Wi-Fi drops during the OAuth window","Pre-grant App access to shorten or eliminate the polling phase","Capture the underlying {err} text; it distinguishes timeout vs auth vs server faults"],"tags":["rust","oauth","network","polling","timeout"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}