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

  1. Install Firefox from mozilla.org using the regular installer so registry keys are written.
  2. Verify registry keys exist: `reg query "HKLM\SOFTWARE\Mozilla\Mozilla Firefox"`.
  3. If using a portable Firefox, install a registered copy or make it discoverable via the registry.
  4. 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

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


AI-assisted analysis of browsh-org/browsh@499ef386d4 (2026-09-02). Data as JSON: /api/errors/531dcbf11dcf3cf5. Report an issue: GitHub.