Skip to content

[rust] Support multiple names for Firefox binary in Linux (#17695)#17732

Merged
bonigarcia merged 4 commits into
trunkfrom
sm_firefox_linux
Jul 2, 2026
Merged

[rust] Support multiple names for Firefox binary in Linux (#17695)#17732
bonigarcia merged 4 commits into
trunkfrom
sm_firefox_linux

Conversation

@bonigarcia

Copy link
Copy Markdown
Member

🔗 Related Issues

Fixes #17695.

💥 What does this PR do?

This PR makes SM to support different Firefox names (firefox-esr, firefox-beta, firefox-devedition, firefox-trunk) in Linux.

🔧 Implementation Notes

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s):
    • What was generated:
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (formatting, renaming)
  • Bug fix (backwards compatible)
  • New feature (non-breaking change which adds functionality and tests!)
  • Breaking change (fix or feature that would cause existing functionality to change)

@bonigarcia bonigarcia added the C-rust Rust code is mostly Selenium Manager label Jun 30, 2026
@selenium-ci selenium-ci added the B-manager Selenium Manager label Jun 30, 2026
@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

[rust] Detect Firefox binaries with alternate Linux names

🐞 Bug fix 🕐 Less than 10 minutes

Grey Divider

AI Description

• Extend Firefox PATH discovery to recognize common alternate binary names on Linux.
• Fixes Selenium Manager failing to locate non-firefox installs (ESR/Beta/Dev/Trunk).
Diagram

graph TD
  CLI["Selenium Manager CLI"] --> Core["Browser discovery"] --> FM["FirefoxManager"] --> Names["Candidate names"] --> Which["which()"] --> PATH{{"Linux PATH"}}
  PATH -. "resolved binary" .-> Found["Firefox path"] --> Core
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Gate alternate names to Linux only
  • ➕ Avoids unnecessary extra PATH probes on macOS/Windows
  • ➕ Reduces chance of accidental matches if similar names exist in non-Linux environments
  • ➖ Slightly more conditional logic in the manager implementation
  • ➖ May complicate behavior if future platforms legitimately use these names
2. Centralize browser alias lists as constants/shared helper
  • ➕ Keeps per-browser files smaller and avoids repeated literal strings
  • ➕ Easier to extend consistently across browsers/managers
  • ➖ Refactor overhead for a very small change
  • ➖ May be premature without other alias needs

Recommendation: The current approach (adding known Firefox alias names to PATH probing) is appropriate and minimal for fixing Linux discovery. If reviewers prefer tighter scoping, consider gating these aliases behind an OS==Linux check; otherwise, the added probes are low-risk and consistent with Chrome’s existing multi-name PATH search.

Files changed (1) +7 / -1

Bug fix (1) +7 / -1
firefox.rsAdd Linux Firefox alias names to PATH discovery list +7/-1

Add Linux Firefox alias names to PATH discovery list

• Updates 'get_browser_names_in_path()' to return additional Firefox binary names commonly used by Linux distributions (ESR, Beta, Developer Edition, Trunk). This allows Selenium Manager to find Firefox installations whose executable is not named simply 'firefox'.

rust/src/firefox.rs

@qodo-code-review

qodo-code-review Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (3) 📎 Requirement gaps (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 14 rules

Grey Divider


Action required

1. Linux channel path bypass 🐞 Bug ≡ Correctness
Description
On Linux, Firefox channel discovery (beta/dev/esr) can still resolve to the stable
/usr/bin/firefox binary because detect_browser_path returns the hardcoded path-map hit before
falling back to PATH scanning, so the new firefox-beta/firefox-devedition/firefox-esr aliases
may never be tried. This can cause Selenium Manager to run the wrong Firefox channel even when the
channel-specific binary is installed and available in PATH.
Code

rust/src/firefox.rs[R133-145]

+        let browser_version = self.get_browser_version();
+        let mut browser_names = vec![];
+        if self.is_beta(browser_version) {
+            browser_names.push("firefox-beta");
+        } else if self.is_dev(browser_version) {
+            browser_names.push("firefox-devedition");
+        } else if self.is_nightly(browser_version) {
+            browser_names.push("firefox-trunk");
+        } else if self.is_esr(browser_version) {
+            browser_names.push("firefox-esr");
+        }
+        browser_names.push(self.get_browser_name());
+        browser_names
Evidence
detect_browser_path() returns the first existing fixed path from get_browser_path_map() and only
checks PATH if that fixed path does not exist. Since Linux BETA/DEV/ESR are currently mapped to
/usr/bin/firefox, any system with stable Firefox installed will resolve beta/dev/esr requests to
stable before the new PATH alias list can be used.

rust/src/firefox.rs[132-146]
rust/src/firefox.rs[199-203]
rust/src/lib.rs[424-473]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Firefox Linux channel discovery can short-circuit on `/usr/bin/firefox` for beta/dev/esr because `get_browser_path_map()` maps those channels to the stable path, and `detect_browser_path()` returns an existing fixed path without consulting PATH aliases.

## Issue Context
The PR adds PATH aliases (`firefox-beta`, `firefox-devedition`, `firefox-esr`, `firefox-trunk`) in `get_browser_names_in_path()`. However, on Linux, fixed-path detection runs first; if `/usr/bin/firefox` exists it will be selected for beta/dev/esr requests, bypassing the new alias logic.

## Fix Focus Areas
- rust/src/firefox.rs[199-203]
- rust/src/lib.rs[424-473]

### Suggested change
Update `FirefoxManager::get_browser_path_map()` so Linux BETA/DEV/ESR entries use their channel-specific executable paths (e.g., `/usr/bin/firefox-beta`, `/usr/bin/firefox-devedition`, `/usr/bin/firefox-esr`) rather than `/usr/bin/firefox`, allowing fixed-path detection to find the correct channel when installed.

(Keeping PATH fallback intact means if those paths don’t exist, discovery will still fall back to `find_browser_in_path()` and ultimately `firefox`.)

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. avoid_browser_download branch untested 📘 Rule violation ▣ Testability
Description
The new is_avoid_browser_download() behavior changes how browser_version is set when an
online/local version mismatch occurs, but this PR does not add a regression test that would fail if
the change were reverted. Lack of automated coverage risks silent behavior regressions for the
--avoid-browser-download flow.
Code

rust/src/lib.rs[R571-573]

+                                    if self.is_avoid_browser_download() {
+                                        self.set_browser_version(discovered_major_browser_version);
+                                    }
Evidence
The diff introduces a new conditional path that mutates browser_version when
is_avoid_browser_download() is enabled during a mismatch case. Existing tests exercising
--avoid-browser-download do not assert the resolved browser version or specifically cover this
mismatch behavior, so reverting this logic would likely not fail CI.

Rule 389273: Require tests for all new functionality and bug fixes
rust/src/lib.rs[571-573]
rust/tests/browser_tests.rs[38-66]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A new conditional path was added for `--avoid-browser-download` where a version mismatch sets `browser_version` to `discovered_major_browser_version`, but there is no targeted regression test proving this behavior.

## Issue Context
This impacts user-visible behavior (the resolved browser version used/output) in scenarios where Selenium Manager detects a local browser whose major version differs from the online-discovered version, while downloads are disabled.

## Fix Focus Areas
- rust/src/lib.rs[571-573]
- rust/tests/browser_tests.rs[38-66]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Aliases skipped by default 🐞 Bug ≡ Correctness
Description
FirefoxManager::get_browser_names_in_path only adds Linux alias names when browser_version is
exactly beta/dev/nightly/esr; with the default empty browser_version, PATH discovery still
checks only firefox. On Linux systems where the installed executable is only
firefox-esr/firefox-beta/etc., Selenium Manager will still fail to detect Firefox in PATH.
Code

rust/src/firefox.rs[R133-145]

+        let browser_version = self.get_browser_version();
+        let mut browser_names = vec![];
+        if self.is_beta(browser_version) {
+            browser_names.push("firefox-beta");
+        } else if self.is_dev(browser_version) {
+            browser_names.push("firefox-devedition");
+        } else if self.is_nightly(browser_version) {
+            browser_names.push("firefox-trunk");
+        } else if self.is_esr(browser_version) {
+            browser_names.push("firefox-esr");
+        }
+        browser_names.push(self.get_browser_name());
+        browser_names
Evidence
Default config leaves browser_version empty, so none of the channel predicates match and the
function returns only firefox. Since PATH discovery exclusively uses this list, alias-only
installs will not be found.

rust/src/config.rs[74-139]
rust/src/firefox.rs[132-146]
rust/src/lib.rs[675-700]
rust/src/lib.rs[778-805]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`get_browser_names_in_path()` only prepends alias binary names when `browser_version` equals a channel label. When `browser_version` is empty (the default), PATH detection tries only `firefox`, so systems where Firefox is installed under `firefox-esr`/`firefox-beta`/`firefox-devedition`/`firefox-trunk` are still not discovered.

### Issue Context
- `ManagerConfig::default` initializes `browser_version` to an empty string unless the user explicitly sets it.
- `find_browser_in_path()` iterates the list returned by `get_browser_names_in_path()` and stops at the first executable found.

### Fix Focus Areas
- rust/src/firefox.rs[132-146]
- rust/src/lib.rs[675-700]
- rust/src/config.rs[74-139]

### Suggested change
On Linux, include the known Firefox executable aliases in the PATH probe list even when `browser_version` is empty. Preserve preference ordering (e.g., if `browser_version` is `esr`, try `firefox-esr` first), but ensure the alias names are still tried as fallbacks when no channel was requested.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View more (1)
4. Firefox PATH aliases untested 📘 Rule violation ▣ Testability
Description
The PR changes Firefox binary discovery by adding additional PATH names (firefox-esr,
firefox-beta, firefox-devedition, firefox-trunk) but does not add/adjust tests to assert this
behavior. This can lead to regressions where the new names stop working without being detected by
CI.
Code

rust/src/firefox.rs[R132-139]

    fn get_browser_names_in_path(&self) -> Vec<&str> {
-        vec![self.get_browser_name()]
+        vec![
+            self.get_browser_name(),
+            "firefox-esr",
+            "firefox-beta",
+            "firefox-devedition",
+            "firefox-trunk",
+        ]
Evidence
PR Compliance ID 389273 requires tests for new functionality/behavior changes. The changed function
now returns multiple Firefox binary names, but existing tests shown do not exercise or assert any of
these new alias names.

Rule 389273: Require tests for all new functionality and bug fixes
rust/src/firefox.rs[132-140]
rust/tests/browser_tests.rs[27-64]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new Firefox PATH aliases added to `get_browser_names_in_path()` are not covered by any automated test, risking undetected regressions.

## Issue Context
This PR adds additional Firefox binary names intended to be discovered on Linux (`firefox-esr`, `firefox-beta`, `firefox-devedition`, `firefox-trunk`). Add a focused unit test that asserts these names are present in the returned list.

## Fix Focus Areas
- rust/src/firefox.rs[132-140]
- rust/src/firefox.rs[674-706]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

5. No cross-binding check documented 📘 Rule violation ≡ Correctness
Description
The change adds new user-visible Firefox PATH alias behavior (e.g., firefox-esr, firefox-beta)
but provides no nearby documentation or evidence of comparison with at least one other Selenium
binding to ensure consistent behavior. This risks introducing cross-language divergence in how
Firefox variants are discovered on Linux.
Code

rust/src/firefox.rs[R133-145]

+        let browser_version = self.get_browser_version();
+        let mut browser_names = vec![];
+        if self.is_beta(browser_version) {
+            browser_names.push("firefox-beta");
+        } else if self.is_dev(browser_version) {
+            browser_names.push("firefox-devedition");
+        } else if self.is_nightly(browser_version) {
+            browser_names.push("firefox-trunk");
+        } else if self.is_esr(browser_version) {
+            browser_names.push("firefox-esr");
+        }
+        browser_names.push(self.get_browser_name());
+        browser_names
Evidence
PR Compliance ID 389265 requires evidence of cross-language comparison when changing user-visible
binding behavior. The updated Firefox PATH discovery logic adds new executable aliases, but there is
no accompanying comment or documentation in the changed code indicating which other binding was
checked for consistency (or that a divergence is intentional).

Rule 389265: Compare cross-language bindings when changing user-visible behavior
rust/src/firefox.rs[132-145]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
A user-visible Selenium Manager behavior change (Firefox binary discovery on Linux) was introduced without any documented comparison to another language binding, as required.

## Issue Context
This PR adds support for multiple Firefox executable names (e.g., `firefox-esr`, `firefox-beta`, `firefox-devedition`, `firefox-trunk`). The compliance requirement expects reviewers to see evidence of a cross-binding comparison (or explicit documentation of intentional divergence).

## Fix Focus Areas
- rust/src/firefox.rs[133-145]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Channel request falls back 🐞 Bug ≡ Correctness
Description
For beta/dev/nightly/esr requests, get_browser_names_in_path still appends firefox, so
PATH discovery can pick a stable Firefox binary when the channel-specific executable is missing.
discover_local_browser can then accept this fallback binary without downloading the requested
channel when major versions match, resulting in running the wrong Firefox variant.
Code

rust/src/firefox.rs[R135-145]

+        if self.is_beta(browser_version) {
+            browser_names.push("firefox-beta");
+        } else if self.is_dev(browser_version) {
+            browser_names.push("firefox-devedition");
+        } else if self.is_nightly(browser_version) {
+            browser_names.push("firefox-trunk");
+        } else if self.is_esr(browser_version) {
+            browser_names.push("firefox-esr");
+        }
+        browser_names.push(self.get_browser_name());
+        browser_names
Evidence
The PATH search returns the first matching executable name. Because firefox is always appended, it
can be selected when the requested alias is missing; the unstable-channel flow then only checks
major versions and can accept the detected local browser as satisfying the request.

rust/src/firefox.rs[132-146]
rust/src/lib.rs[675-699]
rust/src/lib.rs[547-575]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
When a user explicitly requests `beta`/`dev`/`nightly`/`esr`, the PATH probe list still includes `firefox` as a fallback. If the channel-specific binary name is absent, Selenium Manager can select stable `firefox` and proceed; the subsequent logic may treat it as acceptable (not forcing a download) when only the major version matches.

### Issue Context
- `find_browser_in_path()` stops at the first executable found.
- For unstable requests, `discover_local_browser()` compares only major versions when checking local vs online and can accept the local browser as-is.

### Fix Focus Areas
- rust/src/firefox.rs[132-146]
- rust/src/lib.rs[675-699]
- rust/src/lib.rs[547-575]

### Suggested change
For explicit channel requests (`beta`/`dev`/`nightly`/`esr`), either:
1) Do not include the generic `firefox` name in the PATH probe list (Linux), or
2) If you keep the fallback, add a post-detection validation step that confirms the discovered binary matches the requested channel (and force download/error if not).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread rust/src/firefox.rs Outdated
@kevinoid

Copy link
Copy Markdown

Thanks for working on this @bonigarcia!

I ran selenium-manager-linux on a system with both firefox-beta (152.0b10) and firefox-devedition (153.0b3) installed and it successfully found firefox-beta:

./selenium-manager-linux --browser firefox --trace log
[2026-06-30T16:56:31.961Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T16:56:31.961Z TRACE] Metadata file does not exist. Creating a new one
[2026-06-30T16:56:31.961Z TRACE] Checking geckodriver in PATH
[2026-06-30T16:56:31.962Z DEBUG] geckodriver not found in PATH
[2026-06-30T16:56:31.962Z TRACE] Checking firefox in PATH
[2026-06-30T16:56:31.962Z TRACE] Checking firefox-esr in PATH
[2026-06-30T16:56:31.962Z TRACE] Checking firefox-beta in PATH
[2026-06-30T16:56:31.963Z DEBUG] Found firefox-beta in PATH: /usr/bin/firefox-beta
[2026-06-30T16:56:31.963Z TRACE] Using shell command to find out firefox version
[2026-06-30T16:56:31.963Z DEBUG] Running command: /usr/bin/firefox-beta -v
[2026-06-30T16:56:32.018Z DEBUG] Output: "Mozilla Firefox 152.0b10"
[2026-06-30T16:56:32.020Z TRACE] The version of firefox is 152.010
[2026-06-30T16:56:32.020Z DEBUG] Detected browser: firefox 152.010
[2026-06-30T16:56:32.020Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T16:56:32.020Z TRACE] Metadata file does not exist. Creating a new one
[2026-06-30T16:56:32.082Z DEBUG] Valid geckodriver versions for firefox 152: ["0.37.0", "0.36.0", "0.35.0", "0.34.0"]
[2026-06-30T16:56:32.082Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T16:56:32.082Z DEBUG] Required driver: geckodriver 0.37.0
[2026-06-30T16:56:32.082Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-06-30T16:56:32.082Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T16:56:32.083Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T16:56:32.083Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
[2026-06-30T16:56:32.083Z INFO ] Browser path: /usr/bin/firefox-beta

However, --browser-version dev and --browser-version 153 also found firefox-beta (with warnings) rather than firefox-devedition:

./selenium-manager-linux --browser firefox --browser-version dev --trace log
[2026-06-30T17:01:57.580Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T17:01:57.582Z TRACE] Checking geckodriver in PATH
[2026-06-30T17:01:57.583Z DEBUG] geckodriver not found in PATH
[2026-06-30T17:01:57.583Z TRACE] Checking firefox in PATH
[2026-06-30T17:01:57.583Z TRACE] Checking firefox-esr in PATH
[2026-06-30T17:01:57.583Z TRACE] Checking firefox-beta in PATH
[2026-06-30T17:01:57.583Z DEBUG] Found firefox-beta in PATH: /usr/bin/firefox-beta
[2026-06-30T17:01:57.583Z TRACE] Using shell command to find out firefox version
[2026-06-30T17:01:57.583Z DEBUG] Running command: /usr/bin/firefox-beta -v
[2026-06-30T17:01:57.635Z DEBUG] Output: "Mozilla Firefox 152.0b10"
[2026-06-30T17:01:57.637Z TRACE] The version of firefox is 152.010
[2026-06-30T17:01:57.637Z DEBUG] Detected browser: firefox 152.010
[2026-06-30T17:01:57.637Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T17:01:57.637Z TRACE] Browser with valid TTL. Getting firefox version from metadata
[2026-06-30T17:01:57.637Z DEBUG] Discovered online firefox version (153) is different to the detected local firefox version (152)
[2026-06-30T17:01:57.637Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T17:01:57.638Z TRACE] Driver TTL is valid. Getting geckodriver version from metadata
[2026-06-30T17:01:57.638Z DEBUG] Required driver: geckodriver 0.37.0
[2026-06-30T17:01:57.638Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-06-30T17:01:57.638Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T17:01:57.638Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T17:01:57.638Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
[2026-06-30T17:01:57.638Z INFO ] Browser path: /usr/bin/firefox-beta
./selenium-manager-linux --browser firefox --browser-version 153 --trace log
[2026-06-30T17:02:32.786Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T17:02:32.789Z TRACE] Checking geckodriver in PATH
[2026-06-30T17:02:32.789Z DEBUG] geckodriver not found in PATH
[2026-06-30T17:02:32.789Z TRACE] Checking firefox in PATH
[2026-06-30T17:02:32.790Z TRACE] Checking firefox-esr in PATH
[2026-06-30T17:02:32.790Z TRACE] Checking firefox-beta in PATH
[2026-06-30T17:02:32.790Z DEBUG] Found firefox-beta in PATH: /usr/bin/firefox-beta
[2026-06-30T17:02:32.790Z TRACE] Using shell command to find out firefox version
[2026-06-30T17:02:32.790Z DEBUG] Running command: /usr/bin/firefox-beta -v
[2026-06-30T17:02:32.837Z DEBUG] Output: "Mozilla Firefox 152.0b10"
[2026-06-30T17:02:32.839Z TRACE] The version of firefox is 152.010
[2026-06-30T17:02:32.839Z DEBUG] Detected browser: firefox 152.010
[2026-06-30T17:02:32.839Z DEBUG] Discovered firefox version (152) different to specified browser version (153)
[2026-06-30T17:02:32.839Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T17:02:32.840Z TRACE] Driver TTL is valid. Getting geckodriver version from metadata
[2026-06-30T17:02:32.840Z DEBUG] Required driver: geckodriver 0.37.0
[2026-06-30T17:02:32.840Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-06-30T17:02:32.840Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T17:02:32.840Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-06-30T17:02:32.840Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
[2026-06-30T17:02:32.840Z INFO ] Browser path: /usr/bin/firefox-beta

Is that the expeced/desired behavior?

Thanks again,
Kevin

Comment thread rust/src/firefox.rs
Comment thread rust/src/firefox.rs
@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit eb2b83b

@bonigarcia

Copy link
Copy Markdown
Member Author

Thanks for testing it, @kevinoid. Indeed, the implementation was not fully correct. I tried to fix it. Can you please have a try with the new binary?

selenium-manager-linux

@kevinoid

kevinoid commented Jul 1, 2026

Copy link
Copy Markdown

Thanks for the updates @bonigarcia! This version works correctly for --browser-version dev on my system:

./selenium-manager-linux --browser firefox --browser-version dev --trace log
[2026-07-01T15:24:33.385Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:24:33.385Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:24:33.385Z TRACE] Checking geckodriver in PATH
[2026-07-01T15:24:33.385Z DEBUG] geckodriver not found in PATH
[2026-07-01T15:24:33.385Z TRACE] Checking firefox-devedition in PATH
[2026-07-01T15:24:33.385Z DEBUG] Found firefox-devedition in PATH: /usr/bin/firefox-devedition
[2026-07-01T15:24:33.385Z TRACE] Using shell command to find out firefox version
[2026-07-01T15:24:33.385Z DEBUG] Running command: /usr/bin/firefox-devedition -v
[2026-07-01T15:24:33.420Z DEBUG] Output: "Mozilla Firefox 153.0b3"
[2026-07-01T15:24:33.422Z TRACE] The version of firefox is 153.03
[2026-07-01T15:24:33.422Z DEBUG] Detected browser: firefox 153.03
[2026-07-01T15:24:33.422Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:24:33.422Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:24:33.422Z TRACE] Using Firefox endpoints to find out firefox dev
[2026-07-01T15:24:33.482Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:24:33.482Z DEBUG] Discovered online firefox version (153) is the same as the detected local firefox version
[2026-07-01T15:24:33.482Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:24:33.543Z DEBUG] Valid geckodriver versions for firefox 153: ["0.37.0", "0.36.0", "0.35.0", "0.34.0"]
[2026-07-01T15:24:33.543Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:24:33.543Z DEBUG] Required driver: geckodriver 0.37.0
[2026-07-01T15:24:33.544Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-07-01T15:24:33.544Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:24:33.545Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:24:33.545Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
[2026-07-01T15:24:33.545Z INFO ] Browser path: /usr/bin/firefox-devedition

It also finds firefox-beta for --browser-version beta, but fails to find a geckodriver version (perhaps this is correct?):

./selenium-manager-linux --browser firefox --browser-version beta --trace log
[2026-07-01T15:23:42.312Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:23:42.313Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:23:42.313Z TRACE] Checking geckodriver in PATH
[2026-07-01T15:23:42.314Z DEBUG] geckodriver not found in PATH
[2026-07-01T15:23:42.314Z TRACE] Checking firefox-beta in PATH
[2026-07-01T15:23:42.314Z DEBUG] Found firefox-beta in PATH: /usr/bin/firefox-beta
[2026-07-01T15:23:42.314Z TRACE] Using shell command to find out firefox version
[2026-07-01T15:23:42.314Z DEBUG] Running command: /usr/bin/firefox-beta -v
[2026-07-01T15:23:42.448Z DEBUG] Output: "Mozilla Firefox 152.0b10"
[2026-07-01T15:23:42.450Z TRACE] The version of firefox is 152.010
[2026-07-01T15:23:42.450Z DEBUG] Detected browser: firefox 152.010
[2026-07-01T15:23:42.451Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:23:42.451Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:23:42.451Z TRACE] Using Firefox endpoints to find out firefox beta
[2026-07-01T15:23:42.890Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:23:42.890Z DEBUG] Discovered online firefox version (153) is different to the detected local firefox version (152)
[2026-07-01T15:23:42.890Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:23:42.952Z DEBUG] Valid geckodriver versions for firefox 0: []
[2026-07-01T15:23:42.953Z WARN ] There was an error managing geckodriver (Not valid geckodriver version found for firefox 0. Check available versions at https://github.com/mozilla/geckodriver/releases/); using driver found in the cache
[2026-07-01T15:23:42.953Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
[2026-07-01T15:23:42.953Z INFO ] Browser path: /usr/bin/firefox-beta

Unfortunately, it now fails to find a firefox binary without --browser-version:

./selenium-manager-linux --browser firefox --trace log
[2026-07-01T15:25:56.895Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:56.895Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:25:56.895Z TRACE] Checking geckodriver in PATH
[2026-07-01T15:25:56.895Z DEBUG] geckodriver not found in PATH
[2026-07-01T15:25:56.895Z TRACE] Checking firefox in PATH
[2026-07-01T15:25:56.895Z DEBUG] firefox not found in PATH
[2026-07-01T15:25:56.895Z TRACE] Using shell command to find out firefox version
[2026-07-01T15:25:56.895Z DEBUG] firefox not found in the system
[2026-07-01T15:25:56.895Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:56.895Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:25:57.275Z DEBUG] Valid geckodriver versions for firefox 0: []
[2026-07-01T15:25:57.276Z WARN ] There was an error managing geckodriver (Not valid geckodriver version found for firefox 0. Check available versions at https://github.com/mozilla/geckodriver/releases/); using driver found in the cache
[2026-07-01T15:25:57.276Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver

It also fails to find firefox when --browser-version is a version number:

./selenium-manager-linux --browser firefox --browser-version 152 --trace log
[2026-07-01T15:25:09.313Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:09.313Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:25:09.313Z TRACE] Checking geckodriver in PATH
[2026-07-01T15:25:09.313Z DEBUG] geckodriver not found in PATH
[2026-07-01T15:25:09.313Z TRACE] Checking firefox in PATH
[2026-07-01T15:25:09.313Z DEBUG] firefox not found in PATH
[2026-07-01T15:25:09.313Z TRACE] Using shell command to find out firefox version
[2026-07-01T15:25:09.313Z DEBUG] firefox 152 not found in the system
[2026-07-01T15:25:09.313Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:09.313Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:25:09.372Z DEBUG] Valid geckodriver versions for firefox 152: ["0.37.0", "0.36.0", "0.35.0", "0.34.0"]
[2026-07-01T15:25:09.372Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:09.372Z DEBUG] Required driver: geckodriver 0.37.0
[2026-07-01T15:25:09.372Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-07-01T15:25:09.372Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:09.373Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:09.374Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
./selenium-manager-linux --browser firefox --browser-version 153 --trace log
[2026-07-01T15:25:31.373Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:31.373Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:25:31.373Z TRACE] Checking geckodriver in PATH
[2026-07-01T15:25:31.373Z DEBUG] geckodriver not found in PATH
[2026-07-01T15:25:31.373Z TRACE] Checking firefox in PATH
[2026-07-01T15:25:31.373Z DEBUG] firefox not found in PATH
[2026-07-01T15:25:31.373Z TRACE] Using shell command to find out firefox version
[2026-07-01T15:25:31.373Z DEBUG] firefox 153 not found in the system
[2026-07-01T15:25:31.373Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:31.373Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-01T15:25:31.440Z DEBUG] Valid geckodriver versions for firefox 153: ["0.37.0", "0.36.0", "0.35.0", "0.34.0"]
[2026-07-01T15:25:31.440Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:31.440Z DEBUG] Required driver: geckodriver 0.37.0
[2026-07-01T15:25:31.440Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-07-01T15:25:31.440Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:31.440Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-01T15:25:31.441Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver

Thanks again for working on it,
Kevin

@bonigarcia

Copy link
Copy Markdown
Member Author

@kevinoid. Thanks for testing, it. But I am unable to reproduce your problems. I don't understand a couple of parts of your execution. First, these traces:

[2026-07-01T15:23:42.952Z DEBUG] Valid geckodriver versions for firefox 0: []

For some reason, Selenium Manager is not able to keep the Firefox version at that point. That 0 should be the Firefox version. For example, as executed in my machine:

boni@slimbook:~/Downloads$ ./selenium-manager-linux --browser firefox --debug --browser-version beta
[2026-07-01T16:11:13.878Z DEBUG] Sending stats to Plausible: Props { browser: "firefox", browser_version: "beta", os: "linux", arch: "x86_64", lang: "", selenium_version: "4.46-nightly" }
[2026-07-01T16:11:13.879Z DEBUG] geckodriver not found in PATH
[2026-07-01T16:11:13.879Z DEBUG] Found firefox-beta in PATH: /usr/bin/firefox-beta
[2026-07-01T16:11:13.879Z DEBUG] Running command: /usr/bin/firefox-beta -v
[2026-07-01T16:11:13.881Z DEBUG] Output: "Mozilla Firefox 152.0b10"
[2026-07-01T16:11:13.885Z DEBUG] Detected browser: firefox 152.010
[2026-07-01T16:11:13.898Z DEBUG] Discovered online firefox version (153) is different to the detected local firefox version (152)
[2026-07-01T16:11:13.899Z DEBUG] Required browser: firefox 153.0b6
[2026-07-01T16:11:13.899Z DEBUG] Acquiring lock: /home/boni/.cache/selenium/firefox/linux64/153.0b6/sm.lock
[2026-07-01T16:11:13.899Z DEBUG] Downloading firefox 153.0b6 from https://ftp.mozilla.org/pub/firefox/releases/153.0b6/linux-x86_64/en-US/firefox-153.0b6.tar.xz
[2026-07-01T16:11:26.629Z DEBUG] firefox 153.0b6 is available at /home/boni/.cache/selenium/firefox/linux64/153.0b6/firefox
[2026-07-01T16:11:26.641Z DEBUG] Valid geckodriver versions for firefox 153: ["0.37.0", "0.36.0", "0.35.0", "0.34.0"]
[2026-07-01T16:11:26.641Z DEBUG] Required driver: geckodriver 0.37.0
[2026-07-01T16:11:26.641Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-07-01T16:11:26.642Z INFO ] Driver path: /home/boni/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
[2026-07-01T16:11:26.642Z INFO ] Browser path: /home/boni/.cache/selenium/firefox/linux64/153.0b6/firefox

Second, in all of your executions, there is a couple of the following traces:

[2026-07-01T15:24:33.385Z TRACE] Metadata file does not exist. Creating a new one

Which means that Selenium Manager tries to create the metadata file twice. Which makes no sense to me, since the first time the metadata file does not exist, it is created by Selenium Manager. So it should be there the second time this file is read (which happens a few ms after). I don't have an explanation for that. Do you have some special settings in your cache folder?

@kevinoid

kevinoid commented Jul 1, 2026

Copy link
Copy Markdown

Here's my ~/.cache/selenium/se-config.toml:

avoid-browser-download = true
avoid-stats = true

Is there anything else I can do to help investigate the behavior we are observing? I'd be happy to run other debug builds with more logging, send strace, or possibly run under a debugger to step through what's going on.

Comment thread rust/src/lib.rs
@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 70d00d1

@bonigarcia

Copy link
Copy Markdown
Member Author

@kevinoid Indeed, the use of --avoid-browser-download change things. I added a condition for that in the PR. Please have a try with the new binary:

selenium-manager-linux

In any case, two of your tests are going to continue failing:

./selenium-manager-linux --browser firefox --trace
./selenium-manager-linux --browser firefox --browser-version 153 --trace

Regarding the first one, it makes senses that this execution fail since you are requesting to use Firefox (stable, by default), and it is not installed in your system (it seem it installed beta, dev, etc.) but not stable. And you are specifying not download browsers. So it makes sense a failure to me.

The second is a bit different since you are specifying a fixed version but you are avoiding browser download. Even when the unstable might correspond to that version, Selenium Manager does not check every single possibility.

@kevinoid

kevinoid commented Jul 2, 2026

Copy link
Copy Markdown

Indeed, the use of --avoid-browser-download change things.

My apologies for not checking it sooner! Thanks for adding support for this configuration as well.

Please have a try with the new binary:

It appears to be behaving as expected, as far as I can see: --browser-version beta and dev are found. The others are "not found in the system":

./selenium-manager-linux --browser firefox --trace log
[2026-07-02T16:42:09.842Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:09.842Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:09.842Z TRACE] Checking geckodriver in PATH
[2026-07-02T16:42:09.843Z DEBUG] geckodriver not found in PATH
[2026-07-02T16:42:09.843Z TRACE] Checking firefox in PATH
[2026-07-02T16:42:09.843Z DEBUG] firefox not found in PATH
[2026-07-02T16:42:09.843Z TRACE] Using shell command to find out firefox version
[2026-07-02T16:42:09.843Z DEBUG] firefox not found in the system
[2026-07-02T16:42:09.843Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:09.843Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:09.902Z DEBUG] Valid geckodriver versions for firefox 0: []
[2026-07-02T16:42:09.903Z WARN ] There was an error managing geckodriver (Not valid geckodriver version found for firefox 0. Check available versions at https://github.com/mozilla/geckodriver/releases/); using driver found in the cache
[2026-07-02T16:42:09.903Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
./selenium-manager-linux --browser firefox --browser-version beta --trace log
[2026-07-02T16:42:09.922Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:09.922Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:09.922Z TRACE] Checking geckodriver in PATH
[2026-07-02T16:42:09.923Z DEBUG] geckodriver not found in PATH
[2026-07-02T16:42:09.923Z TRACE] Checking firefox-beta in PATH
[2026-07-02T16:42:09.923Z DEBUG] Found firefox-beta in PATH: /usr/bin/firefox-beta
[2026-07-02T16:42:09.923Z TRACE] Using shell command to find out firefox version
[2026-07-02T16:42:09.923Z DEBUG] Running command: /usr/bin/firefox-beta -v
[2026-07-02T16:42:09.980Z DEBUG] Output: "Mozilla Firefox 152.0b10"
[2026-07-02T16:42:09.982Z TRACE] The version of firefox is 152.010
[2026-07-02T16:42:09.982Z DEBUG] Detected browser: firefox 152.010
[2026-07-02T16:42:09.982Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:09.982Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:09.982Z TRACE] Using Firefox endpoints to find out firefox beta
[2026-07-02T16:42:10.040Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.040Z DEBUG] Discovered online firefox version (153) is different to the detected local firefox version (152)
[2026-07-02T16:42:10.040Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.101Z DEBUG] Valid geckodriver versions for firefox 152: ["0.37.0", "0.36.0", "0.35.0", "0.34.0"]
[2026-07-02T16:42:10.101Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.101Z DEBUG] Required driver: geckodriver 0.37.0
[2026-07-02T16:42:10.102Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-07-02T16:42:10.102Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.103Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.110Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
[2026-07-02T16:42:10.110Z INFO ] Browser path: /usr/bin/firefox-beta
./selenium-manager-linux --browser firefox --browser-version dev --trace log
[2026-07-02T16:42:10.130Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.130Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:10.130Z TRACE] Checking geckodriver in PATH
[2026-07-02T16:42:10.131Z DEBUG] geckodriver not found in PATH
[2026-07-02T16:42:10.131Z TRACE] Checking firefox-devedition in PATH
[2026-07-02T16:42:10.131Z DEBUG] Found firefox-devedition in PATH: /usr/bin/firefox-devedition
[2026-07-02T16:42:10.131Z TRACE] Using shell command to find out firefox version
[2026-07-02T16:42:10.131Z DEBUG] Running command: /usr/bin/firefox-devedition -v
[2026-07-02T16:42:10.187Z DEBUG] Output: "Mozilla Firefox 153.0b3"
[2026-07-02T16:42:10.190Z TRACE] The version of firefox is 153.03
[2026-07-02T16:42:10.190Z DEBUG] Detected browser: firefox 153.03
[2026-07-02T16:42:10.190Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.190Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:10.190Z TRACE] Using Firefox endpoints to find out firefox dev
[2026-07-02T16:42:10.245Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.245Z DEBUG] Discovered online firefox version (153) is the same as the detected local firefox version
[2026-07-02T16:42:10.245Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.303Z DEBUG] Valid geckodriver versions for firefox 153: ["0.37.0", "0.36.0", "0.35.0", "0.34.0"]
[2026-07-02T16:42:10.304Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.304Z DEBUG] Required driver: geckodriver 0.37.0
[2026-07-02T16:42:10.304Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-07-02T16:42:10.304Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.305Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.312Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
[2026-07-02T16:42:10.312Z INFO ] Browser path: /usr/bin/firefox-devedition
./selenium-manager-linux --browser firefox --browser-version 152 --trace log
[2026-07-02T16:42:10.332Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.332Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:10.332Z TRACE] Checking geckodriver in PATH
[2026-07-02T16:42:10.333Z DEBUG] geckodriver not found in PATH
[2026-07-02T16:42:10.333Z TRACE] Checking firefox in PATH
[2026-07-02T16:42:10.333Z DEBUG] firefox not found in PATH
[2026-07-02T16:42:10.333Z TRACE] Using shell command to find out firefox version
[2026-07-02T16:42:10.333Z DEBUG] firefox 152 not found in the system
[2026-07-02T16:42:10.333Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.333Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:10.395Z DEBUG] Valid geckodriver versions for firefox 152: ["0.37.0", "0.36.0", "0.35.0", "0.34.0"]
[2026-07-02T16:42:10.395Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.396Z DEBUG] Required driver: geckodriver 0.37.0
[2026-07-02T16:42:10.396Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-07-02T16:42:10.396Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.397Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.397Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver
./selenium-manager-linux --browser firefox --browser-version 153 --trace log
[2026-07-02T16:42:10.417Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.417Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:10.417Z TRACE] Checking geckodriver in PATH
[2026-07-02T16:42:10.418Z DEBUG] geckodriver not found in PATH
[2026-07-02T16:42:10.418Z TRACE] Checking firefox in PATH
[2026-07-02T16:42:10.418Z DEBUG] firefox not found in PATH
[2026-07-02T16:42:10.418Z TRACE] Using shell command to find out firefox version
[2026-07-02T16:42:10.418Z DEBUG] firefox 153 not found in the system
[2026-07-02T16:42:10.418Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.418Z TRACE] Metadata file does not exist. Creating a new one
[2026-07-02T16:42:10.477Z DEBUG] Valid geckodriver versions for firefox 153: ["0.37.0", "0.36.0", "0.35.0", "0.34.0"]
[2026-07-02T16:42:10.477Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.477Z DEBUG] Required driver: geckodriver 0.37.0
[2026-07-02T16:42:10.477Z DEBUG] geckodriver 0.37.0 already in the cache
[2026-07-02T16:42:10.477Z TRACE] Reading metadata from /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.478Z TRACE] Writing metadata to /home/kevin/.cache/selenium/se-metadata.json
[2026-07-02T16:42:10.478Z INFO ] Driver path: /home/kevin/.cache/selenium/geckodriver/linux64/0.37.0/geckodriver

it makes senses that this execution fail since you are requesting to use Firefox (stable, by default), and it is not installed in your system (it seem it installed beta, dev, etc.) but not stable.

Ah, I see. That makes a certain amount of sense. We'll probably want to match the behavior of the other browsers? I think chrome behaves the way you describe (based on get_browser_path_map) so that seems correct to me.

I would have expected --browser-version stable to request only stable and no --browser-version to include any available version, but that's probably better discussed in a separate issue, if at all.

Even when the unstable might correspond to that version, Selenium Manager does not check every single possibility.

I see. That makes sense too. I would have expected Selenium Manager to select from available versions, but that is also probably better discussed in a separate issue, if at all.

Thanks again @bonigarcia, it's looking great! LGTM!

Comment thread rust/src/firefox.rs
Comment thread rust/src/firefox.rs
@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 87bce21

@bonigarcia bonigarcia merged commit 79f3706 into trunk Jul 2, 2026
62 checks passed
@bonigarcia bonigarcia deleted the sm_firefox_linux branch July 2, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-manager Selenium Manager C-rust Rust code is mostly Selenium Manager

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: SM doesn't find firefox-beta/firefox-devedition

3 participants