SeleniumHQ / selenium

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

[🐛 Bug]: Getting timeout exception in selenium grid (WebDriver could not start a new session. Response Code 500 #14207

Open jacob25paul opened 5 days ago

jacob25paul commented 5 days ago

What happened?

We are getting timeout exception from selenium grid intermittently and seeing some of our nodes with high cpu usage. we could not get any logs from nodes may be the request is not reaching to node level. Also how to enable logging in hub without explicitly starting selenium grid from command prompt

How can we reproduce the issue?

Our selenium grid configuration is with selenium 4.8.3 and this happens when tests are hitting on grid

Relevant log output

WebDriver was unable to create a new instance of type class org.openqa.selenium.remote.RemoteWebDriver
WebDriver reported the following message: no such execution context
  (Session info: MicrosoftEdge=125.0.2535.92)
Build info: version: '4.13.0', revision: 'ba948ece5b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1160.81.1.el7.x86_64', java.version: '17.0.1'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [666a952818a3fb64e860dd7f6f0381ad, maximizeCurrentWindow {}]
Capabilities {acceptInsecureCerts: false, browserName: MicrosoftEdge, browserVersion: 125.0.2535.92, fedcm:accounts: true, goog:chromeOptions: {args: [--remote-allow-origins=*]}, ms:edgeOptions: {debuggerAddress: localhost:52809}, msedge: {msedgedriverVersion: 125.0.2535.51 (b1bc6e892654..., userDataDir: C:\Users\selbot\AppData\Loc...}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: Windows 10, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://selenium4:4944/session..., se:cdpVersion: 125.0.2535.92, 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}
Session ID: 666a952818a3fb64e860dd7f6f0381ad

WebDriver was unable to create a new instance of type class org.openqa.selenium.remote.RemoteWebDriver
WebDriver reported the following message: no such execution context
  (Session info: MicrosoftEdge=125.0.2535.92)
Build info: version: '4.13.0', revision: 'ba948ece5b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1160.81.1.el7.x86_64', java.version: '17.0.1'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [c83feb1f7608b81a83b5b1a03a1e19f4, maximizeCurrentWindow {}]
Capabilities {acceptInsecureCerts: false, browserName: MicrosoftEdge, browserVersion: 125.0.2535.92, fedcm:accounts: true, goog:chromeOptions: {args: [--remote-allow-origins=*]}, ms:edgeOptions: {debuggerAddress: localhost:64017}, msedge: {msedgedriverVersion: 125.0.2535.51 (b1bc6e892654..., userDataDir: C:\Users\selbot\AppData\Loc...}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: Windows 10, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://selenium4:4944/session..., se:cdpVersion: 125.0.2535.92, 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}
Session ID: c83feb1f7608b81a83b5b1a03a1e19f4

Operating System

Windows 10

Selenium version

Java 17

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

chrome 122 and Edge 125

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

MicrosoftEdge=125.0.2535.92 and Chrome 122

Are you using Selenium Grid?

4.8.3

github-actions[bot] commented 5 days ago

@jacob25paul, 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 5 days ago

Hi, @jacob25paul. 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 5 days ago

4.8 is pretty old, and we can't fix old versions. Please update to the latest version of Selenium.

jacob25paul commented 2 days ago

We are updating our selenium grid to 4.20 and share more details