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

Chromedriver download using outdated endpoints. #1315

Closed
biz812 opened this issue Jul 20, 2023 · 2 comments · Fixed by #1325
Closed

Chromedriver download using outdated endpoints. #1315

biz812 opened this issue Jul 20, 2023 · 2 comments · Fixed by #1325

Comments

@biz812
Copy link

biz812 commented Jul 20, 2023

🐛 Bug description

In our test suite we download the lastest chrome beta version and test our code against it headlessly with wasm-pack. Wasm-pack was happily downloading a compatible version of chromedriver for us and everything was good.

Today it stopped working, after a bit of digging we found this:

ERROR session not created: This version of ChromeDriver only supports Chrome version 114
    Current browser version is 116.0.5845.42 with binary path /usr/bin/google-chrome

🤔 Expected Behavior

Previous behaviour was to download LATEST_RELEASE of chromedriver which was the latest stable release:
https://github.com/rustwasm/wasm-pack/blob/master/src/test/webdriver/chromedriver.rs#L12

Which, being one version away from Beta, was deemed compatible. However Google have changed their process and this URL is now abandoned at M114 in favour of new download URLs and endpoints.

See this announcement here:
https://groups.google.com/g/chromedriver-users/c/clpipqvOGjE

And their new site here:
https://googlechromelabs.github.io/chrome-for-testing

👟 Steps to reproduce

On our x86_64 debian based CI container, our process was as follows:

🌍 Your environment

Include the relevant details of your environment.
wasm-pack version: wasm-pack 0.12.1
rustc version: rustc 1.72.0-nightly (f4b80cacf 2023-06-30)

Mitigation

We are currently mitigating this behaviour by manually downloading the chromedriver binary like this:

curl -O https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$(/usr/bin/google-chrome --version | awk '{print $3}')/linux64/chromedriver-linux64.zip
unzip chromedriver-linux64.zip
mv ./chromedriver-linux64/chromedriver /${HOME}/.cargo/bin/
rm chromedriver-linux64.zip
@Myriad-Dreamin
Copy link
Contributor

Since the PR doesn't receive response for a long time. I change by GitHub action for latest chrome for testing. I put it here for people who need it:

env:
  CHROME_VERSION: "116.0.5845.96"

- name: Set up Chrome
  # https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable
  run: |
    VERSION_STRING="${CHROME_VERSION}-1"
    wget "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${VERSION_STRING}_amd64.deb"
    sudo dpkg -i "google-chrome-stable_${VERSION_STRING}_amd64.deb"
    google-chrome --version
- name: Set up Chrome driver
  run: |
    curl -O https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROME_VERSION}/linux64/chromedriver-linux64.zip
    unzip chromedriver-linux64.zip
    sudo mv ./chromedriver-linux64/chromedriver /usr/local/bin/chromedriver
    chromedriver --version

@wngr
Copy link

wngr commented Oct 4, 2023

Thanks for your workaround! I would really be great getting #1325 in to fix that.

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

Successfully merging a pull request may close this issue.

3 participants