Skip to content

[🐛 Bug]: selenium-manager disregards --driver-mirror-url when retrieving the geckodriver index document #13941

@BernMcCarty

Description

@BernMcCarty

What happened?

Unlike edge.rs and chrome.rs, firefox.rs contains a hardcoded URL for the driver index document (see the constant DRIVER_VERSIONS_URL). One could consider this alright if you consider only the fact that the index document contains no URLs that require transformation to point to the specified driver mirror, however, if in an environment that blocks access to githubusercontent.com, that alone could be the motivation to use a local mirror in the first place. That is our situation. We have set up a local mirror and it works for chrome and edge, but it does not work for firefox due to this bug.

How can we reproduce the issue?

PS C:\Users\auser\selenium-manager\windows> .\selenium-manager.exe --cache-path C:\temp\se --driver GeckoDriver --driver-mirror-url <your-gecko-mirror-url-here> --os windows --arch x64 --debug --trace --avoid-browser-download

Relevant log output

[2024-05-14T14:34:17.467Z TRACE] Reading metadata from C:\temp\se\se-metadata.json
[2024-05-14T14:34:17.472Z TRACE] Metadata file does not exist. Creating a new one
[2024-05-14T14:34:17.473Z DEBUG] Sending stats to Plausible: Props { browser: "firefox", browser_version: "", os: "windows", arch: "x64", lang: "", selenium_version: "4.20" }
[2024-05-14T14:34:17.474Z TRACE] Writing metadata to C:\temp\se\se-metadata.json
[2024-05-14T14:34:17.477Z TRACE] Checking geckodriver in PATH
[2024-05-14T14:34:17.534Z DEBUG] geckodriver not found in PATH
[2024-05-14T14:34:17.535Z DEBUG] firefox detected at C:\Program Files\Mozilla Firefox\firefox.exe
[2024-05-14T14:34:17.537Z TRACE] Path C:\Program Files\Mozilla Firefox\firefox.exe has been escaped to C:\\Program Files\\Mozilla Firefox\\firefox.exe
[2024-05-14T14:34:17.542Z TRACE] Using shell command to find out firefox version
[2024-05-14T14:34:17.543Z DEBUG] Running command: wmic datafile where name='C:\\Program Files\\Mozilla Firefox\\firefox.exe' get Version /value
[2024-05-14T14:34:17.811Z DEBUG] Output: "\r\r\n\r\r\nVersion=125.0.2.8875\r\r\n\r\r\n\r\r\n\r"
[2024-05-14T14:34:17.813Z TRACE] The version of firefox is 125.0.2.8875
[2024-05-14T14:34:17.814Z DEBUG] Detected browser: firefox 125.0.2.8875
[2024-05-14T14:34:17.819Z TRACE] Reading metadata from C:\temp\se\se-metadata.json
[2024-05-14T14:34:18.060Z WARN ] Problem reading geckodriver versions: Error parsing JSON from URL https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/common/geckodriver/geckodriver-support.json expected value at line 1 column 1. Using latest geckodriver version
[2024-05-14T14:34:18.343Z TRACE] Writing metadata to C:\temp\se\se-metadata.json
[2024-05-14T14:34:18.346Z ERROR] The geckodriver version cannot be discovered

Operating System

Windows 10

Selenium version

4.20.0

What are the browser(s) and version(s) where you see this issue?

All GeckoDriver versions

What are the browser driver(s) and version(s) where you see this issue?

All firefox versions that include selenium-manager

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-rustRust code is mostly Selenium ManagerI-defectSomething is not working as intendedR-help wantedIssues looking for contributions

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions