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]: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: exited normally. (chrome not reachable) (The process started from chrome location /usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.) #12973

Closed
saif8983ansari opened this issue Oct 20, 2023 · 12 comments
Labels
G-chromedriver Requires fixes in ChromeDriver I-defect I-issue-template Applied to issues not following the template, or missing information. R-awaiting answer

Comments

@saif8983ansari
Copy link

saif8983ansari commented Oct 20, 2023

What happened?

when I try to open a html file using headless chrome. this issue comes intermittently. I am using selenium 4.13 and webdriver manager 5.5.3

How can we reproduce the issue?

I dont have exact steps to reproduce as I said this issue is intermittent.
my code snippet:-
WebDriverManager.chromedriver().clearDriverCache().setup();
	WebDriver driver = new ChromeDriver(options);
	String screenshotFilePath;
	Dimension currentDimension = driver.manage().window().getSize();
	int defaultHeight = currentDimension.getHeight();
	int defaultWidth = currentDimension.getWidth();
	
		logger.info("default driver size "+defaultWidth+" * "+defaultHeight);

		driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);
		driver.get("file://"+htmlFilePath+".html");

Relevant log output

stack_trace
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: exited normally.
(chrome not reachable)
(The process started from chrome location /usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Host info: host: '1511da2b56a5', ip: '172.17.0.5'
Build info: version: '4.13.0', revision: 'ba948ece5b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.322-246.539.amzn2.x86_64', java.version: '17.0.8.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--headless=new, --disable-dev-shm-usage, --remote-debugging-port=9222, --user-data-dir=/home/sassr..., --ignore-certificate-errors, --silent, --no-sandbox], binary: /usr/bin/google-chrome-stable, 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:602)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:163)
at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:108)
... 5 frames truncated
... 2 common frames omitted
Wrapped by: java.lang.RuntimeException: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: exited normally.
(chrome not reachable)
(The process started from chrome location /usr/bin/google-chrome-stable is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Host info: host: '1511da2b56a5', ip: '172.17.0.5'
Build info: version: '4.13.0', revision: 'ba948ece5b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.322-246.539.amzn2.x86_64', java.version: '17.0.8.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--headless=new, --disable-dev-shm-usage, --remote-debugging-port=9222, --user-data-dir=/home/sassr..., --ignore-certificate-errors, --silent, --no-sandbox], binary: /usr/bin/google-chrome-stable, extensions: []}}]}]

Operating System

amazon linux 2

Selenium version

4.13

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

chrome 118

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

webdrivermanager 5.5.3

Are you using Selenium Grid?

No response

@github-actions
Copy link

@saif8983ansari, 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!

@titusfortner
Copy link
Member

turn on logging and see what the output is - https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/

Also, we recommend not using WebDriverManager at this point as well since Selenium handles it all for you now.

@satya081
Copy link

satya081 commented Nov 8, 2023

I am also facing same error.

@titusfortner
Copy link
Member

Need a reproducible example or log output.

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

github-actions bot commented Nov 9, 2023

Hi, @saif8983ansari.
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.

@AlexParan
Copy link

Hi all,

I am new to GitHub and trying to get around it, but I am facing the same issue as peeps above.
I am trying to code a automatic app for my work to create tickets automatically but can't access the snow link as chrome is crashing.
ChromeOptions options = new ChromeOptions();
options.AddExcludedArgument("ignore-certifcate-errors");
options.AddArgument("disable-infobars");
var driverService = ChromeDriverService.CreateDefaultService();
driverService.HideCommandPromptWindow = true;
var driver = new ChromeDriver(driverService, options); // it crashes here states that it thinks that chrome has crashed and it doesn't create the session

driver.Manage().Window.Maximize();
driver.Navigate().GoToUrl(snow);
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(20);

Any advice?

@AlexParan
Copy link

This is the exact error I get :

[11:01 AM] Paranosic, Aleksa
System.InvalidOperationException: 'session not created: Chrome failed to start: exited normally.

(session not created: DevToolsActivePort file doesn't exist)

(The process started from chrome location C:\Program Files\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (SessionNotCreated)'

@titusfortner
Copy link
Member

DevToolsActivePort is a different issue: https://bugs.chromium.org/p/chromedriver/issues/detail?id=4403#c35

@AlexParan
Copy link

that doesn't resolve my issue, it just times out

@titusfortner
Copy link
Member

Unfortunately, it is still a Chromedriver issue and there's nothing we can do about it in this code base.

@titusfortner titusfortner added the G-chromedriver Requires fixes in ChromeDriver label Nov 17, 2023
Copy link

Hi, @saif8983ansari.
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.

Copy link

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 18, 2023
chmelvv pushed a commit to chmelvv/AFT-Layers-example that referenced this issue Feb 12, 2024
chmelvv pushed a commit to chmelvv/AFT-Layers-example that referenced this issue Feb 12, 2024
chmelvv pushed a commit to chmelvv/AFT-Layers-example that referenced this issue Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
G-chromedriver Requires fixes in ChromeDriver I-defect I-issue-template Applied to issues not following the template, or missing information. R-awaiting answer
Projects
None yet
Development

No branches or pull requests

5 participants