-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[🐛 Bug]: Chrome 111 is not compatible with default HTTP Client #11750
Comments
@jamesplawry, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
I think the issue might be related to netty/netty#9673 which seems to be fixed in netty 5 (I believe Selenium is using netty 4 still) |
AsyncHttp Client has not been actively maintained (looks like this just changed), so we've been requesting people upgrade to the Java 11 HTTP client https://www.selenium.dev/blog/2022/using-java11-httpclient/ Looks like latest version of AsyncHttp still relies on Netty 4 and is compiled with Java 11 anyway? So I don't think continuing with that library is going to be the solution regardless. |
Ok, we could also add this to the Service class the same way we are doing for Firefox. That probably is the right thing to do if we continue to support Java < 11 |
Adding
and
makes tests work again |
Uses the new JDK 11 based HTTP client which does not have a problem with sending extra Origin-headers Related to SeleniumHQ/selenium#11750
Root cause is the changes in Chrome behavior: https://bugs.chromium.org/p/chromium/issues/detail?id=1422444 Discussion: https://groups.google.com/g/chromedriver-users/c/xL5-13_qGaA?pli=1 Selenium issue: SeleniumHQ/selenium#11750 Solution details: following Selenium team recommendation and switching to JDK 11 Http client for Selenium
@Artur- this will only work for versions starting from 4.5.0: https://www.selenium.dev/blog/2022/using-java11-httpclient/. I'm using 4.1.4, so still need to go with the workaround of Is it possible to specify a placeholder for the port for the cases in which a random port is used? something like: |
will there be a new ver of selenium to get this fix working ? current latest is 4.8.1 which was release on feb? so we will have new one sooner ? |
Root cause is the changes in Chrome behavior: https://bugs.chromium.org/p/chromium/issues/detail?id=1422444 Discussion: https://groups.google.com/g/chromedriver-users/c/xL5-13_qGaA?pli=1 Selenium issue: SeleniumHQ/selenium#11750 Solution details: following Selenium team recommendation and switching to JDK 11 Http client for Selenium
How can i add this new arg for the chrome options?? Is it something like this? ChromeOptions options = new ChromeOptions(); ?? Thanks guys |
Yep. Then just start the driver with those options and you should be good to go. |
Doesn't work for me... could you help please? Here are my code ChromeOptions options = new ChromeOptions(); Where am i wrong? |
WebDriver driver = new ChromeDriver(options); // update this mentioned line |
You have to wrote the Wildcard and not the website what you navigate |
@vemulaharshini37 @derRichter |
Hello Everyone, I have upgraded Java to 15 version. But when i am trying with headless it doesn't work for me. For reference i am adding the code as well.
|
You need to be at least on selenium version 4.5.0. Also: Why are there no "--" before your start-maximized option? |
apply Workaround to allow to use Chrome 111+ * SeleniumHQ/selenium#11750 fix warnings/tests to make the build pass again
An updated version of the chromium webdriver fails due to some issue with the httpclient that selenium uses. The gist is that chromedriveer refuses connections from selenium because something about the request headers makes the chromedriver rejects the connection as "remote" (or somesuch). Work-around was to allow chromedriver to accept remote connections. This doesn't affect the security of digital antiquity's filrewalled build server, but worth noting. More info: - https://stackoverflow.com/questions/75678572/java-io-ioexception-invalid-status-code-403-text-forbidden - SeleniumHQ/selenium#11750
WebDriver wd; Wrote it like this and everything works |
reminder: It's fixed in the latest version of Selenium |
This fixes SeleniumHQ/selenium#11750, which caused item screenshotting to fail when Google Chrome got upgraded past version 111.
Switch to Selenium 4 and JDK 11 Implement several improvements: - Log should display system property value used during scenario execution: Currently the log file displays only values for properties defined in files read by ScenarioParametersManager. In certain circumstances it could be interesting to know values of System properties and Environment variables as well. - Add the possibility to print console output in a separated log file: Currently framework is writing full debug information in a log file (usually debug_YYYYMMDDHHMMSS.log) and simply print output in standard console. Although the print output is also written in the debug log file, when running a scenario in a build it's not always easy to get the console output. The purpose of this enhancement is to have the ability to also write the print output in a separated log file which could be easily got after a Jenkins or a Travis build run. Note that default behavior will be to have this functionality disabled. Hence its introduction will be silent for users but they can activate it if necessary in their corresponding builds. - Add CloseBrowsers annotation which closes all browsers for test and step - Add sortListAndCompareEquality method to CollectionsUtil - Improve SpotTextTimeout.getCondition to use StringUtils.compare - Set DigitalizedVersion class public in StringUtils - Add filterXmlContent method to StringUtils - Print scenario properties usage in console at the end of execution - Make some Property and Counters classes and methods public - Add and tune some utilities + Add MapUtil class with API to compare maps of strings + Tune doc in CollectionsUtil and StringUtils + Add readPropertiesFile(File) API method in FileUtil + Add IsPartOf comparison to StringUtils - Add arrayToList API method on CollectionsUtil - Tune Application login when redirection occurred Fix following issues: - ScenarioExecution fails to find the reason when a scenario execution is stopped Sometimes we got following message in console: "For some unknown reason, while shutting down, ScenarioExecution is not able to retrieve the reason of the execution stop." - Bug in CollectionsUtil.sortListAndCheckEquality method - NaN error while displaying scenario counters - Tools QA Document title - Inaccurate time in message of SpotAbstractTimeout.wait(boolean) method - Workaround for Selenium issue SeleniumHQ/selenium#11750 - API key or token stored in properties or environment variables have their value exposed in log files - Bug select when using comparison pattern - Lowercase issue while reading tests parameter
…platform testing - Continue project with more features for cross platform testing - fix Selenium Issue: SeleniumHQ/selenium#11750
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
After the Chrome 111 update, you can no longer kick off a chromedriver instance unless you add an additional chrome option:
"--remote-allow-origins=*"
I submitted a bug with Google and they responded, and indicated this has to do with Selenium setting the origin header:
https://bugs.chromium.org/p/chromium/issues/detail?id=1422444
How can we reproduce the issue?
Just update to chrome 111, and try and run a UI selenium test. I am using Java and Junit. See the link to the Chrome ticket for more details on how I was personally starting the driver.
Relevant log output
Operating System
Mac OS Monterey
Selenium version
4.4.0
What are the browser(s) and version(s) where you see this issue?
Chrome 111
What are the browser driver(s) and version(s) where you see this issue?
I'm using webdriver manager, so whichever the latest one its grabbing.
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: