{"record":{"id":"1b9a9f6a4afab96f","repo":"openai/codex","slug":"oauth-login-task-was-cancelled-err","errorCode":null,"errorMessage":"OAuth login task was cancelled: {err}","messagePattern":"OAuth login task was cancelled: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/rmcp-client/src/perform_oauth_login.rs","lineNumber":394,"sourceCode":"    fn new(authorization_url: String, completion: oneshot::Receiver<Result<()>>) -> Self {\n        Self {\n            authorization_url,\n            completion,\n        }\n    }\n\n    pub fn authorization_url(&self) -> &str {\n        &self.authorization_url\n    }\n\n    pub fn into_parts(self) -> (String, oneshot::Receiver<Result<()>>) {\n        (self.authorization_url, self.completion)\n    }\n\n    pub async fn wait(self) -> Result<()> {\n        self.completion\n            .await\n            .map_err(|err| anyhow!(\"OAuth login task was cancelled: {err}\"))?\n    }\n}\n\nstruct OauthLoginFlow {\n    auth_url: String,\n    oauth_state: OAuthState,\n    authorization_server_issuer: Option<String>,\n    rx: oneshot::Receiver<CallbackResult>,\n    guard: CallbackServerGuard,\n    server_name: String,\n    server_url: String,\n    store_mode: OAuthCredentialsStoreMode,\n    keyring_backend_kind: AuthKeyringBackendKind,\n    launch_browser: bool,\n    timeout: Duration,\n}\n\nfn resolve_callback_port(callback_port: Option<u16>) -> Result<Option<u16>> {","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/rmcp-client/src/perform_oauth_login.rs#L376-L412","documentation":"Error \"OAuth login task was cancelled: {err}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/rmcp-client/src/perform_oauth_login.rs:394 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}