Closed Bug 1916463 Opened 1 year ago Closed 2 months ago

New session with empty capabilities returns empty proxy property

Categories

(Remote Protocol :: WebDriver BiDi, defect, P3)

defect
Points:
2

Tracking

(firefox151 fixed)

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: james.h.evans.jr, Assigned: whimboo)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [webdriver:m20][webdriver:relnote])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

Send a new session request via the WebDriver BiDi protocol with no capabilities specified.

Payload:
{"id":1,"method":"session.new","params":{"capabilities":{}}}

Actual results:

The response contains a proxy property whose value is an empty object.

{"type":"success","id":1,"result":{"sessionId":"88a2cef9-42b3-4e96-9b58-9af8e798306e","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"132.0a1","platformName":"mac","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0","moz:buildID":"20240903092500","moz:headless":false,"moz:platformVersion":"23.6.0","moz:processID":37377,"moz:profile":"/var/folders/c2/b_92c0_j45982zbd3b6vwp0r0000gp/T/webdriverbidi-net-firefox-data-dbb862ea-920b-43c6-8d38-2c12d34702b7","moz:shutdownTimeout":60000,"proxy":{}}}}

Expected results:

According to https://w3c.github.io/webdriver-bidi/#command-session-new, the proxy property is optional in a response. If the property is returned, https://w3c.github.io/webdriver-bidi/#type-session-ProxyConfiguration specifies that it is not permitted to be an empty object. Either omit the property in the response when there is no proxy specified, or provide a validly formed proxy configuration object.

Blocks: 1719290
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: Firefox 132 → Trunk

For WebDriver classic we always return the proxy even if it's empty:
https://searchfox.org/mozilla-central/rev/26a98a7ba56f315df146512c43449412f0592942/remote/shared/webdriver/Capabilities.sys.mjs#518-521

I wonder if Chrome and Safari actually return it these days and if we can get rid of it from the returned capabilities completely.

But that also depends on the outcome of https://github.com/w3c/webdriver/issues/1813.

Severity: -- → S3
Priority: -- → P3
Whiteboard: [webdriver:backlog]

It is impossible to write a client that strictly adheres to the WebDriver BiDi protocol and create a BiDi-only session with Firefox while this bug is present. Firefox should omit the proxy property if it is unset. Chromium implementations of BiDi, in particular, do not send the property in the response if it is not set in the request.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Attachment #9562617 - Attachment description: WIP: Bug 1916463 - [bidi] Don't return "proxy" capability if it is not set. → Bug 1916463 - [bidi] Don't return "proxy" capability if it is not set.

(In reply to Henrik Skupin [:whimboo][⌚️UTC+1] from comment #1)

But that also depends on the outcome of https://github.com/w3c/webdriver/issues/1813.

WebDriver classic might behave different here, but for WebDriver BiDi it's clearly breaking the CDDL when we return an empty object. As such the attached patch will not make a change to WebDriver classic to keep backward compat (at least for now).

Points: --- → 2
Whiteboard: [webdriver:backlog] → [webdriver:m20]
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
Whiteboard: [webdriver:m20] → [webdriver:m20][webdriver:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: