Open eugenedani opened 5 months ago
@eugenedani, thank you for creating this issue. We will troubleshoot it as soon as we can.
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!
The capabilities you pass in are telling the grid to only provide a session with those capabilities. When options.setEnableDownloads(true) The grid can't satisfy the session request because it wasn't enabled.
Is this the right error message for that? Can it be improved? Maybe someone with more grid understanding can answer.
I supposed setEnableDownloads(true) should not have influence on session creation. I expect it will just ignore this option for this case.
If my expectation is not right then I would expect more informative error message. I spent couple of hours before I found out the problem
Or possible error can be noted in documentation
Amy time you ask for a session with a capability that the grid cannot satisfy it should error. Hopefully we can improve the error message.
Thank you for explanation It would be great to have better error message.
This issue is looking for contributors.
Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested.
@titusfortner In the case of error messages, more information is better. Unfortunately, DefaultSlotMatcher is only able to return true
or false
from its matches(Capabilities, Capabilities)
method. The specific capability mismatch that causes any given slot to be rejected is neither recorded nor reported. The other challenge is that a Grid instance can be expected to provide multiple slots that supply a variety of different types of sessions. The only way I can think of to provided more detailed diagnostic information would be to collect the details of each mismatch, returning this information in the exception if none of the available slots is able to satisfy the "new session" request.
What happened?
Run Selenium server as a standalone or hub/node without --enable-managed-downloads true parameter for example, java -jar /root/selenium-server-.jar standalone
Run a Selenium for any download files supported browser with driver option setEnableDownloads(true)
Receive error message org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Is it a bug or expected behavior? If this is expected behavior could error exception be more informative? For example, say something about --enable-managed-downloads parameter
How can we reproduce the issue?
Relevant log output
Operating System
Window, Linux
Selenium version
4.21.0
What are the browser(s) and version(s) where you see this issue?
Chrome 126, Edge 125, Firefox ESR 115.12.0
What are the browser driver(s) and version(s) where you see this issue?
Chrome WebDriver 126.0.6478.55, Gecko 0.34.0
Are you using Selenium Grid?
4.21.0