Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25588

Legacy functional tests fail to start Firefox because WebDriverManager cannot download geckodriver

    XMLWordPrintable

Details

    • Unknown

    Description

      All the functional tests still using the legacy (non-Docker) test framework, such as the distribution upgrade tests (Upgrade*Test) and org.xwiki.test.security.AllTests, fail before running any test, when creating the Firefox driver in WebDriverFactory:

      io.github.bonigarcia.wdm.config.WebDriverManagerException: org.apache.hc.core5.http.MessageConstraintException: Maximum line length limit exceeded
          at io.github.bonigarcia.wdm.WebDriverManager.setup(...)
          at org.xwiki.test.ui.WebDriverFactory.createWebDriver(WebDriverFactory.java:54)
      

      Cause: WebDriverManager.firefoxdriver().setup() downloads geckodriver from the GitHub releases, and the GitHub release-download redirect now sends a content-security-policy header of about 9,200 characters. WebDriverManager's HttpClient 5 uses the default maximum line length of 8,192 characters and offers no way to raise it, so the download fails. No WebDriverManager release fixes it (the latest is 6.4.0), and since the CI agents start without any driver cache, every legacy suite fails.

      Fix: stop using WebDriverManager and let Selenium Manager (bundled with Selenium) resolve a geckodriver matching the installed Firefox, with its usage statistics disabled.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: