Open Bug 1754016 Opened 2 years ago Updated 2 years ago

[android] Use a system allocated port for WebDriver BiDi

Categories

(Testing :: geckodriver, enhancement, P3)

Default
enhancement
Points:
8

Tracking

(Not tracked)

People

(Reporter: whimboo, Unassigned)

References

Details

(Whiteboard: [webdriver:backlog])

Similar to Marionette (bug 1240830) we would like to see that the Remote Agent can use a system allocated port on Android. But the problem here is the port forwarding via adb. Given that it is not a basic socket but a WebSocket the port needs to be equal on the host and the device. That means that even if the Remote Agent gets a free port, we might fail on the host side because the port is already in use.

We might be able to do the following:

  1. Let geckodriver try to find a free port on both the host and the device
  2. Immediately setup the adb forwarding so that the port on the host is in use and can no longer be acquired by some other service
  3. Hope that the Remote Agent is able to acquire the requested port - if not kill the browser and try again with step 1.

What's more complex is to use geckodriver as a WebSocket proxy, which is out of scope for now.

What we actually could use here is a whitelist entry for host/origin for the host so that we not necessarily have to run the adb forward on the same port on the host and device. We would have to wait for bug 1750689.

Depends on: 1750689
Points: --- → 8
Priority: -- → P3
Whiteboard: [bidi-m3-mvp]
Whiteboard: [bidi-m3-mvp] → [webdriver:backlog]
You need to log in before you can comment on or make changes to this bug.