Description
🐛 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:
- Install rust (via https://sh.rustup.rs)
- Install wasm-pack (via https://rustwasm.github.io/wasm-pack/installer/init.sh)
- Install Chrome Beta (via https://dl.google.com/linux/direct/google-chrome-beta_current_amd64.deb)
- Run
CHROMEDRIVER_ARGS="--verbose" wasm-pack test --chrome --headless
🌍 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