Skip to content

[πŸ› Bug]: Selenium Grid throwing NoSuchSessionException – Session ID not foundΒ #3025

@venkat-enable

Description

@venkat-enable

What happened?

Error:

org.openqa.selenium.NoSuchSessionException: Unable to find session with ID: 227114db1ad53c034d05e1d57af7fefb

Stacktrace:

Build info: version: '4.38.0', revision: '6b412e825c' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.105+', java.version: '21.0.8' Driver info: driver.version: unknown at org.openqa.selenium.grid.sessionmap.local.LocalSessionMap.get(LocalSessionMap.java:119) at org.openqa.selenium.grid.sessionmap.SessionMap.getUri(SessionMap.java:84) at org.openqa.selenium.grid.router.HandleSession.lambda$loadSessionId$4(HandleSession.java:231) at org.openqa.selenium.grid.router.HandleSession.execute(HandleSession.java:188) ... at java.base/java.lang.Thread.run(Thread.java:1583)

Summary

Selenium Grid intermittently fails to locate an active session, causing tests to break with NoSuchSessionException. The session appears to be lost or removed from the SessionMap before the request is routed.

Command used to start Selenium Grid with Docker (or Kubernetes)

used this command to install

helm install my-selenium-grid selenium-grid/selenium-grid --version 0.49.1

Relevant log output

Environment

Selenium Grid version: 4.38.0

Deployment: Kubernetes (Helm – SeleniumHQ/docker-selenium chart)

OS: Linux 6.6.105+

Java: 21.0.8

Observed Behavior

Session starts successfully.

During test execution, Grid returns Unable to find session with ID.

Logs suggest the session is not present in LocalSessionMap.

Expected Behavior

Active sessions should remain available until closed by the client or Grid.

Possible Causes

Pod restart / crash in Node or Session container.

Network issue between Router β†’ SessionMap β†’ Node.

Selenium Grid bug in session persistence for distributed deployments.

Session timeout due to inactivity or long test steps.

Required Actions

Please investigate:

Why the session is disappearing from the SessionMap.

Whether this is a known issue in Selenium 4.38.0.

Any recommended configuration changes for K8s-based grid.

Whether upgrading or downgrading Grid components resolves the issue.

Additional Notes

Issue happens repeatedly during parallel execution.

Operating System

GKE

Docker Selenium version (image tag)

4.38.0

Selenium Grid chart version (chart version)

4.38.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions