{"record":{"id":"d0fe6fb0ca702336","repo":"unclecode/crawl4ai","slug":"browser-type-self-browser-type-not-supported-d0fe6f","errorCode":null,"errorMessage":"Browser type {self.browser_type} not supported","messagePattern":"Browser type (.+?) not supported","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"crawl4ai/browser_manager.py:406","lineNumber":7237,"sourceCode":"\n        if self.browser_type == \"chromium\":\n            args = [\n                f\"--remote-debugging-port={self.debugging_port}\",\n                f\"--user-data-dir={self.user_data_dir}\",\n            ]\n            if self.headless:\n                args.append(\"--headless=new\")\n        elif self.browser_type == \"firefox\":\n            args = [\n                \"--remote-debugging-port\",\n                str(self.debugging_port),\n                \"--profile\",\n                self.user_data_dir,\n            ]\n            if self.headless:\n                args.append(\"--headless\")\n        else:\n            raise NotImplementedError(f\"Browser type {self.browser_type} not supported\")\n\n        return base_args + args\n\n    async def cleanup(self):\n        \"\"\"Cleanup browser process and temporary directory\"\"\"\n        # Set shutting_down flag BEFORE any termination actions\n        self.shutting_down = True\n\n        if self.browser_process:\n            try:\n                # For builtin browsers that should persist, we should check if it's a detached process\n                # Only terminate if we have proper control over the process\n                if not self.browser_process.poll():\n                    # Process is still running\n                    self.browser_process.terminate()\n                    # Wait for process to end gracefully\n                    for _ in range(10):  # 10 attempts, 100ms each\n                        if self.browser_process.poll() is not None:","sourceCodeStart":7219,"sourceCodeEnd":7255,"githubUrl":"https://github.com/unclecode/crawl4ai/blob/7e801521428ee12509994d39151006f64055ebe3/deploy/docker/c4ai-code-context.md#L7219-L7255","documentation":"The managed browser launcher builds a subprocess command line per browser type and only knows how to do so for 'chromium' and 'firefox'. Any other browser_type string falls through to NotImplementedError, naming the unsupported value.","triggerScenarios":"Setting browser_type to anything other than 'chromium' or 'firefox' in the managed/native browser config — e.g. 'chrome', 'google-chrome', 'webkit', 'edge', 'safari', or a typo like 'Chromium' (case-sensitive).","commonSituations":"Users writing browser_type='chrome' because that is the Playwright/Puppeteer spelling; attempting WebKit/Edge support that the launcher does not implement; case mismatches after a config refactor.","solutions":["Use browser_type='chromium' or browser_type='firefox' exactly (lowercase)","If you named a concrete binary ('chrome', 'edge'), switch to 'chromium' and point the binary/path option at your executable if the config supports it","For other engines, use Playwright-based crawling instead of the managed native launcher"],"exampleFix":"# before\nBrowserConfig(browser_type=\"chrome\")\n# after\nBrowserConfig(browser_type=\"chromium\")\n","handlingStrategy":"validation","validationCode":"SUPPORTED_BROWSERS = {\"chromium\", \"firefox\"}\n\ndef validate_browser_type(browser_type: str) -> str:\n    if browser_type not in SUPPORTED_BROWSERS:\n        raise ValueError(\n            f\"unsupported browser_type {browser_type!r}; use one of {sorted(SUPPORTED_BROWSERS)}\"\n        )\n    return browser_type","typeGuard":"def is_supported_browser(browser_type) -> bool:\n    return isinstance(browser_type, str) and browser_type in {\"chromium\", \"firefox\"}","tryCatchPattern":"try:\n    args = browser._build_args()  # or start()\nexcept NotImplementedError:\n    # reconfigure and retry with a supported engine\n    browser.browser_type = \"chromium\"\n    args = browser._build_args()","preventionTips":["Use exactly 'chromium' or 'firefox' (lowercase) for browser_type","Validate browser_type at config load time, not at launch time","For WebKit/Edge needs, use the Playwright-based path instead of the managed launcher"],"tags":["crawl4ai","browser-config","not-implemented","validation"],"backgroundTag":null,"analyzedSha":"7e801521428ee12509994d39151006f64055ebe3","analyzedAt":"2026-08-14T20:46:20.673Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}