{"record":{"id":"336d3c60454d6304","repo":"infiniflow/ragflow","slug":"google-drive-credentials-not-loaded","errorCode":null,"errorMessage":"Google Drive credentials not loaded.","messagePattern":"Google Drive credentials not loaded\\.","errorType":"validation","errorClass":"ConnectorMissingCredentialError","httpStatus":null,"severity":"error","filePath":"common/data_source/google_drive/connector.py","lineNumber":1116,"sourceCode":"        self,\n        callback: IndexingHeartbeatInterface | None = None,\n    ) -> GenerateSlimDocumentOutput:\n        try:\n            checkpoint = self.build_dummy_checkpoint()\n            while checkpoint.completion_stage != DriveRetrievalStage.DONE:\n                yield from self._extract_slim_docs_from_google_drive(\n                    checkpoint=checkpoint,\n                )\n            self.logger.info(\"Drive perm sync: Slim doc retrieval complete\")\n\n        except Exception as e:\n            if MISSING_SCOPES_ERROR_STR in str(e):\n                raise PermissionError() from e\n            raise e\n\n    def validate_connector_settings(self) -> None:\n        if self._creds is None:\n            raise ConnectorMissingCredentialError(\"Google Drive credentials not loaded.\")\n\n        if self._primary_admin_email is None:\n            raise ConnectorValidationError(\"Primary admin email not found in credentials. Ensure DB_CREDENTIALS_PRIMARY_ADMIN_KEY is set.\")\n\n        try:\n            drive_service = get_drive_service(self._creds, self._primary_admin_email)\n            drive_service.files().list(pageSize=1, fields=\"files(id)\").execute()\n\n            if isinstance(self._creds, ServiceAccountCredentials):\n                # default is ~17mins of retries, don't do that here since this is called from\n                # the UI\n                get_root_folder_id(drive_service)\n\n        except HttpError as e:\n            status_code = e.resp.status if e.resp else None\n            if status_code == 401:\n                raise CredentialExpiredError(\"Invalid or expired Google Drive credentials (401).\")\n            elif status_code == 403:","sourceCodeStart":1098,"sourceCodeEnd":1134,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/google_drive/connector.py#L1098-L1134","documentation":"Error \"Google Drive credentials not loaded.\" thrown in infiniflow/ragflow.","triggerScenarios":"Thrown at common/data_source/google_drive/connector.py:1116 when the library encounters an invalid state.","commonSituations":"Stored Google Drive credentials are missing or failed to load; reconfiguring the credential prevents this error.","solutions":["Upload valid Google Drive credentials to the connector.","Re-run the OAuth flow or re-upload the service account JSON."],"exampleFix":"# connector settings: upload the service account JSON again","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"}