grafana/k6 · error · ErrChromeNotFoundAtPath
k6 couldn't detect google chrome or a chromium-supported bro
Error message
k6 couldn't detect google chrome or a chromium-supported browser on the given path
What it means
ErrChromeNotFoundAtPath is the counterpart of ErrChromeNotInstalled for the explicit case: you configured an executable path (executablePath browser option or K6_BROWSER_EXECUTABLE_PATH), and the browser-type code failed to locate/execute a browser binary at that path (trimmed non-empty triggers the path branch in executablePath).
Source
Thrown at internal/js/modules/k6/browser/chromium/browser_type.go:350
}
}()
args, err := parseArgs(flags)
if err != nil {
return nil, err
}
return common.NewLocalBrowserProcess(bProcCtx, path, args, dataDir, bProcCtxCancel, logger) //nolint: wrapcheck
}
var (
// ErrChromeNotInstalled is returned when the Chrome executable is not found.
ErrChromeNotInstalled = errors.New(
"k6 couldn't detect google chrome or a chromium-supported browser on this system",
)
// 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)
}
View on GitHub (pinned to 93accf6570)
Solutions
- Use an absolute path and verify it: ls -l /usr/bin/chromium && /usr/bin/chromium --version — the binary must run standalone
- Fix the path: K6_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium (or the correct path in your image)
- If the file exists but is not executable: chmod +x <path>
- Clear the env var to fall back to k6's default system-wide detection
Example fix
# before export K6_BROWSER_EXECUTABLE_PATH=/usr/bin/google-chrome # wrong for this image # after export K6_BROWSER_EXECUTABLE_PATH=/usr/bin/chromium /usr/bin/chromium --version # sanity check
Defensive patterns
Strategy: validation
Validate before calling
#!/bin/sh
p="${K6_BROWSER_EXECUTABLE_PATH:-}"
[ -n "$p" ] || exit 0 # not configured, default detection applies
[ -x "$p" ] || { echo "browser executable not usable at $p" >&2; exit 1; }
"$p" --version >/dev/null 2>&1 || { echo "browser at $p fails to run" >&2; exit 1; } Prevention
- Always use absolute paths for K6_BROWSER_EXECUTABLE_PATH — k6 resolves relative paths from its own working directory
- Verify the path once in the Dockerfile/CI script: RUN /usr/bin/chromium --version
- Derive the path in the image (symlink to /usr/bin/chromium) so scripts stay image-agnostic
When it happens
Trigger: A typo or wrong path in K6_BROWSER_EXECUTABLE_PATH; a relative path that resolves differently under k6's working directory; a path that exists but lacks the executable bit; pointing at a wrapper script or directory instead of the Chrome binary; container path differing from the host path.
Common situations: Docker volume-mounts mapping Chrome to a different path than expected; CI templates hardcoding /usr/bin/google-chrome on images where it is /usr/bin/chromium; scripts written on macOS reused on Linux; binaries installed per-user under ~/.local.
Related errors
- WebSocket endpoint cannot be empty
- k6 couldn't detect google chrome or a chromium-supported bro
- both K6_CLOUD_METRICS_PUSH_URL and K6_CLOUD_TEST_RUN_TOKEN m
- K6_CLOUD_LOGS_PUSH_URL requires K6_CLOUD_TEST_RUN_TOKEN
- missing required url
AI-assisted analysis of grafana/k6@93accf6570 (2026-08-15).
Data as JSON: /api/errors/69ee079592973e86.
Report an issue: GitHub.