{"record":{"id":"749787f1b4cc8fd4","repo":"infiniflow/ragflow","slug":"provided-google-oauth-credentials-are-missing-both","errorCode":null,"errorMessage":"Provided Google OAuth credentials are missing both tokens and a client configuration.","messagePattern":"Provided Google OAuth credentials are missing both tokens and a client configuration\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"common/data_source/google_util/oauth_flow.py","lineNumber":119,"sourceCode":"    print(json.dumps(token_dict, indent=2))\n    print()\n\n    return token_dict\n\n\ndef ensure_oauth_token_dict(credentials: dict[str, Any], source: DocumentSource) -> dict[str, Any]:\n    \"\"\"Return a dict that contains OAuth tokens, running the flow if only a client config is provided.\"\"\"\n    if \"refresh_token\" in credentials and \"token\" in credentials:\n        return credentials\n\n    client_config: dict[str, Any] | None = None\n    if \"installed\" in credentials:\n        client_config = {\"installed\": credentials[\"installed\"]}\n    elif \"web\" in credentials:\n        client_config = {\"web\": credentials[\"web\"]}\n\n    if client_config is None:\n        raise ValueError(\"Provided Google OAuth credentials are missing both tokens and a client configuration.\")\n\n    return _run_local_server_flow(client_config, source)\n","sourceCodeStart":101,"sourceCodeEnd":122,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/google_util/oauth_flow.py#L101-L122","documentation":"Error \"Provided Google OAuth credentials are missing both tokens and a client configuration.\" thrown in infiniflow/ragflow.","triggerScenarios":"Thrown at common/data_source/google_util/oauth_flow.py:119 when the library encounters an invalid state.","commonSituations":"The stored Google OAuth credential contains neither tokens nor client configuration; regenerating the credential prevents this error.","solutions":["Provide OAuth tokens or a client configuration in the credentials payload.","Re-run the OAuth flow to regenerate a complete credential set."],"exampleFix":"credentials = {'client_config': {...}, 'refresh_token': '...'}","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"}