infiniflow/ragflow · error · ConnectorMissingCredentialError

Google Drive credentials not loaded.

Error message

Google Drive credentials not loaded.

What it means

Error "Google Drive credentials not loaded." thrown in infiniflow/ragflow.

Source

Thrown at common/data_source/google_drive/connector.py:1116

        self,
        callback: IndexingHeartbeatInterface | None = None,
    ) -> GenerateSlimDocumentOutput:
        try:
            checkpoint = self.build_dummy_checkpoint()
            while checkpoint.completion_stage != DriveRetrievalStage.DONE:
                yield from self._extract_slim_docs_from_google_drive(
                    checkpoint=checkpoint,
                )
            self.logger.info("Drive perm sync: Slim doc retrieval complete")

        except Exception as e:
            if MISSING_SCOPES_ERROR_STR in str(e):
                raise PermissionError() from e
            raise e

    def validate_connector_settings(self) -> None:
        if self._creds is None:
            raise ConnectorMissingCredentialError("Google Drive credentials not loaded.")

        if self._primary_admin_email is None:
            raise ConnectorValidationError("Primary admin email not found in credentials. Ensure DB_CREDENTIALS_PRIMARY_ADMIN_KEY is set.")

        try:
            drive_service = get_drive_service(self._creds, self._primary_admin_email)
            drive_service.files().list(pageSize=1, fields="files(id)").execute()

            if isinstance(self._creds, ServiceAccountCredentials):
                # default is ~17mins of retries, don't do that here since this is called from
                # the UI
                get_root_folder_id(drive_service)

        except HttpError as e:
            status_code = e.resp.status if e.resp else None
            if status_code == 401:
                raise CredentialExpiredError("Invalid or expired Google Drive credentials (401).")
            elif status_code == 403:

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Upload valid Google Drive credentials to the connector.
  2. Re-run the OAuth flow or re-upload the service account JSON.

Example fix

# connector settings: upload the service account JSON again

When it happens

Trigger: Thrown at common/data_source/google_drive/connector.py:1116 when the library encounters an invalid state.

Common situations: Stored Google Drive credentials are missing or failed to load; reconfiguring the credential prevents this error.


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