Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install-chromedriver command puts 'chromedriver' binary at unexpected location for Chrome 115 #81

Closed
frerich opened this issue Jul 19, 2023 · 5 comments
Assignees

Comments

@frerich
Copy link

frerich commented Jul 19, 2023

Orb version

1.4.2

What happened

CI builds expecting that the install-chromedriver commands puts a binary at /usr/local/bin/chromedriver started failing. This only appeared with Chrome 115. These days, the binary appears to end up in /usr/local/bin/chromedriver/chromedriver.

Expected behavior

The chromedriver binary should always end up in the directory specified by the install-dir option. By default, this would be /usr/local/bin. Thus, after successful execution of the instal-chromedriver command, there should be a binary /usr/local/bin/chromedriver.

Further observations

It appears that the structure of chromedriver ZIP files changed slightly: with Chromedriver 114 I get

/tmp % curl -LO https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip && unzip -l chromedriver_linux64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7233k  100 7233k    0     0  5011k      0  0:00:01  0:00:01 --:--:-- 5030k
Archive:  chromedriver_linux64.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
 15039112  05-27-2023 02:10   chromedriver
   326542  05-27-2023 02:10   LICENSE.chromedriver
---------                     -------
 15365654                     2 files

but with chromedriver 115 there's an extra 'chromedriver' subdirectory:

/tmp % curl -LO https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.98/linux64/chromedriver-linux64.zip && unzip -l chromedriver-linux64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7061k  100 7061k    0     0  6354k      0  0:00:01  0:00:01 --:--:-- 6390k
Archive:  chromedriver-linux64.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
   280041  07-15-2023 00:04   chromedriver-linux64/LICENSE.chromedriver
 13547232  07-15-2023 00:04   chromedriver-linux64/chromedriver
---------                     -------
 13827273                     2 files
frerich added a commit to frerich/browser-tools-orb that referenced this issue Jul 19, 2023
…ic#81)

In previous chromedriver releases, the ZIP archives would contain the
'chromedriver' binary in the root directory of the archive. This file
was then moved to the target directory, typically

  /usr/local/bin/chromedriver

With chromedriver 15 however, the ZIP archives contain a new
platform-specific subdirectory. Thus, the actual binary is at e.g.
'chromedriver-linux64/chromedriver'. As it is, the
'chromedriver-linux64' directory is renamed to 'chromedriver' and *that*
is then moved to the target directory. This results in the final
executable to end up at

  /usr/local/bin/chromedriver/chromedriver

This is not backwards compatible with usages of the orb expecting the
previous location (e.g. because they expect that 'install-chromedriver'
puts the binary into a directory which is part of the PATH).
@brx-craig
Copy link

Can confirm, this is current an issue for a large number of folks. https://googlechromelabs.github.io/chrome-for-testing/

@Lance-Foley
Copy link

Can I assume this address this error?
None of the workarounds from the previous PR seem to work for me.

Installed version of Google Chrome is 115.0.5790.98 115.0.5790.98 will be installed mv: cannot move 'chromedriver' to '/usr/local/bin/chromedriver': File exists

@twohlix
Copy link

twohlix commented Jul 19, 2023

Yeah, Failing for us too - now instead of failing fast during chromedriver install it just fails later during the test runs with:

Webdrivers::VersionError:
              Unable to find latest point release version for 115.0.5790. You appear to be using a non-production version of Chrome. Please set `Webdrivers::Chromedriver.required_version = <desired driver version>` to a known chromedriver version: https://chromedriver.storage.googleapis.com/index.htm

or

Webdrivers::NetworkError:
            #   Net::HTTPServerException: 404 "Not Found" with https://chromedriver.storage.googleapis.com/LATEST_RELEASE_115.0.5790
            #   /home/circleci/project/bundle/ruby/3.1.0/gems/webdrivers-5.2.0/lib/webdrivers/network.rb:19:in `get'

@ryanbourdais ryanbourdais self-assigned this Jul 19, 2023
@ryanbourdais
Copy link
Contributor

Hi @frerich this should be fixed in the newly published orb version 1.4.3

@frerich
Copy link
Author

frerich commented Jul 19, 2023

I can confirm - version 1.4.3 works as expected. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants