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]: SessionNotCreatedError #12811

Closed
ZeldaFlower opened this issue Sep 21, 2023 · 13 comments
Closed

[🐛 Bug]: SessionNotCreatedError #12811

ZeldaFlower opened this issue Sep 21, 2023 · 13 comments
Labels
A-needs-triaging A Selenium member will evaluate this soon! G-chromedriver Requires fixes in ChromeDriver I-defect Something is not working as intended

Comments

@ZeldaFlower
Copy link

ZeldaFlower commented Sep 21, 2023

What happened?

I’m just trying to build a test which will hit my website and verify it, but I can’t even get chrome to start up.

Tried to post Here but it doesn’t look very active.

The official documentation Here has two issues:

  • one being a syntax error on the second await: await driver.findElement(By.name('q'));.sendKeys('webdriver', Key.RETURN);
  • The second is nothing is required to download now that selenium downloads chrome for you.

However, since I can’t get it to work maybe there is an issue and/or more documentation needed. I have tried installing chromedriver with npm as well. I’ve also tried passing the port and instantiating it differently, but to me the “simple” example should work as is. The PATH variable has the /usr/bin which contains chromedriver.

How can we reproduce the issue?

https://github.com/ZeldaFlower/Trivia/actions/runs/6267226699/job/17019829951

let driver = await new Builder().forBrowser('chrome').build();
try {
	await driver.get('http://www.google.com/ncr');
	await driver.findElement(By.name('q')).sendKeys('webdriver', Key.RETURN);
	await driver.wait(until.titleIs('webdriver - Google Search'), 1000);
} finally {
	await driver.quit();
}

Relevant log output

https://github.com/ZeldaFlower/Trivia/actions/runs/6267226699/job/17019829951

at Object.<anonymous> (source/utils/__tests__/html.test.js:25:11)

    console.debug
      Selenium Manager binary found at /home/runner/work/Trivia/Trivia/node_modules/selenium-webdriver/bin/linux/selenium-manager

      at getBinary (node_modules/selenium-webdriver/common/seleniumManager.js:56:13)

    console.debug
      Driver path: /usr/bin/chromedriver

      at logOutput (node_modules/selenium-webdriver/common/seleniumManager.js:148:15)

    console.debug
      Browser path: /opt/google/chrome/google-chrome

      at logOutput (node_modules/selenium-webdriver/common/seleniumManager.js:148:15)

  ● html › test html

    SessionNotCreatedError: session not created: Chrome failed to start: exited normally.
      (session not created: DevToolsActivePort file doesn't exist)
      (The process started from chrome location /opt/google/chrome/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

      at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:524:15)
      at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:601:13)
      at Executor.execute (node_modules/selenium-webdriver/lib/http.js:529:28)

Operating System

ubuntu-latest GitHub action

Selenium version

4.12.0

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

Chrome 114,116

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

Chromedriver 114.0.2

Are you using Selenium Grid?

No

@ZeldaFlower ZeldaFlower added I-defect Something is not working as intended A-needs-triaging A Selenium member will evaluate this soon! labels Sep 21, 2023
@github-actions
Copy link

@ZeldaFlower, 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

DevToolsActivePort bug is a known issue that Google is working on.

@titusfortner titusfortner closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2023
@titusfortner titusfortner added the G-chromedriver Requires fixes in ChromeDriver label Sep 22, 2023
@github-actions
Copy link

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

@ZeldaFlower
Copy link
Author

@titusfortner , thanks so much for the info! Is there a link to Google's ticket?

@titusfortner
Copy link
Member

Not on my laptop right now, can search chromedriver bug tracker. There are several and to be honest I'm a little confused as to actual status of it.

@ZeldaFlower
Copy link
Author

Sad I can't use chrome until this is fixed. Maybe I could use previous version of selenium? Also looking into firefox instead...

@ZeldaFlower
Copy link
Author

I got firefox to work! https://groups.google.com/g/selenium-users/c/xNVh8F3UNRY/m/CcV4MImwAgAJ

@titusfortner , how do I ask for the documentation to be updated?

The official documentation Here has two issues:

  • one being a syntax error on the second await: await driver.findElement(By.name('q'));.sendKeys('webdriver', Key.RETURN);
  • The second is nothing is required to download now that selenium downloads chrome for you.

@titusfortner
Copy link
Member

That documentation has a lot more than 2 issues. 😁

We used to have a tool that would do automatic updates, but it is no longer working, and we haven't created a new one.

@diemol what do you think about our just deleting these files rather than keep them in their 2+ year old status?

@diemol
Copy link
Member

diemol commented Sep 26, 2023

Not sure. I think most of it should still be correct.

@ZeldaFlower
Copy link
Author

Ok, can we fix the two issues I mentioned in documentation? Is it committed in the code vase here? Can I help?

@diemol
Copy link
Member

diemol commented Sep 28, 2023

The problem is #10185, the docs generation is broken.

@titusfortner
Copy link
Member

"DevToolsActivePort not found" bug fix: https://bugs.chromium.org/p/chromedriver/issues/detail?id=4403#c35

Copy link

github-actions bot commented Dec 4, 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 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-needs-triaging A Selenium member will evaluate this soon! G-chromedriver Requires fixes in ChromeDriver I-defect Something is not working as intended
Projects
None yet
Development

No branches or pull requests

3 participants