webdriverio: [🐛 Bug]: chromedriver available at a new domain storage.googleapis.com

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

latest

Node.js Version

20

Mode

Standalone Mode

Which capabilities are you using?

capabilities: [
    {
      browserName: 'chrome',
      acceptInsecureCerts: true,
      'goog:chromeOptions': {
        ...(isMobile() && {
          mobileEmulation: { deviceName: 'Pixel 2' }
        }),
        ...(isHeadless() && {
          args: ['--headless', '--disable-gpu', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage']
        })
      }
    }
  ],

What happened?

from version 121.0.6167.85 the chrome driver is available under a new domain:

storage.googleapis.com

https://googlechromelabs.github.io/chrome-for-testing/#stable

https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json

What is your expected behavior?

use proper domain to download chromedriver https://storage.googleapis.com/chrome-for-testing-public/

How to reproduce the bug.

update chrome and run a test

Relevant log output

2024-02-15T13:39:01.543Z ERROR webdriver: Failed downloading chromedriver v121.0.6167.184: Download failed: server returned code 404. URL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/121.0.6167.184/mac-arm64/chromedriver-mac-arm64.zip, retrying ...
Error: Error: Failed downloading chromedriver v121.0.6167.184: Download failed: server returned code 404. URL: https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/121.0.6167.184/mac-arm64/chromedriver-mac-arm64.zip, retrying ...


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

### Is there an existing issue for this?

- [X] I have searched the existing issues

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Reactions: 23
  • Comments: 37 (14 by maintainers)

Commits related to this issue

Most upvoted comments

@voropa @benstein I found this temp fix, adding an old version for your capability.

browserVersion: "122.0.6261.39"

This has been fixed in https://github.com/webdriverio/webdriverio/pull/12305 … please let us know if you still run into any issues. This unfortunately has been thrown at us over the weekend as Chrome stopped supporting that specific endpoint and their transition to the new one was rather rough since we were not notified before.

@voropa @benstein I found this temp fix, adding an old version for your capability.

browserVersion: "122.0.6261.39"

It works, thank you!

We don’t download browser\drivers directly, but use @puppeteer/browsers. The issue seems will be fixed in https://github.com/puppeteer/puppeteer/pull/11923 and after release we have to update dependency in wdio.

@mascok @seadcehic this should already be fixed in the new released version of WDIO. Just update to latest.

@SinghMegha27 use below it will work browserVersion: ‘dev’

I believe that the issue here is caused by WDIO CLI launcher attempting to download the browser and driver regardless of whether a non-WDIO-managed driver already exists on the machine or not: https://github.com/webdriverio/webdriverio/blob/7e52f7b8b668909d623799090eb3d4875924dc08/packages/wdio-cli/src/launcher.ts#L139-L147

This conflicts with the expected behaviour of the WebdriverIO ChromeDriver service that allows a chromedriverCustomPath, which WDIO CLI launcher is not aware of:

    services: [
        [ 'chromedriver', {
            chromedriverCustomPath: require(`chromedriver`).path,
        } ]
    ],

I think that to solve this issue WebdriverIO needs to add a new configuration setting to Testrunner, for example:

  • downloadBrowsers: boolean, defaulting to true to maintain current behaviour and causing the Launcher to skip download when set to false
  • browserDownloadOpts: { enabled?: boolean, baseUrl?: string }, to allow for both skipping the download altogether, or passing baseUrl to Puppeteer if needed.

I’d be happy to raise a PR if the approach makes sense, @christian-bromann?

Got This error Downloading Chromedriver v121.0.6167.185
2024-02-18T14:50:45.738Z WARN webdriver: Chromedriver v121.0.6167.185 don’t exist, trying to find known good version… Then tried adding browserVersion : stable, capabilities: [{ browserName: ‘chrome’, browserVersion: ‘stable’ },

after which got this error Error: Error: Couldn't find a matching chrome browser for tag "121.0.6167.184" on platform "win64", although at this website : https://googlechromelabs.github.io/chrome-for-testing/#stable
the stable version is 

image then after going through multiple PRs comments gave the version as 122.0.6261.39 then finally had luck.

But now my point is this work around is going to work always or again some version mismatch problem will arise ?

It looks like wdio-chromedriver-service is deprecated, though, so perhaps folks shouldn’t rely on it?

Yeah, there is no need to use Chromedriver at this point anymore as this functionality is built into WebdriverIO now.

@christian-bromann I seem to have Firefox issue fixed on my end. Opened issue https://github.com/webdriverio/webdriverio/issues/12322 and there is a tentaive fix at https://github.com/webdriverio/webdriverio/pull/12323

@SinghMegha27 use below it will work browserVersion: ‘dev’ It works for me Thanks!

after setting chromedriverCustomPath and use the local chrome driver, why it still download the chrome driver from the website?