Ubuntu's selenium hardcodes a path that is valid for Debian, but not for Ubuntu

Bug #1667208 reported by Rogério Theodoro de Brito
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
chromium-browser (Ubuntu)
Fix Released
Medium
Olivier Tilloy
python-selenium (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hi.

The package python{,3}-selenium uses a hardcoded path of '/usr/lib/chromium/chromedriver' when instantiating a Chrome webdriver.

That path is correct for Debian (in particular, it was directly inherited from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=805733#5), but since Ubuntu uses chromium-browser instead of Debian's chromium naming. The package chromium-chromedriver in Ubuntu installs the webdriver at '/usr/lib/chromium-browser/chromedriver'.

There needs to be a synchronization between the selenium Python module and the webdriver package.

Thanks,

Rogério Brito.

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: python3-selenium 2.53.2+dfsg1-1
Uname: Linux 4.10.0-041000-generic x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
CurrentDesktop: MATE
Date: Thu Feb 23 01:38:24 2017
Dependencies:

InstallationDate: Installed on 2016-12-11 (73 days ago)
InstallationMedia: Ubuntu-MATE 16.10 "Yakkety Yak" - Release amd64 (20161012.1)
PackageArchitecture: all
SourcePackage: python-selenium
UpgradeStatus: Upgraded to zesty on 2017-01-31 (23 days ago)

Revision history for this message
Rogério Theodoro de Brito (rbrito) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python-selenium (Ubuntu):
status: New → Confirmed
Revision history for this message
Grégoire (gregoire-zjyto) wrote :

I'd like to add the resulting error is not very helpful.
Here's the error message I get

WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

Adding the path to chromedriver to PATH like this doesn't actually help:

export PATH=$PATH:/usr/lib/chromium-browser

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

This will be fixed in chromium itself, to behave how Debian does

affects: python-selenium (Ubuntu) → chromium (Ubuntu)
affects: chromium (Ubuntu) → chromium-browser (Ubuntu)
Changed in python-selenium (Ubuntu):
status: New → Invalid
Revision history for this message
Olivier Tilloy (osomon) wrote :

Note that when using python{,3}-selenium, the default path can be overridden like that:

  from selenium import webdriver
  driver = webdriver.Chrome(executable_path="/usr/lib/chromium-browser/chromedriver")

Olivier Tilloy (osomon)
Changed in chromium-browser (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
status: Confirmed → In Progress
importance: Undecided → Medium
Olivier Tilloy (osomon)
Changed in chromium-browser (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package chromium-browser - 72.0.3626.119-0ubuntu0.18.10.1

---------------
chromium-browser (72.0.3626.119-0ubuntu0.18.10.1) cosmic; urgency=medium

  * Upstream release: 72.0.3626.119
  * debian/patches/gn-fix-link-pthread.patch: added

 -- Olivier Tilloy <email address hidden> Mon, 25 Feb 2019 12:00:37 +0100

Changed in chromium-browser (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package chromium-browser - 72.0.3626.119-0ubuntu0.18.04.1

---------------
chromium-browser (72.0.3626.119-0ubuntu0.18.04.1) bionic; urgency=medium

  * Upstream release: 72.0.3626.119
  * debian/patches/gn-fix-link-pthread.patch: added

 -- Olivier Tilloy <email address hidden> Mon, 25 Feb 2019 15:56:06 +0100

Changed in chromium-browser (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brett Keller (blkeller) wrote :

While I'm happy to see this fix released, I'm not so happy that it broke all of our company's Selenium-based scripts running on Ubuntu 16.04 by making a non-backwards-compatible change in an LTS release. All of our scripts had been written to accommodate the "buggy" behavior that has been present since Xenial's release by specifying the ChromeDriver path at '/usr/lib/chromium-browser/chromedriver'. Now, after applying the latest security updates, these scripts are finding that their ChromeDriver has gone missing.

In order to provide backwards-compatibility on the LTS releases, could you please provide (in a packaging update) a symlink at the old '/usr/lib/chromium-browser/chromedriver' location pointing to the new '/usr/bin/chromedriver' location?

Thanks for your consideration of this request.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Sorry about that oversight Brett. I'll provide a packaging update to fix that.

Changed in chromium-browser (Ubuntu):
status: Fix Released → Confirmed
Olivier Tilloy (osomon)
Changed in chromium-browser (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package chromium-browser - 73.0.3683.75-0ubuntu3

---------------
chromium-browser (73.0.3683.75-0ubuntu3) disco; urgency=medium

  * debian/patches/fix-build-with-libstdc++.patch: added

 -- Olivier Tilloy <email address hidden> Wed, 13 Mar 2019 21:12:47 +0100

Changed in chromium-browser (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brett Keller (blkeller) wrote :

Thanks for the symlink, Oliver. My machines just started picking up this update today. Much appreciated!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.