Problem
When running chromedriver without arguments there is some environments that will fail to bind to a local port unless the --allowed-ips flag is passed.
Steps to reproduce
I attempted to run nightwatch tests inside a docker environment and chromedriver was not binding to the default port.
This can be reproduced running
docker run -it --rm selenium/standalone-chrome:97.0 chromedriver
and
docker run -it --rm selenium/standalone-chrome:97.0 chromedriver --allowed-ips
The later won't display
[1642762419.323][SEVERE]: bind() failed: Cannot assign requested address (99)
And will bind the proper port.
Proposed resolution
Allow the environment to be configured to specify this arguments
Remaining tasks
Add new enviroment variable DRUPAL_TEST_WEBDRIVER_CLI_ARG
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
Added new DRUPAL_TEST_WEBDRIVER_CLI_ARG env variable to pass arguments to chromedriver
Issue fork drupal-3259751
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rodrigoaguileraComment #6
smustgrave commentedCan the MR be updated to point to 10.1 please.
Comment #7
nod_Also how is it different from
DRUPAL_TEST_WEBDRIVER_CHROME_ARGS?Comment #8
rodrigoaguileraRebased agains 10.1.x.
The difference is the flags that are going to be passed to chromedriver or to chrome. As far as I remember struggling with this --allowed-ips is an option only for chromedriver.
Comment #9
nod_Thanks, that makes sense to me.
The comment still needs work as the text and the variable name do not match. If someone is using firefox they would use the same variable to pass argument to the driver.
Comment #10
smustgrave commentedUpdated comment.
Comment #11
nod_Just remembered that we removed chromedriver from package Jason. We don't know where it's installed so we need to remove the
sever_pathargComment #12
nod_after that it's good to go
Comment #13
smustgrave commentedRemoved server_path from nighwatch.config
Comment #14
nod_Lgtm
Comment #15
alexpottAs a test only change backported to 9.5.x. We also allow you to configure this for PHPUnit using Webdriver so allowing it for Nightwatch makes sense. It doesn't apply to 9.4.x
Committed 594a227 and pushed to 10.1.x. Thanks!
Committed 13a1922 and pushed to 10.0.x. Thanks!
Committed db81f8f and pushed to 9.5.x. Thanks!