{"record":{"id":"f87619de239e7b8d","repo":"ScrapeGraphAI/Scrapegraph-ai","slug":"no-html-body-content-found-in","errorCode":null,"errorMessage":"No HTML body content found in\n                                 the document fetched by ChromiumLoader.","messagePattern":"No HTML body content found in\n                                 the document fetched by ChromiumLoader\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"scrapegraphai/nodes/fetch_node.py","lineNumber":381,"sourceCode":"                    [source],\n                    output_format=plasmate_cfg.get(\"output_format\", \"text\"),\n                    timeout=plasmate_cfg.get(\"timeout\", self.timeout or 30),\n                    selector=plasmate_cfg.get(\"selector\"),\n                    extra_headers=plasmate_cfg.get(\"extra_headers\", {}),\n                    fallback_to_chrome=plasmate_cfg.get(\"fallback_to_chrome\", False),\n                )\n                document = loader.load()\n            else:\n                loader = ChromiumLoader(\n                    [source],\n                    headless=self.headless,\n                    storage_state=self.storage_state,\n                    **loader_kwargs,\n                )\n                document = loader.load()\n\n            if not document or not document[0].page_content.strip():\n                raise ValueError(\n                    \"\"\"No HTML body content found in\n                                 the document fetched by ChromiumLoader.\"\"\"\n                )\n\n            parsed_content = document[0].page_content\n\n            if (\n                (\n                    isinstance(self.llm_model, ChatOpenAI)\n                    or isinstance(self.llm_model, AzureChatOpenAI)\n                )\n                and not self.script_creator\n                or self.force\n                and not self.script_creator\n                and not self.openai_md_enabled\n            ):\n                parsed_content = convert_to_md(document[0].page_content, parsed_content)\n","sourceCodeStart":363,"sourceCodeEnd":399,"githubUrl":"https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/532dfffbf6ee823a6c9cf8cfedc24a93bf026780/scrapegraphai/nodes/fetch_node.py#L363-L399","documentation":"After ChromiumLoader.load() returns, handle_web_source checks that a document exists and its first page_content is non-empty; headless Chromium rendered a page with no text content (or returned no documents), so there is nothing to parse.","triggerScenarios":"Scraping a fully JavaScript-rendered SPA whose content hasn't loaded when Chromium snapshots it; a page blocked by a bot check in headless mode; wrong URL that renders an empty shell.","commonSituations":"Default headless=True with anti-bot-protected sites; slow JS apps where content loads after the snapshot; incorrect wait/loading strategy.","solutions":["Increase loader/wait timeouts or set headless=False for protected sites","Use BrowserBase or a proxy-enabled fetch for bot-protected targets","Verify the URL renders content in a real browser","Add a retry — sometimes the first render races page load"],"exampleFix":"# before\ngraph_config = {'source': url, 'headless': True}\n# after\ngraph_config = {'source': url, 'headless': False}","handlingStrategy":"fallback","validationCode":"from scrapegraphai.docloaders.chromium import ChromiumLoader\nloader = ChromiumLoader([url], headless=True)\ndoc = loader.load()\nif not doc or not doc[0].page_content.strip():\n    graph_config['headless'] = False  # pre-empt empty render","typeGuard":null,"tryCatchPattern":"try:\n    graph.run()\nexcept ValueError as e:\n    if 'ChromiumLoader' in str(e):\n        graph_config['headless'] = False\n        graph.run()  # retry headed\n    else:\n        raise","preventionTips":["Use headless=False or BrowserBase for bot-protected sites","Allow render/wait time before snapshotting; retry once on empty renders"],"tags":["scrapegraphai","fetch-node","chromium","headless","empty-content"],"backgroundTag":"empty-rendered-content","analyzedSha":"532dfffbf6ee823a6c9cf8cfedc24a93bf026780","analyzedAt":"2026-08-28T15:19:38.821Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}