Open sbabcoc opened 2 months ago
@sbabcoc, 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 wrinkle here is that we now have Appium extension capabilities which are being matched through this improper behavior. Fixing this is going to require either adding explicit matching for Appium capabilities in DefaultNodeMatcher or requiring a specific Appium node matcher.
There was an issue filed about one year ago that seems related to what I'm seeing: #12640
Also #14216
The Appium-specific logic added to RelaySessionFactory is a direct result of incorporating too much processing on new session
requests. Decisions about how to handle unspecified values should be made by the consumer, not applied by generic transport-layer implementation.
The W3C specification confirms my instincts. https://www.w3.org/TR/webdriver1/#new-session
... an intermediary node cannot forward extension capabilities specific to that implementation to an endpoint node...
The spec strongly recommends that vendor-specific features be passed via top-level parameters, not via requested capabilities. Regardless, these sorts of vendor-specific features should be processed by vendor-specific slot matchers. The default slot matcher should not include handling of vendor-specific features.
What happened?
My Selenium framework includes the ability to manage a local Grid instance, including Appium nodes. Because the Appium server needs an execution context to function, I have the ability to run the server via PM2. When this configuration is employed, the shutdown procedure is different. Consequently, I need to include a property in the capabilities object that indicates this configuration. This is done via an extension capability names
nord:options
. The expectation is that this capability will be available to query, but won't affect slot matching. Unfortunately, this isn't currently the case. Adding this extension capability causes the corresponding node to no longer match Appium session requests.The scenario that caused my immediate issue is that both the node capabilities and the new session request define values for
nord:options
, each specifying a different informational property. The slot matcher compares the values of these capabilities and rejects the slot because the objects differ.How can we reproduce the issue?
Relevant log output
Operating System
Windows 10
Selenium version
4.23.0
What are the browser(s) and version(s) where you see this issue?
All
What are the browser driver(s) and version(s) where you see this issue?
AndroidDriver (RemoteWebDriver)
Are you using Selenium Grid?
4.23.0