Skip to content

[🐛 Bug]: Facing "Unable to find session with id" errors during initial executions of the test in the Selenium grid #15347

Closed
@rookieInTraining

Description

@rookieInTraining

What happened?

Hi team! I've been debugging a probable issue with my selenium grid setup. A couple of seconds/minutes into my tests I face a lot of "Unable to find session with ID" exceptions and a large chunk of my test suite fails. The behaviour looks similar to the comment mentioned here just that in my case, since the grid is dynamic is could be an event where the node is initialized.

The configurations that I'm using for the hub:

      - env:
        - name: SE_ENABLE_TRACING
          value: "true"
        - name: SE_OPTS
          value: --log-level FINE
        - name: SE_NODE_SESSION_TIMEOUT
          value: "1800"

Image
Image
Image

Any pointers to debug this issue further would help.

How can we reproduce the issue?

The framework that is in use is a variant of the code present here (with the latest selenium version and JDK 17 as a requirement) : https://github.com/rookieInTraining/selenium-testng-boilerplate/tree/master

Relevant log output

Unable to find session with ID: 7a6e3f0073bd7b9f385a5aa2da3d5521 Build info: version: '4.28.1', revision: '73f5ad48a2' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.1.58+', java.version: '17.0.13' Driver info: driver.version: unknown Build info: version: '4.28.0', revision: 'ac342546e9' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.14.0-362.24.2.el9_3.x86_64', java.version: '17.0.9' Driver info: org.openqa.selenium.remote.RemoteWebDriver Command: [7a6e3f0073bd7b9f385a5aa2da3d5521, get {url=https://space-prod0-automation.sprinklr.com//workforce-planner-app/home}] Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 132.0.6834.159, chrome: {chromedriverVersion: 132.0.6834.159 (2d77d3fc445..., userDataDir: /tmp/.org.chromium.Chromium...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:42597}, goog:loggingPrefs: {browser: ALL}, networkConnectionEnabled: false, pageLoadStrategy: none, platformName: linux, proxy: Proxy(), se:bidiEnabled: false, se:cdp: wss://qa6-selenium-grid-car..., se:cdpVersion: 132.0.6834.159, se:containerName: care-chrome-node-579655886b..., se:name: workforce-management/smoke-..., se:noVncPort: 7900, se:vnc: wss://qa6-selenium-grid-car..., se:vncEnabled: true, se:vncLocalAddress: ws://10.102.35.210:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: accept, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true} Session ID: 7a6e3f0073bd7b9f385a5aa2da3d5521
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
org.openqa.selenium.remote.ErrorCodec.decode(ErrorCodec.java:167)
org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:138)
org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:50)
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:215)
org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:53)
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:313)
com.spr.tests.workforcemanagement.ShiftActivityTest.goToActivities(ShiftActivityTest.java:20)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base/java.lang.reflect.Method.invoke(Method.java:568)
org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69)
org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:390)
org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:325)
org.testng.internal.invokers.TestInvoker.runConfigMethods(TestInvoker.java:810)
org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:577)
org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:227)
org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:957)
org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:200)
org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:148)
org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
java.base/java.lang.Thread.run(Thread.java:842)

Operating System

Linux (Docker)

Selenium version

4.28.1

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?

132.0.6834.159

Are you using Selenium Grid?

4.28.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!I-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions