Bug 2278096 - Unable to obtain working Selenium Manager binary after Fedora 40 upgrade
Summary: Unable to obtain working Selenium Manager binary after Fedora 40 upgrade
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-selenium
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2365541 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-01 06:08 UTC by Jeffrey Walton
Modified: 2025-10-14 15:36 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-16 08:14:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jeffrey Walton 2024-05-01 06:08:57 UTC
I upgraded from Fedora 39 to Fedora 40 on April 24. The machine is fully patched F40, x86_64.

Today I noticed my Selenium scripts no longer work. My scripts drive Firefox, not Chrome. The error is shown below.

The firefox version on this machine is:

   $ firefox --version
   Mozilla Firefox 125.0.2

Gecko-driver is version 0.34.0 downloaded from <https://github.com/mozilla/geckodriver>. In particular, <https://github.com/mozilla/geckodriver/releases/tag/v0.34.0>. Then, the driver is placed at </usr/bin/geckodriver> to make it easy to find.

   $ ls -Al /usr/bin/geckodriver 
   -rwxr-xr-x. 1 root root 10413536 Jan  2 16:38 /usr/bin/geckodriver

   $ geckodriver --version
   geckodriver 0.34.0 (c44f0d09630a 2024-01-02 15:36 +0000)

(For some reason, Gecko-driver is not packaged and installed with Firefox (Chrome packages the browser and driver together, iirc)).

I see a similar issue at <https://github.com/SeleniumHQ/selenium/issues/12392>, but it is not clear to me what was wrong or how it was fixed. There's also an unanswered Stack Overflow question at <https://stackoverflow.com/questions/77799094/unable-to-obtain-working-selenium-manager-binary>.

I'm not a Python guy, so I may be of limited help in troubleshooting. But suggestions are welcomed until this gets fixed.

-----

<BEGIN ERROR>
(ftc) Starting driver
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 38, in get_path
    path = SeleniumManager().driver_location(options) if path is None else path
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 89, in driver_location
    args = [str(self.get_binary()), "--browser", browser]
                ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/selenium/webdriver/common/selenium_manager.py", line 73, in get_binary
    raise WebDriverException(f"Unable to obtain working Selenium Manager binary; {path}")

selenium.common.exceptions.WebDriverException: Message: Unable to obtain working Selenium Manager binary; /usr/lib/python3.12/site-packages/selenium/webdriver/common/linux/selenium-manager

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/jwalton/callboot/ftc.py", line 404, in <module>
    main()
  File "/home/jwalton/callboot/ftc.py", line 169, in main
    driver = webdriver.Firefox(options=opts)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/selenium/webdriver/firefox/webdriver.py", line 59, in __init__
    self.service.path = DriverFinder.get_path(self.service, options)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/selenium/webdriver/common/driver_finder.py", line 41, in get_path
    raise NoSuchDriverException(msg) from err

selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for firefox using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
</END ERROR>

Regarding the path of </usr/lib/python3.12/site-packages/selenium/webdriver/common/linux/selenium-manager>:

   root@callboot:~# find / -name selenium-manager
   root@callboot:~# find / -name selenium-manager.py
   root@callboot:~#

I am not sure what to make of that.

Reproducible: Always

Steps to Reproduce:
Install Firefox using DNF. Install Gecko-driver from GitHub.

Attempt to run a Selenium script.
Actual Results:  
Python and selenium.common.exceptions.NoSuchDriverException

Expected Results:  
The script should run.

Comment 1 Carl Byington 2024-05-20 22:23:52 UTC
I had the same problem. It seems to be a packaging issue. /usr/lib/python3.12/site-packages/selenium/webdriver/common/linux/selenium-manager does not exist, but should be installed from the python3-selenium package.


cd /tmp

curl https://files.pythonhosted.org/packages/df/cc/d6caa96d89c4a81a0603080a8ea95c952be32076a7d54f4a82d9ff5f4480/selenium-4.21.0.tar.gz >selenium-4.21.0.tar.gz

tar xfz selenium-4.21.0.tar.gz

cd /usr/lib/python3.12/site-packages/selenium/webdriver/common/

mkdir linux

mv /tmp/selenium-4.21.0/selenium/webdriver/common/linux/selenium-manager linux

chown root:root linux/selenium-manager

chmod 755       linux/selenium-manager

Comment 2 Artur Frenszek-Iwicki 2024-05-21 10:19:02 UTC
From what I can see, selenium/webdriver/common/linux/selenium-manager inside the upstream archive in an ELF executable, not a python script.
Prebuilt binaries are forbidden in Fedora (sans exceptions for firmware), so we'll have to figure out how upstream builds this executable.

