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

Đang mở
#3,025 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
docker, helm, java, kubernetes

Hướng nghiên cứu

Bắt đầu với các điểm vào của stack trace LocalSessionMap.get, SessionMap.getUri và HandleSession.loadSessionId, sau đó tái hiện lỗi trong quá trình thực thi song song trên deployment Kubernetes Helm. So sánh vòng đời của session với các sự kiện pod, network và timeout bằng cách sử dụng các phiên bản Grid 4.38.0 được cung cấp. Hoàn thành khi xác định được lý do một session đang hoạt động biến mất và ghi lại một cách giải quyết về cấu hình hoặc phiên bản đã được xác nhận.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

needs-triaging R-awaiting-answer
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

Ngôn ngữ chính
Go
Star
8.7k
Fork
2.5k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SeleniumHQ/docker-selenium

Tất cả issue của SeleniumHQ/docker-selenium

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.