warpdotdev/warp · error · anyhow::Error

Error polling OAuth status: {err}

Error message

Error polling OAuth status: {err}

What it means

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.

Source

Thrown at app/src/ai/agent_sdk/environment.rs:675

                                                Some(Err(anyhow::anyhow!(
                                                    "GitHub authorization expired. Please try again."
                                                ))),
                                            );
                                        }
                                        Ok(OauthConnectTxStatus::Pending)
                                        | Ok(OauthConnectTxStatus::InProgress) => {
                                            // Should not be returned by poll_oauth_until_terminal.
                                            ctx.terminate_app(
                                                warpui::platform::TerminationMode::ForceTerminate,
                                                Some(Err(anyhow::anyhow!(
                                                    "Unexpected non-terminal OAuth status returned"
                                                ))),
                                            );
                                        }
                                        Err(err) => {
                                            ctx.terminate_app(
                                                warpui::platform::TerminationMode::ForceTerminate,
                                                Some(Err(anyhow::anyhow!(
                                                    "Error polling OAuth status: {err}"
                                                ))),
                                            );
                                        }
                                    }
                                },
                            );
                        }
                        (Some(auth_url), None) => {
                            // Legacy flow: no txId, print URL and exit.
                            println!("\nAuthorize access here: {auth_url}\n");
                            println!("After authorizing, please re-run this command.");
                            ctx.terminate_app(
                                warpui::platform::TerminationMode::ForceTerminate,
                                None,
                            );
                        }
                        (None, Some(_)) => {

View on GitHub (pinned to e72fd7aacb)

Solutions

  1. 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
  2. Avoid suspending the machine or dropping network between opening the auth URL and completion
  3. Pre-grant the GitHub App access so the poll phase is skipped entirely
  4. If it recurs, inspect logs for the underlying transport error and server health
Defensive patterns

Strategy: retry

Validate before calling

// Keep the link stable during authorization: verify connectivity right before
// create with private repos, and avoid machine sleep between URL open and consent.

Try / catch

Err(err) => {
    // poll transport error: authorization may have succeeded anyway — re-run the
    // command; the fresh auth check will confirm without restarting OAuth
}

Prevention

When it happens

Trigger: 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.

Common situations: Wi-Fi flaps during authorization; laptop sleep/resume mid-poll; server deploys while the transaction is open; long authorization conversations on unstable links.

Related errors


AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16). Data as JSON: /api/errors/bafdf7a898c7a0aa. Report an issue: GitHub.