SeleniumHQ / SeleniumHQ/docker-selenium

[🐛 Bug]: Selenium Grid throwing NoSuchSessionException – Session ID not found

Open
#3,025 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-triaging
Dominant language
Go
Stars
8.7k
Forks
2.5k
Avg merge
10h 16m
Merged PRs (30d)
20

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the stack-trace entry points LocalSessionMap.get, SessionMap.getUri, and HandleSession.loadSessionId, then reproduce the failure during parallel execution on the Kubernetes Helm deployment. Compare session lifetime with pod, network, and timeout events using the supplied Grid 4.38.0 versions. Done means identifying why an active session disappears and documenting a confirmed configuration or version resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, helm, java, kubernetes
Domain
devops, distributed-systems, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.