{"record":{"id":"f3e89ca771581902","repo":"browsh-org/browsh","slug":"installed-firefox-version-is-too-old-firefox-57","errorCode":null,"errorMessage":"Installed Firefox version  is too old. Firefox 57 or newer is needed.","messagePattern":"Installed Firefox version  is too old\\. Firefox 57 or newer is needed\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"interfacer/src/browsh/firefox_unix.go","lineNumber":22,"sourceCode":"\nimport (\n\t\"strings\"\n\n\t\"github.com/go-errors/errors\"\n)\n\nfunc getFirefoxPath() string {\n\treturn Shell(\"which firefox\")\n}\n\nfunc ensureFirefoxVersion(path string) {\n\toutput := Shell(path + \" --version\")\n\tpieces := strings.Split(output, \" \")\n\tversion := pieces[len(pieces)-1]\n\tif versionOrdinal(version) < versionOrdinal(\"57\") {\n\t\tmessage := \"Installed Firefox version \" + version + \" is too old. \" +\n\t\t\t\"Firefox 57 or newer is needed.\"\n\t\tShutdown(errors.New(message))\n\t}\n}\n","sourceCodeStart":4,"sourceCodeEnd":25,"githubUrl":"https://github.com/browsh-org/browsh/blob/499ef386d45cd1e2b5457dd04887c017f77b7e27/interfacer/src/browsh/firefox_unix.go#L4-L25","documentation":"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.","triggerScenarios":"`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').","commonSituations":"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.","solutions":["Upgrade Firefox to 57+: `apt-get install --only-upgrade firefox` or install from Mozilla's official repository/tarball.","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.","Point `firefox.path` at a newer Firefox installation if multiple versions coexist.","Use a newer base image/distro for containers running browsh."],"exampleFix":"// before\nfirefox --version  # Mozilla Firefox 52.9.0\n// after\nsudo apt-get update && sudo apt-get install firefox\nfirefox --version  # Mozilla Firefox 1xx.0","handlingStrategy":"validation","validationCode":"const { execSync } = require('child_process');\nconst out = execSync('/usr/bin/firefox --version').toString().trim().split(' ').pop();\nconst major = parseInt(out, 10);\nif (!(major >= 57)) throw new Error(`Firefox ${out} too old; need 57+`);","typeGuard":null,"tryCatchPattern":"try {\n  startBrowsh();\n} catch (e) {\n  if (/is too old/.test(e.message)) {\n    console.error('Upgrade Firefox to 57+; see', e.message);\n  } else { throw e; }\n}","preventionTips":["Pin a modern Firefox in Dockerfiles/AMI images.","Run `firefox --version` in environment preflight checks.","Keep distro Firefox updated or install from Mozilla's repo.","If the message shows an empty version, fix the binary path so `--version` executes."],"tags":["firefox","version-check","compatibility"],"backgroundTag":"firefox-version-too-old","analyzedSha":"499ef386d45cd1e2b5457dd04887c017f77b7e27","analyzedAt":"2026-09-02T19:05:32.228Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}