infiniflow/ragflow · error · ConnectorMissingCredentialError
Dropbox
Error message
Dropbox
What it means
Raised by validate_connector_settings() when self.dropbox_client is None — i.e. validate was called before load_credentials successfully built the Dropbox SDK client. Immediate guard before the files_list_folder probe.
Source
Thrown at common/data_source/dropbox_connector.py:43
"""Dropbox connector for accessing Dropbox files and folders"""
def __init__(self, batch_size: int = INDEX_BATCH_SIZE) -> None:
self.batch_size = batch_size
self.dropbox_client: Dropbox | None = None
def load_credentials(self, credentials: dict[str, Any]) -> dict[str, Any] | None:
"""Load Dropbox credentials"""
access_token = credentials.get("dropbox_access_token")
if not access_token:
raise ConnectorMissingCredentialError("Dropbox access token is required")
self.dropbox_client = Dropbox(access_token)
return None
def validate_connector_settings(self) -> None:
"""Validate Dropbox connector settings"""
if self.dropbox_client is None:
raise ConnectorMissingCredentialError("Dropbox")
try:
self.dropbox_client.files_list_folder(path="", limit=1)
except AuthError as e:
logger.exception("[Dropbox]: Failed to validate Dropbox credentials")
raise ConnectorValidationError(f"Dropbox credential is invalid: {e}")
except ApiError as e:
if e.error is not None and "insufficient_permissions" in str(e.error).lower():
raise InsufficientPermissionsError("Your Dropbox token does not have sufficient permissions.")
raise ConnectorValidationError(f"Unexpected Dropbox error during validation: {e.user_message_text or e}")
except Exception as e:
raise ConnectorValidationError(f"Unexpected error during Dropbox settings validation: {e}")
def _download_file(self, path: str) -> bytes:
"""Download a single file from Dropbox."""
if self.dropbox_client is None:
raise ConnectorMissingCredentialError("Dropbox")
_, resp = self.dropbox_client.files_download(path)View on GitHub (pinned to 554fb1133a)
Solutions
- Always run load_credentials(...) successfully before validate_connector_settings()
- Treat a None dropbox_client as 'not configured' in orchestration code and skip validation
- Do not reuse a connector instance after a failed load_credentials
Defensive patterns
Strategy: validation
Validate before calling
if connector.dropbox_client is None:
connector.load_credentials({'dropbox_access_token': token}) Prevention
- Combine construction and credential loading in one factory function
- Surface 'not configured' state in UI instead of invoking validation
When it happens
Trigger: Constructing DropboxConnector and calling validate_connector_settings() without load_credentials; a prior load_credentials raised ConnectorMissingCredentialError and the caller continued.
Common situations: Health-check endpoints validating connectors that were never credentialed; UI validate-before-save flows.
Related errors
- Blob storage credentials not loaded.
- Box
- DingTalk Notable
- Dropbox access token is required
- main() must be defined or exported.
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/01f4ec677483367a.
Report an issue: GitHub.