{"record":{"id":"ec998ab7130dbfca","repo":"projectdiscovery/nuclei","slug":"the-chrome-browser-is-not-installed","errorCode":null,"errorMessage":"the chrome browser is not installed","messagePattern":"the chrome browser is not installed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/protocols/headless/engine/engine.go","lineNumber":76,"sourceCode":"\t\t\tDelete(\"use-mock-keychain\").\n\t\t\tUserDataDir(dataStore)\n\n\t\tif MustDisableSandbox() {\n\t\t\tchromeLauncher = chromeLauncher.NoSandbox(true)\n\t\t}\n\n\t\texecutablePath, err := os.Executable()\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\t// if musl is used, most likely we are on alpine linux which is not supported by go-rod, so we fallback to default chrome\n\t\tuseMusl, _ := fileutil.UseMusl(executablePath)\n\t\tif options.UseInstalledChrome || useMusl {\n\t\t\tif chromePath, hasChrome := launcher.LookPath(); hasChrome {\n\t\t\t\tchromeLauncher.Bin(chromePath)\n\t\t\t} else {\n\t\t\t\treturn nil, errors.New(\"the chrome browser is not installed\")\n\t\t\t}\n\t\t}\n\n\t\tif options.ShowBrowser {\n\t\t\tchromeLauncher = chromeLauncher.Headless(false)\n\t\t} else {\n\t\t\tchromeLauncher = chromeLauncher.Headless(true)\n\t\t}\n\t\tif options.AliveHttpProxy != \"\" {\n\t\t\tchromeLauncher = chromeLauncher.Proxy(options.AliveHttpProxy)\n\t\t}\n\n\t\tfor k, v := range options.ParseHeadlessOptionalArguments() {\n\t\t\tchromeLauncher.Set(flags.Flag(k), v)\n\t\t}\n\n\t\tlauncherURL, err = chromeLauncher.Launch()\n\t\tif err != nil {","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/headless/engine/engine.go#L58-L94","documentation":"Raised when the headless engine is forced to use a system-installed browser — either because options.UseInstalledChrome is set (CLI flag -system-chrome) or a musl-based build (Alpine) makes the downloaded Chromium unusable — and launcher.LookPath() finds no chrome/chromium executable in PATH. Nuclei refuses to fall back to downloading in these modes, so it errors out.","triggerScenarios":"Running `nuclei -headless -system-chrome ...` on a machine with no Chrome/Chromium installed; running headless templates in an Alpine-based container without the chromium package (musl detection forces the system-chrome path).","commonSituations":"Minimal Docker images and CI runners where Chrome was never installed; -system-chrome passed to avoid the Chromium download, but the binary exists only under an unexpected name or is not on PATH; Alpine images where go-rod's bundled browser cannot run.","solutions":["Install Chrome or Chromium and ensure it is on PATH (e.g. `apt-get install -y chromium` or install google-chrome-stable)","Drop the -system-chrome flag so go-rod downloads and caches a compatible Chromium automatically","On Alpine/production images, add the chromium package since musl builds cannot use the downloaded browser","Verify with `which chromium || which google-chrome` before launching headless scans"],"exampleFix":"# before (Dockerfile, alpine, headless fails)\nFROM alpine:latest\nRUN apk add --no-cache nuclei\n# after\nFROM alpine:latest\nRUN apk add --no-cache nuclei chromium chromium-chromedriver\nENV PATH=\"/usr/bin/chromium-browser:$PATH\"","handlingStrategy":"validation","validationCode":"// precheck in a wrapper script before headless scans:\n// if !command -v chromium && !command -v google-chrome; then install or drop -system-chrome; fi\nif _, hasChrome := launcher.LookPath(); !hasChrome {\n    return errors.New(\"system chrome requested but not found; install chromium or omit -system-chrome\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify `which chromium || which google-chrome` in CI before any headless job","Bake chromium into Docker images that will run headless templates","Remember Alpine/musl always requires a system browser — the downloaded one will not be used"],"tags":["headless","chrome","environment","docker","alpine"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}