infiniflow/ragflow · error · TimeoutError

Google OAuth verification timed out after {timeout_secs} sec

Error message

Google OAuth verification timed out after {timeout_secs} seconds. Close any pending consent windows and rerun the connector configuration to try again.

What it means

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.

Source

Thrown at common/data_source/google_util/oauth_flow.py:46

def _run_with_timeout(func: Callable[[], Any], timeout_secs: int, timeout_message: str) -> Any:
    if timeout_secs <= 0:
        return func()

    result: dict[str, Any] = {}
    error: dict[str, BaseException] = {}

    def _target() -> None:
        try:
            result["value"] = func()
        except BaseException as exc:  # pragma: no cover
            error["error"] = exc

    thread = threading.Thread(target=_target, daemon=True)
    thread.start()
    thread.join(timeout_secs)
    if thread.is_alive():
        raise TimeoutError(timeout_message)
    if "error" in error:
        raise error["error"]
    return result.get("value")


def _run_local_server_flow(client_config: dict[str, Any], source: DocumentSource) -> dict[str, Any]:
    """Launch the standard Google OAuth local-server flow to mint user tokens."""
    from google_auth_oauthlib.flow import InstalledAppFlow  # type: ignore

    scopes = _get_requested_scopes(source)
    flow = InstalledAppFlow.from_client_config(
        client_config,
        scopes=scopes,
    )

    open_browser = os.environ.get("GOOGLE_OAUTH_OPEN_BROWSER", "true").lower() != "false"
    preferred_port = os.environ.get("GOOGLE_OAUTH_LOCAL_SERVER_PORT")
    port = int(preferred_port) if preferred_port else 0

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Close pending consent windows and rerun the connector OAuth flow.
  2. Increase the timeout if the network to Google is slow.

Example fix

# rerun the connector configuration and complete consent promptly

When it happens

Trigger: Thrown at common/data_source/google_util/oauth_flow.py:46 when the library encounters an invalid state.

Common situations: The OAuth verification poll exceeds its timeout waiting for user consent; completing the flow faster or rerunning prevents this error.

Understand the failure class


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/3e8b43bf2cb30d3f. Report an issue: GitHub.