{"record":{"id":"c236029d6e036efb","repo":"infiniflow/ragflow","slug":"no-spaces-found-at-url-check-your-credentials-a","errorCode":null,"errorMessage":"No spaces found at {url}! Check your credentials and wiki_base and make sure is_cloud is set correctly.","messagePattern":"No spaces found at (.+?)! Check your credentials and wiki_base and make sure is_cloud is set correctly\\.","errorType":"validation","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"common/data_source/confluence_connector.py","lineNumber":293,"sourceCode":"                        **merged_kwargs,\n                    )\n\n            # This call sometimes hangs indefinitely, so we run it in a timeout\n            spaces = run_with_timeout(\n                timeout=10,\n                func=confluence_client_with_minimal_retries.get_all_spaces,\n                limit=1,\n            )\n\n            # uncomment the following for testing\n            # the following is an attempt to retrieve the user's timezone\n            # Unfornately, all data is returned in UTC regardless of the user's time zone\n            # even tho CQL parses incoming times based on the user's time zone\n            # space_key = spaces[\"results\"][0][\"key\"]\n            # space_details = confluence_client_with_minimal_retries.cql(f\"space.key={space_key}+AND+type=space\")\n\n            if not spaces:\n                raise RuntimeError(f\"No spaces found at {url}! Check your credentials and wiki_base and make sure is_cloud is set correctly.\")\n\n            logging.info(\"Confluence probe succeeded.\")\n\n    def _initialize_connection(\n        self,\n        **kwargs: Any,\n    ) -> None:\n        \"\"\"Called externally to init the connection in a thread safe manner.\"\"\"\n        merged_kwargs = {**self.shared_base_kwargs, **kwargs}\n        with self._credentials_provider:\n            credentials, _ = self._renew_credentials()\n            self._confluence = self._initialize_connection_helper(credentials, **merged_kwargs)\n            self._kwargs = merged_kwargs\n\n    def _initialize_connection_helper(\n        self,\n        credentials: dict[str, Any],\n        **kwargs: Any,","sourceCodeStart":275,"sourceCodeEnd":311,"githubUrl":"https://github.com/infiniflow/ragflow/blob/554fb1133ac3861732235ad9c377eb5e0a770665/common/data_source/confluence_connector.py#L275-L311","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nconfluence = ConfluenceConnector(\n    wiki_base='https://confluence.internal.example.com',\n    is_cloud=True,  # wrong: self-hosted\n    ...\n)\n// after\nconfluence = ConfluenceConnector(\n    wiki_base='https://confluence.internal.example.com/confluence',\n    is_cloud=False,\n    ...\n)","handlingStrategy":"validation","validationCode":"parsed = urllib.parse.urlparse(wiki_base)\nis_cloud_guess = parsed.hostname.endswith('.atlassian.net')\nif is_cloud_guess != config['is_cloud']:\n    raise ValueError(f\"is_cloud={config['is_cloud']} conflicts with URL host {parsed.hostname}\")\nif wiki_base.endswith('/'):\n    raise ValueError('wiki_base must not have a trailing slash')","typeGuard":"def confluence_config_is_consistent(wiki_base: str, is_cloud: bool) -> bool:\n    host = urllib.parse.urlparse(wiki_base).hostname or ''\n    return is_cloud == host.endswith('.atlassian.net')","tryCatchPattern":"try:\n    connector._initialize_connection()\nexcept RuntimeError as e:\n    if 'No spaces found' in str(e):\n        raise ConfigError('check is_cloud flag and wiki_base; ensure the user can see at least one space') from e\n    raise","preventionTips":["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"],"tags":["confluence","configuration","authentication"],"backgroundTag":null,"analyzedSha":"554fb1133ac3861732235ad9c377eb5e0a770665","analyzedAt":"2026-08-15T09:20:16.380Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}