infiniflow/ragflow · error · RuntimeError
No spaces found at {url}! Check your credentials and wiki_ba
Error message
No spaces found at {url}! Check your credentials and wiki_base and make sure is_cloud is set correctly. What it means
A RuntimeError raised during Confluence connection probing in _initialize_connection_helper: after a retries-limited call to get_all_spaces(limit=1) succeeds but returns an empty/None result, the connector concludes the credentials/wiki_base/is_cloud combination is wrong and raises this message. It is not an API error — the API answered, but reported zero spaces visible to the authenticated user.
Source
Thrown at common/data_source/confluence_connector.py:293
**merged_kwargs,
)
# This call sometimes hangs indefinitely, so we run it in a timeout
spaces = run_with_timeout(
timeout=10,
func=confluence_client_with_minimal_retries.get_all_spaces,
limit=1,
)
# uncomment the following for testing
# the following is an attempt to retrieve the user's timezone
# Unfornately, all data is returned in UTC regardless of the user's time zone
# even tho CQL parses incoming times based on the user's time zone
# space_key = spaces["results"][0]["key"]
# space_details = confluence_client_with_minimal_retries.cql(f"space.key={space_key}+AND+type=space")
if not spaces:
raise RuntimeError(f"No spaces found at {url}! Check your credentials and wiki_base and make sure is_cloud is set correctly.")
logging.info("Confluence probe succeeded.")
def _initialize_connection(
self,
**kwargs: Any,
) -> None:
"""Called externally to init the connection in a thread safe manner."""
merged_kwargs = {**self.shared_base_kwargs, **kwargs}
with self._credentials_provider:
credentials, _ = self._renew_credentials()
self._confluence = self._initialize_connection_helper(credentials, **merged_kwargs)
self._kwargs = merged_kwargs
def _initialize_connection_helper(
self,
credentials: dict[str, Any],
**kwargs: Any,View on GitHub (pinned to 554fb1133a)
Solutions
- Set is_cloud to match the deployment: True for <site>.atlassian.net, False for self-hosted Server/DC
- Add the context path to wiki_base for Server installs served under /confluence (e.g. https://host/confluence)
- Verify the user/token can see at least one space: log into Confluence as that user and check the space directory
- Confirm wiki_base has no trailing slash and points at the exact site that hosts the target spaces
Example fix
// before
confluence = ConfluenceConnector(
wiki_base='https://confluence.internal.example.com',
is_cloud=True, # wrong: self-hosted
...
)
// after
confluence = ConfluenceConnector(
wiki_base='https://confluence.internal.example.com/confluence',
is_cloud=False,
...
) Defensive patterns
Strategy: validation
Validate before calling
parsed = urllib.parse.urlparse(wiki_base)
is_cloud_guess = parsed.hostname.endswith('.atlassian.net')
if is_cloud_guess != config['is_cloud']:
raise ValueError(f"is_cloud={config['is_cloud']} conflicts with URL host {parsed.hostname}")
if wiki_base.endswith('/'):
raise ValueError('wiki_base must not have a trailing slash') Type guard
def confluence_config_is_consistent(wiki_base: str, is_cloud: bool) -> bool:
host = urllib.parse.urlparse(wiki_base).hostname or ''
return is_cloud == host.endswith('.atlassian.net') Try / catch
try:
connector._initialize_connection()
except RuntimeError as e:
if 'No spaces found' in str(e):
raise ConfigError('check is_cloud flag and wiki_base; ensure the user can see at least one space') from e
raise Prevention
- Derive is_cloud automatically from the hostname instead of asking users, and show a preview of the resolved spaces endpoint
- For Server installs under a subpath, require the context path in wiki_base and validate it with a HEAD request
When it happens
Trigger: is_cloud=True against a self-hosted Confluence Server/Data Center (URL pattern mismatch so the spaces endpoint resolves to something that yields no results), or vice versa; wiki_base pointing at the wrong Confluence site (e.g. a personal space-only site); a user/service account whose permissions exclude every space; a typo'd domain that still serves a Confluence-like response.
Common situations: Configuring the Confluence connector with the wrong is_cloud flag (most common); trailing path in wiki_base (e.g. '/confluence' needed for Server installs under a subpath); API token for a different user than intended; site migrated to/from cloud so the old URL shape no longer applies.
Related errors
- Failed to update memory
- Failed to connect to SSH host {self.username}@{self.host}:{s
- Failed to load SSH private key. {errors}
- Provide either an API token or both email/password for Jira
- Moodle API token is required
AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15).
Data as JSON: /api/errors/c236029d6e036efb.
Report an issue: GitHub.