Skip to content
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 110: Cannot start session #11721

Closed
adambeth opened this issue Mar 1, 2023 · 29 comments
Closed

[🐛 Bug]: Chrome 110: Cannot start session #11721

adambeth opened this issue Mar 1, 2023 · 29 comments
Labels
G-chromedriver Requires fixes in ChromeDriver

Comments

@adambeth
Copy link

adambeth commented Mar 1, 2023

What happened?

Chrome Version: Version 110.0.5481.177 (Official Build) (x86_64)
Chrome Driver Version: 110.0.5481.77

After updating to Chrome 110 and downloading the relevant support driver I can no longer start a session

I cannot find any relevant information on the error specifics

How can we reproduce the issue?

Try launch a session using chrome 110 and chromedriver 110

Relevant log output

`Starting ChromeDriver 110.0.5481.77 (65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839}) on port 6304
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1677671505.261][WARNING]: Browser-wide DevTools client failed to connect: disconnected: unable to connect to renderer
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: disconnected: not connected to DevTools
  (failed to check if window was closed: disconnected: not connected to DevTools)
  (Session info: chrome=110.0.5481.177) 
Host info: host: 'Adam.local', ip: 'fe80:0:0:0:6c:2c11:1a77:e83c%en0'
Build info: version: '4.6.0', revision: '79f1c02ae20'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.2.1', java.version: '17.0.6'
Driver info: org.openqa.selenium.chrome.ChromeDriver`

Operating System

Mac

Selenium version

Java 4.6.0

What are the browser(s) and version(s) where you see this issue?

110.0.5481.177

What are the browser driver(s) and version(s) where you see this issue?

110.0.5481.177

Are you using Selenium Grid?

No

@github-actions
Copy link

github-actions bot commented Mar 1, 2023

@adambeth, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@krmahadevan
Copy link
Contributor

@adambeth - What happens when you try using 4.8.1 (latest released version of selenium) ?

@diemol diemol added I-issue-template Applied to issues not following the template, or missing information. and removed needs-triaging labels Mar 1, 2023
@diemol
Copy link
Member

diemol commented Mar 1, 2023

Also, we run tests on that version and they work.

@github-actions
Copy link

github-actions bot commented Mar 1, 2023

Hi, @adambeth.
Please follow the issue template, we need more information to reproduce the issue.

Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue.

Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough.

Reply to this issue when all information is provided, thank you.

@adambeth
Copy link
Author

adambeth commented Mar 1, 2023 via email

@adambeth
Copy link
Author

adambeth commented Mar 1, 2023 via email

@diemol
Copy link
Member

diemol commented Mar 1, 2023

Either here or in the Chrome/ChromeDriver one, you need to provide an exact way to reproduce the issue.

@adambeth
Copy link
Author

adambeth commented Mar 1, 2023 via email

@adambeth
Copy link
Author

adambeth commented Mar 1, 2023 via email

@diemol
Copy link
Member

diemol commented Mar 1, 2023

I am asking for that because we use the most recent Chrome and ChromeDriver in our pipelines and code examples from the documentation on the 3 operating systems and we do not have that error. I just launched one test and it worked.

@adambeth
Copy link
Author

adambeth commented Mar 1, 2023 via email

@krmahadevan
Copy link
Contributor

@adambeth - That error usually indicates a non compatible combo of a chrome browser and a chromedriver being found.

Can you please do the following:

  1. Start the chromedriver that you are using by running ./chromedriver. You should see something like this
➜  110.0.5481.77 ./chromedriver 
Starting ChromeDriver 110.0.5481.77 (65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
  1. Now try to create a new session by running the below curl command. The expectation is that you should see a new browser spin off
curl -X POST 'localhost:9515/session' \
--header 'Content-Type: application/json; charset=utf-8' \
 --data-raw '{ "desiredCapabilities": { "browserName": "chrome", "goog:chromeOptions": { "args": [ "--remote-debugging-port=9225" ] }, "goog:loggingPrefs": { "browser": "ALL", "driver": "ALL", "server": "ALL" } }, "capabilities": { "browserName": "chrome" } }'

If you don't see a browser spawn up then we can for sure conclude that the problem lies in the chromedriver binary that you are using.

@adambeth
Copy link
Author

adambeth commented Mar 3, 2023 via email

@krmahadevan krmahadevan added the G-chromedriver Requires fixes in ChromeDriver label Mar 3, 2023
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Hi, @adambeth.
This issue has been determined to require fixes in ChromeDriver.

You can see if the feature is passing in the Web Platform Tests.

If it is something new, please create an issue with the ChromeDriver team.
Feel free to comment the issues that you raise back in this issue. Thank you.

@github-actions github-actions bot closed this as completed Mar 3, 2023
@krmahadevan krmahadevan added G-chromedriver Requires fixes in ChromeDriver and removed G-chromedriver Requires fixes in ChromeDriver I-defect I-issue-template Applied to issues not following the template, or missing information. labels Mar 3, 2023
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Hi, @adambeth.
This issue has been determined to require fixes in ChromeDriver.

You can see if the feature is passing in the Web Platform Tests.

If it is something new, please create an issue with the ChromeDriver team.
Feel free to comment the issues that you raise back in this issue. Thank you.

@riki95
Copy link

riki95 commented Mar 18, 2023

I am still having issues with this.

I got

chromium --version
Chromium 111.0.5563.64 snap 

When I run my app, I got this:

Starting ChromeDriver 111.0.5563.64 (c710e93d5b63b7095afe8c2c17df34408078439d-refs/branch-heads/5563@{#995}) on port 7739
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1679161807.852][WARNING]: Browser-wide DevTools client failed to connect: disconnected: unable to connect to renderer

How to fix?

I also tried with latest Selenium version but it does not work

<dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.8.1</version>
            <scope>compile</scope>
		</dependency>

@cmedinga
Copy link

Hi there. Same issue here. A Chrome window spawns, but in blank, with the address "data:," in it.

Code written in Python, running in windows 10.
Chrome version 110.0.5481.78 (Build oficial) (32 bits)
Chromedriver (manually downloaded) 110.0.5481.77

My code is:

import selenium
print(f'selenium version {selenium.__version__}')

from pathlib import Path
#Variables genéricas
RUTA_CHROMEDRIVER       = './chromedriver.exe'
RUTA_DESCARGAS = str(Path.home()) + '/downloads/' #Carpeta a la que queremos descargar. Nuestra carpeta de descargas.

website = r"https://www.google.com" #Asigno la url que voy a raspear


#Para arrancar el navegador
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome  import ChromeDriverManager

#Para interactuar con una página
from selenium.webdriver.common.by import By

import time

options = webdriver.ChromeOptions()
options.add_argument("--start-maximized")

try:
    driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
except Exception as err:
    print(err)
    print('Fallo de driver automático. Cambio a driver manual.')
    driver = webdriver.Chrome(service=Service(executable_path=RUTA_CHROMEDRIVER))
driver.maximize_window()
print(f'Abriendo url {website}')
driver.get(website)
time.sleep(5)

The output (console):

selenium version 4.8.2

and, after a looooong while, the error message:

TimeoutException: timeout: Timed out receiving message from renderer: 600.000
Fallo de driver automático. Cambio a driver manual.
TimeoutException                          Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_26652\1532247099.py in <module>
     29 try:
---> 30     driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
     31 except:

~\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\chrome\webdriver.py in __init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, service, keep_alive)
     79 
---> 80         super().__init__(
     81             DesiredCapabilities.CHROME["browserName"],

~\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\chromium\webdriver.py in __init__(self, browser_name, vendor_prefix, port, options, service_args, desired_capabilities, service_log_path, service, keep_alive)
    103         try:
--> 104             super().__init__(
    105                 command_executor=ChromiumRemoteConnection(

~\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py in __init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector, options)
    285         self.start_client()
--> 286         self.start_session(capabilities, browser_profile)
    287 

~\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py in start_session(self, capabilities, browser_profile)
    377         parameters = {"capabilities": w3c_caps}
--> 378         response = self.execute(Command.NEW_SESSION, parameters)
    379         if "sessionId" not in response:

~\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\webdriver.py in execute(self, driver_command, params)
    439         if response:
--> 440             self.error_handler.check_response(response)
    441             response["value"] = self._unwrap_value(response.get("value", None))

~\AppData\Roaming\Python\Python39\site-packages\selenium\webdriver\remote\errorhandler.py in check_response(self, response)
    244             raise exception_class(message, screen, stacktrace, alert_text)  # type: ignore[call-arg]  # mypy is not smart enough here
--> 245         raise exception_class(message, screen, stacktrace)

TimeoutException: Message: timeout: Timed out receiving message from renderer: 600.000
  (Session info: chrome=110.0.5481.78)
Stacktrace:
Backtrace:
	(No symbol) [0x008937D3]
	(No symbol) [0x00828B81]
	(No symbol) [0x0072B36D]
	(No symbol) [0x0071D4D3]
	(No symbol) [0x0071D241]
	(No symbol) [0x0071BC95]
	(No symbol) [0x0071C518]
	(No symbol) [0x0071B265]
	(No symbol) [0x00726BD6]
	(No symbol) [0x0071B145]
	(No symbol) [0x0071CDD4]
	(No symbol) [0x0071BC95]
	(No symbol) [0x0071C518]
	(No symbol) [0x0071B265]
	(No symbol) [0x00724236]
	(No symbol) [0x0071B145]
	(No symbol) [0x0071CDD4]
	(No symbol) [0x0071BC95]
	(No symbol) [0x0071C518]
	(No symbol) [0x0071B265]
	(No symbol) [0x00721E9B]
	(No symbol) [0x0071B145]
	(No symbol) [0x0071CDD4]
	(No symbol) [0x0071BC95]
	(No symbol) [0x0071C518]
	(No symbol) [0x0071B265]
	(No symbol) [0x00713C1F]
	(No symbol) [0x0071B145]
	(No symbol) [0x0071A784]
	(No symbol) [0x0071A33C]
	(No symbol) [0x0072CA93]
	(No symbol) [0x0070D95D]
	(No symbol) [0x0070CD48]
	(No symbol) [0x0078213B]
	(No symbol) [0x00781B2C]
	(No symbol) [0x0077B216]
	(No symbol) [0x00750D97]
	(No symbol) [0x0075253D]
	GetHandleVerifier [0x00B0ABF2+2510930]
	GetHandleVerifier [0x00B38EC1+2700065]
	GetHandleVerifier [0x00B3C86C+2714828]
	GetHandleVerifier [0x00943480+645344]
	(No symbol) [0x00830FD2]
	(No symbol) [0x00836C68]
	(No symbol) [0x00836D4B]
	(No symbol) [0x00840D6B]
	BaseThreadInitThunk [0x774B00F9+25]
	RtlGetAppContainerNamedObjectPath [0x775F7BBE+286]
	RtlGetAppContainerNamedObjectPath [0x775F7B8E+238]

@riki95
Copy link

riki95 commented Apr 18, 2023

Check my fix here:

#11809 (comment)

@cmedinga
Copy link

Thanks, @riki95 , but can't use that solution. I'm in a corporate laptop, and Google Chrome (not chromium) is what it is installed.

I used a workaround using Firefox driver instead, but I hope than in following versions this issue with Chrome should be fixed.

@Auto81
Copy link

Auto81 commented May 18, 2023

@adambeth - That error usually indicates a non compatible combo of a chrome browser and a chromedriver being found.

Can you please do the following:

  1. Start the chromedriver that you are using by running ./chromedriver. You should see something like this
➜  110.0.5481.77 ./chromedriver 
Starting ChromeDriver 110.0.5481.77 (65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
  1. Now try to create a new session by running the below curl command. The expectation is that you should see a new browser spin off
curl -X POST 'localhost:9515/session' \
--header 'Content-Type: application/json; charset=utf-8' \
 --data-raw '{ "desiredCapabilities": { "browserName": "chrome", "goog:chromeOptions": { "args": [ "--remote-debugging-port=9225" ] }, "goog:loggingPrefs": { "browser": "ALL", "driver": "ALL", "server": "ALL" } }, "capabilities": { "browserName": "chrome" } }'

If you don't see a browser spawn up then we can for sure conclude that the problem lies in the chromedriver binary that you are using.

Only after running chromedriver as sudo in terminal, was i able to get past the disconnected: unable to connect to renderer blocker using your curl example above.

Using a selenium remote webdriver and connecting to a manually downloaded chromedriver, and running it as 'sudo', also allowed me to get past the disconnected: unable to connect to renderer blocker.

Will need to find a way for SeleniumManager to open chromedriver with appropriate permissions, as it doesnt seem to be currently

@titusfortner
Copy link
Member

SeleniumManager is using same permissions as the user executing the Selenium test. It's storing files in a directory under that user's $HOME directory. I'm not sure which permissions are locked down that prevent it from working, and if we can find a way to address it we will, but Selenium Manager might not be able to solve this, and you might need to manage drivers by yourself.

@Auto81
Copy link

Auto81 commented May 18, 2023

Thanks for info, i'll try check the permissions on intelliJ and my user profile tomorrow

@Auto81
Copy link

Auto81 commented May 19, 2023

@titusfortner

SeleniumManager is using same permissions as the user executing the Selenium test. It's storing files in a directory under that user's $HOME directory. I'm not sure which permissions are locked down that prevent it from working, and if we can find a way to address it we will, but Selenium Manager might not be able to solve this, and you might need to manage drivers by yourself.

On Mac, my user account is in sudoers, and have tried setting owner/group to multiple different combinations

I have set the SeleniumManager chromedriver, IntelliJ and Chrome to be owned by me, and tried the group first as wheel then root.

None of these combos have helped, is there a specific combo they need to be?

/Users/auto81/.cache/selenium/chromedriver/mac64/113.0.5672.63
auto81@laptop 113.0.5672.63 % ls -la
drwxrwxr-x  3 auto81  wheel        96 18 May 08:49 .
drwxrwxr-x  4 auto81  wheel       128 18 May 11:36 ..
-rwxrwxr-x  1 auto81  wheel  17875584 18 May 08:49 chromedriver
/Applications
auto81@laptop /Applications % ls -la
drwxr-xr-x@  3 auto81  wheel           96 15 May 20:59 Google Chrome.app
drwxrwxr-x@  3 auto81  wheel           96  5 Dec 10:42 IntelliJ IDEA CE.app

@titusfortner
Copy link
Member

@bonigarcia do you have any idea regarding this?

@bonigarcia
Copy link
Member

This issue seems not related to Selenium Manager. Selenium Manager manages the driver, i.e., download, cache, and make drivers available to the bindings. That feature seems correct since chromedriver is correctly stored in the cache folder.

The problem disconnected: unable to connect to renderer seems caused by chromedriver. I don't know if changing the way in which chromedriver is started from the bindings might help.

@markomirtic
Copy link

Does anyone have any solution? I'm still getting the same message:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=113.0.5672.126)
Host info: host: 'Markos-MacBook-Pro.local', ip: 'fe80:0:0:0:10ca:ff1d:6698:65e4%en0'
Build info: version: '4.8.3', revision: 'e5e76298c3'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '13.0', java.version: '11.0.18'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--start-maximized, --window-size=2560,1440, --proxy-server='direct://', --proxy-bypass-list=*, --disable-gpu, --disable-dev-shm-usage, --disable-infobars, --no-sandbox, --ignore-certificate-e

@Auto81
Copy link

Auto81 commented May 22, 2023

Does anyone have any solution? I'm still getting the same message:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: disconnected: not connected to DevTools (failed to check if window was closed: disconnected: not connected to DevTools) (Session info: chrome=113.0.5672.126) Host info: host: 'Markos-MacBook-Pro.local', ip: 'fe80:0:0:0:10ca:ff1d:6698:65e4%en0' Build info: version: '4.8.3', revision: 'e5e76298c3' System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '13.0', java.version: '11.0.18' Driver info: org.openqa.selenium.chrome.ChromeDriver Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--start-maximized, --window-size=2560,1440, --proxy-server='direct://', --proxy-bypass-list=*, --disable-gpu, --disable-dev-shm-usage, --disable-infobars, --no-sandbox, --ignore-certificate-e

A horrible work around I found was running the test runner / IDE as sudo. But other than proving the concept of everything else being correct I really wouldnt recommend this method

@titusfortner
Copy link
Member

I think we have a number of different things being discussed in this thread as if they were the same thing.

Some of this might be permissions issues, some of this might be mismatch of driver issue, and it's possible there might be a chromedriver bug involved as well.

It's hard to know what's going on without more information. I recommended turning on logging and taking a look at the relevant input/output before the exception: https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/

If it appears it is an issue with what is getting sent to the driver to start up, then please create a new ticket rather than continuing to comment here.

Copy link

github-actions bot commented Dec 9, 2023

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.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
G-chromedriver Requires fixes in ChromeDriver
Projects
None yet
Development

No branches or pull requests

9 participants