{"record":{"id":"c269937d4ae61ad1","repo":"grafana/k6","slug":"k6-couldn-t-detect-google-chrome-or-a-chromium-sup-c26993","errorCode":null,"errorMessage":"k6 couldn't detect google chrome or a chromium-supported browser on the given path: %s","messagePattern":"k6 couldn't detect google chrome or a chromium-supported browser on the given path: (.+?)","errorType":"exception","errorClass":"ErrChromeNotFoundAtPath","httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/browser/chromium/browser_type.go","lineNumber":366,"sourceCode":"\n\t// ErrChromeNotFoundAtPath is returned when the Chrome executable is not found at the given path.\n\tErrChromeNotFoundAtPath = errors.New(\n\t\t\"k6 couldn't detect google chrome or a chromium-supported browser on the given path\",\n\t)\n)\n\n// executablePath returns the path where the extension expects to find the browser executable.\nfunc executablePath(\n\tpath string,\n\tenv env.LookupFunc,\n\tlookPath func(file string) (string, error), // os.LookPath\n) (string, error) {\n\t// find the browser executable in the user provided path\n\tif path := strings.TrimSpace(path); path != \"\" {\n\t\tif _, err := lookPath(path); err == nil {\n\t\t\treturn path, nil\n\t\t}\n\t\treturn \"\", fmt.Errorf(\"%w: %s\", ErrChromeNotFoundAtPath, path)\n\t}\n\n\t// find the browser executable in the default paths below\n\tpaths := []string{\n\t\t// Unix-like\n\t\t\"headless_shell\",\n\t\t\"headless-shell\",\n\t\t\"chromium\",\n\t\t\"chromium-browser\",\n\t\t\"google-chrome\",\n\t\t\"google-chrome-stable\",\n\t\t\"google-chrome-beta\",\n\t\t\"google-chrome-unstable\",\n\t\t\"/usr/bin/google-chrome\",\n\t\t// Windows\n\t\t\"chrome\",\n\t\t\"chrome.exe\", // in case PATHEXT is misconfigured\n\t\t`C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe`,","sourceCodeStart":348,"sourceCodeEnd":384,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/internal/js/modules/k6/browser/chromium/browser_type.go#L348-L384","documentation":"Sentinel guard in executablePath: the user-provided executable path was trimmed and looked up but did not resolve to an existing browser binary, so the search returns ErrChromeNotFoundAtPath with the offending path echoed. It means the explicit path is wrong, distinct from no browser installed at all.","triggerScenarios":"Thrown at internal/js/modules/k6/browser/chromium/browser_type.go:366 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the executable path (absolute path to chrome/chromium binary)","Ensure the file exists and is executable on the runner","Remove the path setting to let k6 auto-detect an installed browser"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d06114777191d21ef885d05c5f8aa9e1ed838ae","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}