Comment 3 Jeffrey Walton 2024-05-21 11:34:26 UTC
(In reply to Carl Byington from comment #1)
> I had the same problem. It seems to be a packaging issue.
> /usr/lib/python3.12/site-packages/selenium/webdriver/common/linux/selenium-
> manager does not exist, but should be installed from the python3-selenium
> package.
> 
> 
> cd /tmp
> 
> curl
> https://files.pythonhosted.org/packages/df/cc/
> d6caa96d89c4a81a0603080a8ea95c952be32076a7d54f4a82d9ff5f4480/selenium-4.21.0.
> tar.gz >selenium-4.21.0.tar.gz
> 
> tar xfz selenium-4.21.0.tar.gz
> 
> cd /usr/lib/python3.12/site-packages/selenium/webdriver/common/
> 
> mkdir linux
> 
> mv /tmp/selenium-4.21.0/selenium/webdriver/common/linux/selenium-manager
> linux
> 
> chown root:root linux/selenium-manager
> 
> chmod 755       linux/selenium-manager

Thanks Carl.

It is unfortunate the Selenium folks did not supply simple instructions like you did. (or I could not find them reading through <https://github.com/SeleniumHQ/selenium>).

But I suppose that's what we should expect from web developers. The bar is so low for them.

Jeff

Comment 4 Michel Lind 2024-08-30 16:08:29 UTC
Are you folks OK if I add a README.Fedora linking to the Selenium Manager overview for now?

https://www.selenium.dev/blog/2022/introducing-selenium-manager/

Looks like they'll eventually release this properly, but... who knows when that will be, it's been two years

Comment 5 Michael J Gruber 2024-10-05 17:11:04 UTC
(In reply to Michel Lind from comment #4)
> Are you folks OK if I add a README.Fedora linking to the Selenium Manager
> overview for now?
> 
> https://www.selenium.dev/blog/2022/introducing-selenium-manager/
> 
> Looks like they'll eventually release this properly, but... who knows when
> that will be, it's been two years

That's OK, of course, since you can't ship binaries.

It's somewhat disappointing that without selenium manager, selenium does not even find the drivers on PATH. I mean, we don't need a manager for that, do we? (Complaining about selenium here, not the packager.) Could we come up with a stub which does just that?

For now, we have to use webdriver.FirefoxService() and the like just because webdriver.Firefox() does not have a path argument. The following at least got me running. WARNING UGLY HACK AHEAD

```
import os
from selenium import webdriver
service = webdriver.FirefoxService(executable_path=os.path.expanduser('~/bin/geckodriver'))
driver = webdriver.Firefox(service=service)
```
Did I say ugly?

Comment 6 Michael J Gruber 2024-10-05 19:38:56 UTC
Or substitute that:
```
import shutil
service = webdriver.FirefoxService(executable_path=shutil.which('geckodriver'))
```

The "culprit" upstream appears to be: 6176d7ec65 ("[py] use Selenium Manager to locate drivers on PATH (#12356)", 2023-07-13)
I'm not sure we want to carry a revert, though.

Comment 7 Shania Twain 2024-10-14 06:40:56 UTC Comment hidden (spam)
Comment 8 Michael J Gruber 2024-10-14 06:58:59 UTC
(In reply to Shania Twain from comment #7)
> (In reply to Michel Lind from comment #4)
> > Are you folks OK if I add a README.Fedora linking to the Selenium Manager
> > overview for now?
> > 
> > https://www.selenium.dev/blog/2022/introducing-selenium-manager/https://2player.co/
> > 
> > Looks like they'll eventually release this properly, but... who knows when
> > that will be, it's been two years
> 
> How might adding a README.Fedora file linking to the Selenium Manager
> overview impact Fedora users' experience with Selenium?

It explains why working setups broke but does not help users unbreak things, does it? For that we would need to point them to a download site for the manager.

For someone with a previously working setup comment #6 may be the minimal change required, and I still feel we could patch Fedora's selenium to do just that, or revert the mentioned upstream commit, so that those setups work again without changing any user scripts.

As for the download site: It's not that different from having to download a (binary) selenium driver after all. But it'd better an "official" site.

Comment 9 Michael J Gruber 2024-10-14 16:44:07 UTC
So, I downloaded the manager and put it on $PATH. The manager finds my drivers in ~/bin.
Alas: selenium does not find the manager in ~/bin!
Apparantly (and unless I read the traceback wrong), selenium expects the manager at
/usr/lib/python3.12/site-packages/selenium/webdriver/common/linux/selenium-manager
meaning that users cannot even solve the situation by downloading the manager and putting it on PATH.

That's unfortunate, as our package may come across as "dysfunctional" (which it is not).

Comment 10 Jeffrey Walton 2024-10-14 16:51:11 UTC
> meaning that users cannot even solve the situation by downloading the manager and putting it on PATH.

Correct (at least in my case). That is what is so frustrating (to me) -- the manager and web driver are on path, but the tooling cannot find it.

Who thought that was a good idea...

Comment 11 Michael J Gruber 2024-10-18 16:28:25 UTC
So, here's a simple change which makes at least a selenium-manager on PATH work:

https://src.fedoraproject.org/rpms/python-selenium/pull-request/9

Comment 12 Fedora End Of Life 2024-11-20 14:38:05 UTC
> (In reply to Michel Lind from comment #4)
> > Are you folks OK if I add a README.Fedora linking to the Selenium Manager
> > overview for now?
> > 
> > https://www.selenium.dev/blog/2022/introducing-selenium-manager/ https://tubidydownload.nu https://tubidycom.nu
> > 
> > Looks like they'll eventually release this properly, but... who knows when
> > that will be, it's been two years
> 
> How might adding a README.Fedora file linking to the Selenium Manager
> overview impact Fedora users' experience with Selenium?

This explains why previously functioning setups broke but doesn't directly assist users in fixing them. To resolve this, users would need access to a reliable download site for the manager.

For users with previously functional setups, applying the changes mentioned in comment #6 might be the simplest solution. It’s worth considering whether Fedora’s Selenium package could include a patch to implement these changes or revert the upstream commit to ensure existing setups continue to work without requiring script modifications from users.

Regarding the download site, it’s not significantly different from needing to download a binary Selenium driver. However, it would be preferable for this to be hosted on an "official" and trustworthy platform.

Comment 13 Vít Ondruch 2024-12-23 11:48:26 UTC
Hi, working on update of rubygem-selenium-webdriver, I am now facing similar issues what to do with the selenium-manager. While I have zero knowledge about the Python bindings, I leave here several notes.


1) I have some success (at least running test suite) setting something like `SE_CHROMEDRIVER=chromedriver` env variable. This bypasses part of the logic where selenium-manager would be needed. I would not be surprised if there was a way get around selenium manager by similar env variable in Python binding.

2) Ruby bindings supports `SE_MANAGER_PATH` env variable, so the `selenium-manager` can be placed on whatever suitable place.

3) This is typical output of `selenium-manager`:

~~~
$ bin/linux/selenium-manager --browser chrome --output json
{
  "logs": [
    {
      "level": "WARN",
      "timestamp": 1734953898,
      "message": "Exception managing chrome: error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json)"
    },
    {
      "level": "INFO",
      "timestamp": 1734953898,
      "message": "Driver path: /usr/bin/chromedriver"
    },
    {
      "level": "INFO",
      "timestamp": 1734953898,
      "message": "Browser path: /usr/bin/chromium-browser"
    }
  ],
  "result": {
    "code": 0,
    "message": "",
    "driver_path": "/usr/bin/chromedriver",
    "browser_path": "/usr/bin/chromium-browser"
  }
}
~~~

I am considering to supply some stub `selenium-manager`, similar to [1]. But it would provide integration for chromedriver which is available in Fedora. So I am thinking about detecting the `--browser chrome` option and availability of `chromium` and in that case just providing the following output:

~~~
{
  "result": {
    "code": 0,
    "message": "",
    "driver_path": "/usr/bin/chromedriver",
    "browser_path": "/usr/bin/chromium-browser"
  }
}
~~~

Considering you'd like to use similar approach in Python, I'll likely write it in Bash instead of Ruby ;)

4) Finally, there is description how to build selenium-manager:

https://www.selenium.dev/documentation/selenium_manager/#building-a-custom-selenium-manager

I think it could very well be independent package, where Python/Ruby would just symlink the executable. Anybody willing to package this?



[1]: https://src.fedoraproject.org/rpms/python-selenium/pull-request/9

Comment 14 Vít Ondruch 2024-12-23 16:50:14 UTC
(In reply to Vít Ondruch from comment #13)
> I am considering to supply some stub `selenium-manager`, similar to [1].

I have end up with this:

https://src.fedoraproject.org/rpms/rubygem-selenium-webdriver/blob/e6f3718b59761f73119fc266b4ec4ef597007f70/f/selenium-manager

Not really sure how well this is going to work in practice 🤷

Comment 15 TomasJuhasz 2025-01-02 15:03:52 UTC
Hi,
I submitted the packaged selenium-manager to the review process: https://bugzilla.redhat.com/show_bug.cgi?id=2335285
Please check it out and provide any feedback if you can.

Comment 16 Jeffrey Walton 2025-02-02 09:18:24 UTC
In case this did not make your radar... Selenium 4.28.1 was released. And names have changed.

$ cd ~/tmp/selenium-4.28.1
$ find -name 'selenium*'
./selenium
./selenium/webdriver/common/selenium_manager.py

So the manager name changed from 'selenium-manager' to 'selenium_manager.py'.

And there is no longer a 'selenium/webdriver/common/linux'. The 'linux' part was removed, and it is now 'selenium/webdriver/common'.

Comment 17 Aoife Moloney 2025-04-25 10:34:34 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 18 Aoife Moloney 2025-05-16 08:14:43 UTC
Fedora Linux 40 entered end-of-life (EOL) status on 2025-05-13.

Fedora Linux 40 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 19 Red Hat Bugzilla 2025-09-14 04:25:22 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days

Comment 20 Michael J Gruber 2025-10-14 15:35:17 UTC
Reopening since this is still not resolved in F44 nor F43 on a fresh install.

The fix from https://src.fedoraproject.org/rpms/python-selenium/pull-request/9 still seems to cover it, at least for me locally. This is with the now packaged selenium-manager.

Could we get a response from the maintainer please?

Comment 21 Michael J Gruber 2025-10-14 15:36:37 UTC
*** Bug 2365541 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.