browsh-org/browsh · error

Installed Firefox version is too old. Firefox 57 or newer i

Error message

Installed Firefox version  is too old. Firefox 57 or newer is needed.

What it means

Browsh requires Firefox 57+ (its WebExtension needs multiprocess-compatible APIs). `ensureFirefoxVersion` (unix) parses the last whitespace-separated token of `<firefox-path> --version` output and compares it ordinally against 57; older versions trigger `Shutdown` with this message. The doubled space in the message shows the parsed version token was empty.

Source

Thrown at interfacer/src/browsh/firefox_unix.go:22

import (
	"strings"

	"github.com/go-errors/errors"
)

func getFirefoxPath() string {
	return Shell("which firefox")
}

func ensureFirefoxVersion(path string) {
	output := Shell(path + " --version")
	pieces := strings.Split(output, " ")
	version := pieces[len(pieces)-1]
	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. Upgrade Firefox to 57+: `apt-get install --only-upgrade firefox` or install from Mozilla's official repository/tarball.
  2. If version detection is broken (empty version in the message), verify `<path> --version` runs correctly by hand and fix the binary path or missing runtime deps.
  3. Point `firefox.path` at a newer Firefox installation if multiple versions coexist.
  4. Use a newer base image/distro for containers running browsh.

Example fix

// before
firefox --version  # Mozilla Firefox 52.9.0
// after
sudo apt-get update && sudo apt-get install firefox
firefox --version  # Mozilla Firefox 1xx.0
Defensive patterns

Strategy: validation

Validate before calling

const { execSync } = require('child_process');
const out = execSync('/usr/bin/firefox --version').toString().trim().split(' ').pop();
const major = parseInt(out, 10);
if (!(major >= 57)) throw new Error(`Firefox ${out} too old; need 57+`);

Try / catch

try {
  startBrowsh();
} catch (e) {
  if (/is too old/.test(e.message)) {
    console.error('Upgrade Firefox to 57+; see', e.message);
  } else { throw e; }
}

Prevention

When it happens

Trigger: `ensureFirefoxVersion` runs `<path> --version` and the extracted token's ordinal is < 57 — either a genuinely old Firefox, or version parsing failed (empty/failed command output yields an empty version string, hence 'version is too old').

Common situations: Old distro Firefox (e.g. ESR from 2017-era repos); minimal containers shipping an ancient package; `<path> --version` failing or printing nothing (bad path, missing libs) so the parsed version is empty; non-English locale output confusing parsing.

Related errors


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