{"record":{"id":"eaebacc5477cdde7","repo":"ScrapeGraphAI/Scrapegraph-ai","slug":"undetected-chromedriver-is-required-for-chromiumlo","errorCode":null,"errorMessage":"undetected_chromedriver is required for ChromiumLoader. Please install it with `pip install undetected-chromedriver`.","messagePattern":"undetected_chromedriver is required for ChromiumLoader\\. Please install it with `pip install undetected-chromedriver`\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"scrapegraphai/docloaders/chromium.py","lineNumber":125,"sourceCode":"            except Exception as e:\n                raise ValueError(f\"Failed to scrape with undetected chromedriver: {e}\")\n        else:\n            raise ValueError(f\"Unsupported backend: {self.backend}\")\n\n    async def ascrape_undetected_chromedriver(self, url: str) -> str:\n        \"\"\"\n        Asynchronously scrape the content of a given URL using undetected chrome with Selenium.\n\n        Args:\n            url (str): The URL to scrape.\n\n        Returns:\n            str: The scraped HTML content or an error message if an exception occurs.\n        \"\"\"\n        try:\n            import undetected_chromedriver as uc\n        except ImportError:\n            raise ImportError(\n                \"undetected_chromedriver is required for ChromiumLoader. Please install it with `pip install undetected-chromedriver`.\"\n            )\n\n        logger.info(f\"Starting scraping with {self.backend}...\")\n        results = \"\"\n        attempt = 0\n\n        while attempt < self.retry_limit:\n            try:\n                async with async_timeout.timeout(self.timeout):\n                    # Handling browser selection\n                    if self.backend == \"selenium\":\n                        if self.browser_name == \"chromium\":\n                            from selenium.webdriver.chrome.options import (\n                                Options as ChromeOptions,\n                            )\n\n                            options = ChromeOptions()","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/532dfffbf6ee823a6c9cf8cfedc24a93bf026780/scrapegraphai/docloaders/chromium.py#L107-L143","documentation":"SearchInternetNode.execute raises ValueError('Zero results found for the search query.') when the configured search engine wrapper returns an empty list. The node treats zero results as fatal rather than passing an empty list downstream, because answer generation would have nothing to work with.","triggerScenarios":"Calling a SearchGraph whose query is too narrow, in a language the engine handles poorly, with a misspelled term, or when the search backend (Google/GoogleSerp/DuckDuckGo/Seper) returns no rows; also when an invalid/absent API key silently yields empty results on some engines.","commonSituations":"Missing or expired Serper API key; overly specific queries (quoted long strings, rare IDs); rate limits or regional blocks on DuckDuckGo/Google scraping; switching search_engine in config without providing the matching credentials.","solutions":["Verify search engine credentials (e.g. serper_api_key) are set and valid when using engines that require them.","Broaden or rephrase the query, remove exact-match quotes, and retry.","Try a different search_engine value (e.g. 'duckduckgo' vs 'google') to rule out engine-specific blocks/rate limits.","If empty results are expected, wrap the graph run and handle this ValueError as a normal 'no results' outcome."],"exampleFix":"# before\nconfig = {\"llm\": {...}, \"search_engine\": \"seper\"}  # typo'd/no key\n\n# after\nconfig = {\n    \"llm\": {...},\n    \"search_engine\": \"seper\",\n    \"serper_api_key\": os.getenv(\"SERPER_APIKEY\"),\n}","handlingStrategy":"retry","validationCode":"if not query or not query.strip():\n    raise ValueError(\"Search query must be non-empty\")","typeGuard":"null","tryCatchPattern":"for engine in (\"duckduckgo\", \"google\", \"seper\"):\n    try:\n        config[\"search_engine\"] = engine\n        result = search_graph.run()\n        break\n    except ValueError as e:\n        if \"Zero results\" not in str(e):\n            raise","preventionTips":["Keep queries broad enough and in the language of the target content.","Verify search API keys (e.g. serper_api_key) are set and valid.","Treat 'Zero results' as an expected outcome with a graceful fallback rather than a crash."],"tags":["search","empty-results","api-key","web-search"],"backgroundTag":"empty-search-results","analyzedSha":"532dfffbf6ee823a6c9cf8cfedc24a93bf026780","analyzedAt":"2026-08-28T15:19:38.821Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}