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]: Not able to launch chrome using web driver manager latest dependency 5.4.1 #12426

Closed
rohan-ngm opened this issue Jul 27, 2023 · 3 comments
Labels

Comments

@rohan-ngm
Copy link

What happened?

Hello Team,

Please find below mentioned details for the issue encountered in which the chrome / edge is not getting launched on

MacBook Pro running OS: macOS Ventura 13.5 (22G74)
Maven version : 3.9.3
JAVA: 20.0.1

Each time I try to execute the test case using below mentioned code to launch chrome browser :

WebDriverManager.chromedriver().setup();
ChromeOptions chromeOptions = new ChromeOptions();
if (utils.properties(AppConstants.CONFIG_FILE_NAME, "IS_BROWSER_HEADLESS")
.equalsIgnoreCase("true")) {
chromeOptions.addArguments("--headless");
}
ChromeDriver driver = new ChromeDriver(chromeOptions);
driver.manage().timeouts().getPageLoadTimeout();
driver.manage().window().maximize();

I encounter below mentioned error on the console:

INFO: Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: cannot find Chrome binary
Host info: host: 'USTSHYDLAP-222.local', ip: 'fe80:0:0:0:8f2:78e0:86ea:f39d%en0'
Build info: version: '4.10.0', revision: 'c14d967899'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.5', java.version: '20.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], extensions: []}}]}]

at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:140)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:96)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:68)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:196)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:171)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:531)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:227)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:154)
at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:107)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:87)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:82)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:71)

How can we reproduce the issue?

Each time I try to execute the test case using below mentioned code to launch chrome browser :

WebDriverManager.chromedriver().setup();
        ChromeOptions chromeOptions = new ChromeOptions();
        if (utils.properties(AppConstants.CONFIG_FILE_NAME, "IS_BROWSER_HEADLESS")
                .equalsIgnoreCase("true")) {
            chromeOptions.addArguments("--headless");
        }
        ChromeDriver driver = new ChromeDriver(chromeOptions);
        driver.manage().timeouts().getPageLoadTimeout();
        driver.manage().window().maximize();

Relevant log output

I encounter below mentioned error on the console:

INFO: Driver logs no longer sent to console by default; https://www.selenium.dev/documentation/webdriver/drivers/service/#setting-log-output

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: cannot find Chrome binary 
Host info: host: 'USTSHYDLAP-222.local', ip: 'fe80:0:0:0:8f2:78e0:86ea:f39d%en0'
Build info: version: '4.10.0', revision: 'c14d967899'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '13.5', java.version: '20.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--remote-allow-origins=*], extensions: []}}]}]

	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:140)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:96)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:68)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:196)
	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:171)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:531)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:227)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:154)
	at org.openqa.selenium.chromium.ChromiumDriver.<init>(ChromiumDriver.java:107)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:87)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:82)
	at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:71)

Operating System

macOS Ventura 13.5 (22G74)

Selenium version

4.10.0

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

Chrome

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

Chrome installed is 115.0.5790.114

Are you using Selenium Grid?

No

@github-actions
Copy link

@rohan-ngm, 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!

@diemol
Copy link
Member

diemol commented Jul 27, 2023

Duplicate of #12381

Two options, report this to the WebDriverManager project, or wait 1-2 days for Selenium 4.11.0 to be released and drop WebDriverManager.

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
Projects
None yet
Development

No branches or pull requests

2 participants