Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: org.openqa.selenium.WebDriverException: Unable to route (POST) /session/0405a24bf1d06c6ae8402b8d12027934/... #13769

Open
joerg1985 opened this issue Apr 3, 2024 · 5 comments

Comments

@joerg1985
Copy link
Member

joerg1985 commented Apr 3, 2024

What happened?

When executing a command on a just timedout session a WebDriverException: Unable to route ... is raised.

How can we reproduce the issue?

For some seconds after the session timedout there is a inconsistent state, until the sessionCleanupNodeService of the LocalNode did run. The LocalSessionMap still tells the session does exist, but the Node.isSessionOwner does return false. This will prevent the route inside the Node is matched and lead to the WebDriverException: Unable to route ....

Relevant log output

N/A

Operating System

Win 10 x64

Selenium version

4.17.1

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

N/A

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

N/A

Are you using Selenium Grid?

N/A

Copy link

github-actions bot commented Apr 3, 2024

@joerg1985, 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!

@diemol
Copy link
Member

diemol commented Apr 11, 2024

How do you think Grid should behave in this case? Should the exception be more clear?

@joerg1985
Copy link
Member Author

@diemol At this time the exception is raised the session is allready timed out.
So i would expect a NoSuchSessionException and not something that indicates an grid bug.

@diemol
Copy link
Member

diemol commented Apr 11, 2024

Do you know where this exception was shown? I can tweak the response we send to the user.

@joerg1985
Copy link
Member Author

It is raised here:

HttpResponse response = new HttpResponse();
response.setStatus(404);
response.setContent(
asJson(
ImmutableMap.of(
"value", request.getUri(),
"message", "Unable to route " + request,
"error", UnsupportedCommandException.class.getName())));
return response;

Here the session map still returns the session, but the following ownership check fails:

getSessionId(req.getUri())
.map(SessionId::new)
.map(this::isSessionOwner)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants