SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
30.75k stars 8.19k forks source link

[šŸ› Bug]: ChromeBeta session not starting #12346

Closed girasegauravi closed 1 year ago

girasegauravi commented 1 year ago

What happened?

I am executing a complete automated suite which has multiple test cases and for each test case I am launching a new chrome driver session.

Earlier after random number of successful launch at 1 launch it fails with below exception: org.openqa.selenium.SessionNotCreatedException: session not created from no such execution context: uniqueContextId not found

But now with same behaviour but different exception: org.openqa.selenium.SessionNotCreatedException: session not created from no such execution context: loader has changed while resolving nodes (Session info: chrome=115.0.5790.75) Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'PC01SSDEVEL192', ip: '10.245.212.221', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_361' Driver info: driver.version: ChromeDriver

I am using chrome beta version 115 I have provided it's executable path in binary of chrome options and also passing the compatible driver.

Need help to understand what might be going wrong in this case? And How to fix it?

How can we reproduce the issue?

Create a suite of multiple test cases and for each test case start a new chrome beta session

Relevant log output

org.openqa.selenium.SessionNotCreatedException: session not created from no such execution context: loader has changed while resolving nodes (Session info: chrome=115.0.5790.75) Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'PC01SSDEVEL192', ip: '10.245.212.221', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_361' Driver info: driver.version: ChromeDriver

Operating System

Windows 10

Selenium version

3.141.59

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

Chrome Beta 115.0.5790.75

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

115.0.5790.56

Are you using Selenium Grid?

No

github-actions[bot] commented 1 year ago

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

github-actions[bot] commented 1 year ago

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

titusfortner commented 1 year ago

Note that we only support the most recent version of Selenium.

ajaylamba-provar commented 1 year ago

We are also getting the same exception, chrome version 114, selenium version 3.4.0

titusfortner commented 1 year ago

Selenium 3.4 is over 6 years old. Please update to Selenium 4.10

girasegauravi commented 1 year ago

Hey @titusfortner,

We are in the process of updating Selenium version. But due to constraint for time being - we have to work with Selenium 3.141.59. Could you please guide us on possible causes of the issue and possible solutions we can try.

Thank you.

titusfortner commented 1 year ago

No, we're working very hard to get the current release to support everything it needs to. I'll post some links for other places to ask questions, but this tracker is for reproducible issues in the current code.

github-actions[bot] commented 1 year ago

šŸ’¬ Please ask questions at:

ajaylamba-provar commented 1 year ago

Just an update: The issue is occurring due to recent changes done in Chrome 113. The issue has been acknowledged by Chrome team and is fixed in Chrome 117. Reference: https://bugs.chromium.org/p/chromedriver/issues/detail?id=4205

mweitzel commented 1 year ago

I'm seeing this (or at least very similar) issue on 117. I'm not sure it is resolved.

titusfortner commented 1 year ago

It was re-opened. There are several related tickets. I'm actually not sure the current status.

ajaylamba-provar commented 1 year ago

I also experienced this issue yesterday intermittantly on chrome 117. WebDriverException: no such execution context(Session info: chrome=117.0.5938.89) (Driver info: chromedriver=117.0.5938.88 (be6afae4721209be42944bbcd325665f9f44563b-refs/branch-heads/5938_62@{#9}),platform=Windows NT 10.0.14393 x86_64)

Mohan-Kumar-T commented 1 year ago

I faced this same issue on chrome 118.0.5993.70 version.

org.openqa.selenium.WebDriverException: no such execution context (Session info: chrome=118.0.5993.70) time: '2018-11-14T08:17:03'os.name: 'Linux', os.arch: 'amd64', os.version: '5.15.0-1039-aws', java.version: '17.0.8' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 118.0.5993.70, chrome: {chromedriverVersion: 118.0.5993.70 (e52f33f30b91..., userDataDir: /tmp/.org.chromium.Chromium...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:33391}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}

dineshjangam08 commented 1 year ago

Facing same issue in 119 version

While executing regression suite random test cases are getting failed failed in azure pipeline with Error: ChromeDriver process exited with code: 1

AbdelrahmanSadat commented 1 year ago

Facing same issue in 119 version

While executing regression suite random test cases are getting failed failed in azure pipeline with Error: ChromeDriver process exited with code: 1

Is this consistent, and were you able to resolve it?

OndraBozek commented 1 year ago

I also have the same issue with chromeDriver v119 and was not able to find solution how to resolve this.

Colleagues do not have the same issue as me and we checked what we could and we were not able to find difference. So please if you have some solution, let me know šŸ‘

dineshjangam08 commented 1 year ago

Facing same issue in 119 version While executing regression suite random test cases are getting failed failed in azure pipeline with Error: ChromeDriver process exited with code: 1

Is this consistent, and were you able to resolve it?

Yes, it is resolved it was due to the low configuration issue of the pipeline when I increased the configuration it worked fine

marineni-seleniumtesting commented 11 months ago

I have same issue everyday only in Teamcity run, when I run in local I don't see this Issue. Its so frustrating, and I started hating this change for chrome with no solution I am able to find

Error: org.openqa.selenium.SessionNotCreatedException: session not created from no such execution context: loader has changed while resolving nodes (Session info: chrome=116.0.5845.96)

Windows Server 2019

java.version: 20.0.2

seleniumversion 3.141.59

os.version: 10.0

testng 7.8.0

dineshsjangam commented 11 months ago

I have same issue everyday only in Teamcity run, when I run in local I don't see this Issue. Its so frustrating, and I started hating this change for chrome with no solution I am able to find

Error: org.openqa.selenium.SessionNotCreatedException: session not created from no such execution context: loader has changed while resolving nodes (Session info: chrome=116.0.5845.96)

Windows Server 2019

java.version: 20.0.2

seleniumversion 3.141.59

os.version: 10.0

testng 7.8.0

Upgrade selenium version

OndraBozek commented 11 months ago

Facing same issue in 119 version While executing regression suite random test cases are getting failed failed in azure pipeline with Error: ChromeDriver process exited with code: 1

Is this consistent, and were you able to resolve it?

Yes, it is resolved it was due to the low configuration issue of the pipeline when I increased the configuration it worked fine

I still have this issue on my Macbook Pro with M2 Pro and 16GB RAM. I don't think that it can be resolved by increasing the configuration for me. Any other suggestion what I can do? Thanks

dineshsjangam commented 11 months ago

Facing same issue in 119 version While executing regression suite random test cases are getting failed failed in azure pipeline with Error: ChromeDriver process exited with code: 1

Is this consistent, and were you able to resolve it?

Yes, it is resolved it was due to the low configuration issue of the pipeline when I increased the configuration it worked fine

I still have this issue on my Macbook Pro with M2 Pro and 16GB RAM. I don't think that it can be resolved by increasing the configuration for me. Any other suggestion what I can do? Thanks

Its not your Macbook configuration please check your VM configuration

OndraBozek commented 11 months ago

Facing same issue in 119 version While executing regression suite random test cases are getting failed failed in azure pipeline with Error: ChromeDriver process exited with code: 1

Is this consistent, and were you able to resolve it?

Yes, it is resolved it was due to the low configuration issue of the pipeline when I increased the configuration it worked fine

I still have this issue on my Macbook Pro with M2 Pro and 16GB RAM. I don't think that it can be resolved by increasing the configuration for me. Any other suggestion what I can do? Thanks

Its not your Macbook configuration please check your VM configuration

What VM? I start the test locally on my Macbook. So there is no VM.

Also test on our Jenkins machine works like a charm without any issues

krmahadevan commented 11 months ago

@OndraBozek - Let's take a step back.

The latest selenium releases automatically manage the availability of the browser driver binary via a component called Selenium Manager.

This means that selenium manager would on runtime detect what browser version you would like to work with and then accordingly download the browser driver binary (chromedriver/geckodriver/edgedriver etc).

But Selenium Manager will refrain from doing all this, if it finds a browser driver binary that already exists on your machine and which can be detected from the $PATH variable.

So can you please check if there's any chromedriver binary that is already present in your MackBook and available via the PATH variable? You can quickly check this by opening up a terminal and typing which chromedriver.

Here's an example

āžœ  ~ which chromedriver
chromedriver not found
āžœ  ~ which geckodriver
geckodriver not found
āžœ  ~ which mate
/usr/local/bin/mate
āžœ  ~

The sample should clarify how the output would look like, when you find a binary and when you don't.

If the above exercise doesn't result in any binary, then lets move to the next step.

Please share the following:

  1. What version of Selenium are you working with.
  2. What does a sample code look like, that you are using to simulate the problem.
ajaylamba-provar commented 11 months ago

@marineni-seleniumtesting Similar issue was fixed in Chrome 117. Worth giving a try to upgrade Chrome to 117 and also the chrome driver.

And if the issue still persists, you can add a retry mechanism for the session creation by catching the SessionNotCreatedException exception. You can add proxy class (using cg-lib or similar libraries) to intercept the selenium methods.

github-actions[bot] commented 10 months ago

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.