Details
-
Bug
-
Resolution: Unresolved
-
Major
-
17.10.14, 18.9.0-rc-1, 18.4.7
-
None
-
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.