grafana/k6 · error · ErrChromeNotFoundAtPath

k6 couldn't detect google chrome or a chromium-supported…

Error message

k6 couldn't detect google chrome or a chromium-supported browser on the given path: %s

What it means

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.

Solutions

  1. Correct the executable path (absolute path to chrome/chromium binary)
  2. Ensure the file exists and is executable on the runner
  3. Remove the path setting to let k6 auto-detect an installed browser
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at internal/js/modules/k6/browser/chromium/browser_type.go:366 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of grafana/k6@8d06114777 (2026-08-18). Data as JSON: /api/errors/c269937d4ae61ad1. Report an issue: GitHub.

Appendix: source

Thrown at internal/js/modules/k6/browser/chromium/browser_type.go:366

	// ErrChromeNotFoundAtPath is returned when the Chrome executable is not found at the given path.
	ErrChromeNotFoundAtPath = errors.New(
		"k6 couldn't detect google chrome or a chromium-supported browser on the given path",
	)
)

// executablePath returns the path where the extension expects to find the browser executable.
func executablePath(
	path string,
	env env.LookupFunc,
	lookPath func(file string) (string, error), // os.LookPath
) (string, error) {
	// find the browser executable in the user provided path
	if path := strings.TrimSpace(path); path != "" {
		if _, err := lookPath(path); err == nil {
			return path, nil
		}
		return "", fmt.Errorf("%w: %s", ErrChromeNotFoundAtPath, path)
	}

	// find the browser executable in the default paths below
	paths := []string{
		// Unix-like
		"headless_shell",
		"headless-shell",
		"chromium",
		"chromium-browser",
		"google-chrome",
		"google-chrome-stable",
		"google-chrome-beta",
		"google-chrome-unstable",
		"/usr/bin/google-chrome",
		// Windows
		"chrome",
		"chrome.exe", // in case PATHEXT is misconfigured
		`C:\Program Files (x86)\Google\Chrome\Application\chrome.exe`,

View on GitHub (pinned to 8d06114777)