-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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]: Selenium unable to connect to Chrome 128 when not directly installed #14438
Comments
@fredericDelaporte, 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! |
Symptoms are similar to SeleniumHQ/docker-selenium#2332 (adding |
This did not work. New test program:
New log:
I have tried setting the option before But something work: That does not look as viable long term solution though. |
I have also tried without the initial double dash just in case since
Same log, same trouble. |
If that is the search engine choice which is causing it, the trouble could be dependent on the location, from what I read elsewhere. So, these tests are run from France, Paris. |
When Chrome is directly installed on the machine, here is the log of the same program, no more failing to connect to Chrome:
But failing at the Close, which seems superfluous: Dispose seems enough to close Chromedrive.exe and Chrome.exe processes it has launched. For subsequent tests, I will remove that Close. The Chrome screen then looks like this: If adding the disable search engine choice option: |
So, to summarize a bit: Driving Chrome 128 through Selenium on a machine without Chrome installed fails connecting to Chrome, be it headless or not, unless asking for headless=old. The disable-search-engine-choice-screen argument does not change anything about this. It works only if Chrome is directly installed on the machine when not setting |
Since Chrome 128 there is a Search Engine selection popup even in headless mode that needs to be accepted. This leads to Capybara Element not found exceptions during system specs. Refs: SeleniumHQ/selenium#14438
Since Chrome 128 there is a Search Engine selection popup even in headless mode that needs to be accepted. This leads to Capybara Element not found exceptions during system specs. Refs: SeleniumHQ/selenium#14438
Since Chrome 128 there is a Search Engine selection popup even in headless mode that needs to be accepted. This leads to Capybara Element not found exceptions during system specs. Refs: SeleniumHQ/selenium#14438 (cherry picked from commit c368c16)
Please elaborate. Your message currently looks like a phishing bot message. |
We've run into the search engine choice screen as well, and had to disable it manually in our specs (as objects in the center of the viewport would be obscured by that screen). Can that option be made standard for the |
@fredericDelaporte I had the same issue with Chrome 129 as well. It seems that such error makes just the first browser tab stucked. My test indeed opens other tabs as well, and all of them work correctly. chrome_options.add_experimental_option("excludeSwitches", ['enable-automation']) # to hide "Chrome est contrôlé par un logiciel de test automatisé."
chrome_options.add_argument("--disable-search-engine-choice-screen") # to hide the search engine choice option |
Thanks @francecon, that may help others. On our side, we have switched to Firefox, which happens to suit the needs of the app. We were not needing to stick to Chrome. |
What happened?
We have .Net console application run as a Windows Service which uses Selenium to drive Chrome, through Selenium.WebDriver.ChromeDriver 128 and Selenium.WebDriver 4.23. So, it is run under Windows 11 and Windows Server 2022.
In our different environments, it has started to fail since last week, with the latest affected environment failing since yesterday (Sunday 25 of August). It appears to fail working with Chrome 128. The
BrowserVersion
option was set asstable
. Forcing it to127
restores the application, allowing it to operate normally. Switching back tostable
or forcing it explicitly to128
causes the trouble to appear again.The trouble was originally seen while using ChromeDriver 127. Upgrading it to 128 changed nothing. Purging the .cache/selenium folder did not help.
The trouble is not reproducible on a machine on which Chrome 128 is directly installed. If it is not installed, or if only an older version is installed, the trouble occurs.
When there is the trouble, the application logs contain an error about a network service crash, then a "Sandbox cannot access executable" error, then timeouts from renderer.
Chrome-Error-Log.txt
Chrome-Normal-Log.txt
Moreover, running the application locally in an interactive session show a blank window appearing, when the trouble occurs.
Of course it may be a Chrome or Chromedriver issue instead of a Selenium one, but I do not know. Still it makes Chrome 128 unusable with Selenium and Windows if there is no standalone installation of Chrome.
And maybe the CI troubles in #14429 are related since it seems to upgrade some things to the 128 version.
How can we reproduce the issue?
Make sure Chrome is not installed at all on the test machine.
In a new net8 Console app project, add Nuget references to Selenium.WebDriver 4.27, and paste this code into the Program.cs file:
I have not added rendering calls, so that minimal example only shows the initialization troubles including the blank window, not the rendering timeouts. Using
127
as the BrowserVersion makes the initialization troubles disappear.Relevant log output
Operating System
Windows 11, Windows Server 2022, run from Paris, France.
Selenium version
.net 8.0.8
What are the browser(s) and version(s) where you see this issue?
Chrome 128 (128.0.6613.84)
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 128.0.6613.84 (and 127.0.6533.119)
Are you using Selenium Grid?
No
The text was updated successfully, but these errors were encountered: