browsh-org/browsh · critical
Could not find Firefox on your registry
Error message
Could not find Firefox on your registry
What it means
On Windows, `getFirefoxFlavor` probes the Windows registry for installed Firefox editions (release, Beta, Nightly, etc.). If every probe leaves `flavor == "null"`, no Firefox installation is registered, and since browsh locates Firefox via the registry on Windows, it calls `Shutdown` with this error.
Source
Thrown at interfacer/src/browsh/firefox_windows.go:94
flavor = "Firefox Developer Edition"
}
defer k.Close()
}
if flavor == "null" {
k, err := registry.OpenKey(
registry.LOCAL_MACHINE,
`Software\Mozilla\Nightly`,
registry.QUERY_VALUE)
if err == nil {
flavor = "Nightly"
}
defer k.Close()
}
if flavor == "null" {
Shutdown(errors.New("Could not find Firefox on your registry"))
}
return flavor
}
func ensureFirefoxVersion(path string) {
versionString := getWindowsFirefoxVersionString()
pieces := strings.Split(versionString, " ")
version := pieces[0]
if versionOrdinal(version) < versionOrdinal("57") {
message := "Installed Firefox version " + version + " is too old. " +
"Firefox 57 or newer is needed."
Shutdown(errors.New(message))
}
}
View on GitHub (pinned to 499ef386d4)
Solutions
- Install Firefox from mozilla.org using the regular installer so registry keys are written.
- Verify registry keys exist: `reg query "HKLM\SOFTWARE\Mozilla\Mozilla Firefox"`.
- If using a portable Firefox, install a registered copy or make it discoverable via the registry.
- Check that browsh runs under the same user/bitness context as the Firefox installation.
Example fix
# before > browsh # Could not find Firefox on your registry # after: verify / install > reg query "HKLM\SOFTWARE\Mozilla\Mozilla Firefox" # if missing -> install Firefox from https://www.mozilla.org/firefox/
Defensive patterns
Strategy: validation
Validate before calling
const { execSync } = require('child_process');
try {
execSync('reg query "HKLM\\SOFTWARE\\Mozilla\\Mozilla Firefox"');
} catch {
throw new Error('Firefox not registered; install it from mozilla.org first');
} Try / catch
try {
startBrowsh();
} catch (e) {
if (/Could not find Firefox on your registry/.test(e.message)) {
console.error('Install registered Firefox from mozilla.org');
} else { throw e; }
} Prevention
- Install Firefox with the standard Windows installer (writes registry keys).
- Avoid portable/unregistered Firefox builds with browsh.
- Check registry presence in machine preflight: reg query HKLM\SOFTWARE\Mozilla\Mozilla Firefox.
- Match browsh's bitness/user context to the Firefox install.
When it happens
Trigger: `getFirefoxPath` or `getWindowsFirefoxVersionString` calls `getFirefoxFlavor`, and none of the registry keys it opens exist — Firefox is not installed or not registered in the expected registry locations for the current bitness/user.
Common situations: Firefox never installed on the Windows machine; portable/unregistered Firefox build that doesn't write registry keys; 32/64-bit registry view mismatch (Firefox installed for a different bitness); corrupted Firefox install.
Related errors
- Installed Firefox version is too old. Firefox 57 or newer i
- Error reading Windows registry: %w
- A headless Firefox is already running
- Firefox binary not found:
- There appears to already be an existing Web Extension connec
AI-assisted analysis of browsh-org/browsh@499ef386d4 (2026-09-02).
Data as JSON: /api/errors/531dcbf11dcf3cf5.
Report an issue: GitHub.