{"record":{"id":"3e8b43bf2cb30d3f","repo":"infiniflow/ragflow","slug":"google-oauth-verification-timed-out-after-timeout","errorCode":null,"errorMessage":"Google OAuth verification timed out after {timeout_secs} seconds. Close any pending consent windows and rerun the connector configuration to try again.","messagePattern":"Google OAuth verification timed out after (.+?) seconds\\. Close any pending consent windows and rerun the connector configuration to try again\\.","errorType":"exception","errorClass":"TimeoutError","httpStatus":null,"severity":"error","filePath":"common/data_source/google_util/oauth_flow.py","lineNumber":46,"sourceCode":"\ndef _run_with_timeout(func: Callable[[], Any], timeout_secs: int, timeout_message: str) -> Any:\n    if timeout_secs <= 0:\n        return func()\n\n    result: dict[str, Any] = {}\n    error: dict[str, BaseException] = {}\n\n    def _target() -> None:\n        try:\n            result[\"value\"] = func()\n        except BaseException as exc:  # pragma: no cover\n            error[\"error\"] = exc\n\n    thread = threading.Thread(target=_target, daemon=True)\n    thread.start()\n    thread.join(timeout_secs)\n    if thread.is_alive():\n        raise TimeoutError(timeout_message)\n    if \"error\" in error:\n        raise error[\"error\"]\n    return result.get(\"value\")\n\n\ndef _run_local_server_flow(client_config: dict[str, Any], source: DocumentSource) -> dict[str, Any]:\n    \"\"\"Launch the standard Google OAuth local-server flow to mint user tokens.\"\"\"\n    from google_auth_oauthlib.flow import InstalledAppFlow  # type: ignore\n\n    scopes = _get_requested_scopes(source)\n    flow = InstalledAppFlow.from_client_config(\n        client_config,\n        scopes=scopes,\n    )\n\n    open_browser = os.environ.get(\"GOOGLE_OAUTH_OPEN_BROWSER\", \"true\").lower() != \"false\"\n    preferred_port = os.environ.get(\"GOOGLE_OAUTH_LOCAL_SERVER_PORT\")\n    port = int(preferred_port) if preferred_port else 0","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/google_util/oauth_flow.py#L28-L64","documentation":"Error \"Google OAuth verification timed out after {timeout_secs} seconds. Close any pending consent windows and rerun the connector configuration to try again.\" thrown in infiniflow/ragflow.","triggerScenarios":"Thrown at common/data_source/google_util/oauth_flow.py:46 when the library encounters an invalid state.","commonSituations":"The OAuth verification poll exceeds its timeout waiting for user consent; completing the flow faster or rerunning prevents this error.","solutions":["Close pending consent windows and rerun the connector OAuth flow.","Increase the timeout if the network to Google is slow."],"exampleFix":"# rerun the connector configuration and complete consent promptly","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}