Updating from 6.1.0 to 6.2.0 broke builds on CircleCI
Expected Behavior
Minor release does not break downstream libraries
Current Behavior
v6.2.0 Breaks the build https://circleci.com/gh/nkbt/nightwatch-autorun/598 Pinning to v6.1.0 fixes the build back https://circleci.com/gh/nkbt/nightwatch-autorun/599
Logs
----------
selenium-standalone installation starting
----------
---
selenium install:
from: https://selenium-release.storage.googleapis.com/3.3/selenium-server-standalone-3.3.1.jar
to: /home/ubuntu/nightwatch-autorun/node_modules/selenium-standalone/.selenium/selenium-server/3.3.1-server.jar
---
chrome install:
from: https://chromedriver.storage.googleapis.com/2.28/chromedriver_linux64.zip
to: /home/ubuntu/nightwatch-autorun/node_modules/selenium-standalone/.selenium/chromedriver/2.28-x64-chromedriver
---
firefox install:
from: https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz
to: /home/ubuntu/nightwatch-autorun/node_modules/selenium-standalone/.selenium/geckodriver/0.15.0-x64-geckodriver
...
-----
selenium-standalone installation finished
-----
Error: Selenium server did not start.
Another Selenium process may already be running or your java version may be out of date.
Be sure to check the official Selenium release notes for minimum required java version: https://raw.githubusercontent.com/SeleniumHQ/selenium/master/java/CHANGELOG
at ChildProcess.errorIfNeverStarted (/home/ubuntu/nightwatch-autorun/node_modules/selenium-standalone/lib/start.js:152:10)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
Your Environment
- Version of
selenium-standalonethat you are using: 6.2.0 - Is there another tool calling
selenium-standaloneon your behalf: - System/platform: Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-115-generic x86_64)
- Other details that might be important:
ubuntu@box1482:~$ java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
@nkbt Thanks for the report!
It looks like this is actually failing because of the change from defaulting to the selenium server version from 3.0.1 to 3.3.1 (but really anything after 3.1.0 has this same problem). Selenium changed how some of the command line arguments are being interpreted, but didn't call out the changes in the release notes. I opened https://github.com/SeleniumHQ/selenium/issues/3877 to ask them to update their release notes, but that is an aside.
As for how nightwatch-autorun is impacted, on https://github.com/nkbt/nightwatch-autorun/blob/44bb4cd17bfaf7586464907e202095899de06d5a/runner.js#L130 it is passing in the -debug argument to selenium. If that is changed to ['-debug', 'true'], the latest version of selenium will be happy again. The other option would be to define the specific version of selenium server that you want to work with.
How I was able to track this down: by chance, [email protected] added debug logging. So from the nightwatch-autorun@greenkeeper/selenium-standalone-6.2.0 repo, I ran
$> DEBUG=selenium-standalone:* npm test
...
selenium-standalone:start Start API called with { seleniumArgs: [ '-debug' ] } +1ms
selenium-standalone:start Spawning Selenium Server process /Users/sash/.jenv/shims/java [ '-Dwebdriver.chrome.driver=/Users/sash/Desktop/nightwatch-autorun-master/node_modules/selenium-standalone/.selenium/chromedriver/2.28-x64-chromedriver',
'-Dwebdriver.gecko.driver=/Users/sash/Desktop/nightwatch-autorun-master/node_modules/selenium-standalone/.selenium/geckodriver/0.15.0-x64-geckodriver',
'-jar',
'/Users/sash/Desktop/nightwatch-autorun-master/node_modules/selenium-standalone/.selenium/selenium-server/3.3.1-server.jar',
'-debug' ] +5ms
Error: Selenium server did not start.
Another Selenium process may already be running or your java version may be out of date.
Be sure to check the official Selenium release notes for minimum required java version: https://raw.githubusercontent.com/SeleniumHQ/selenium/master/java/CHANGELOG
at ChildProcess.errorIfNeverStarted (/Users/sash/Desktop/nightwatch-autorun-master/node_modules/selenium-standalone/lib/start.js:152:10)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
npm ERR! Test failed. See above for more details.
Running that java -jar 3.3.1-server.jar -debug command manually gave me the error message that I needed:
$> java -jar 3.3.1-server.jar -debug
Exception in thread "main" com.beust.jcommander.ParameterException: Expected a value after parameter -debug
at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:883)
at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:857)
at com.beust.jcommander.JCommander.parseValues(JCommander.java:725)
at com.beust.jcommander.JCommander.parse(JCommander.java:282)
at com.beust.jcommander.JCommander.parse(JCommander.java:265)
at com.beust.jcommander.JCommander.<init>(JCommander.java:210)
at org.openqa.grid.selenium.GridLauncherV3$1.setConfiguration(GridLauncherV3.java:227)
at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:155)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:75)
Since this seems to be a problem with the selenium server process and the arguments that nightwatch-autorun is providing, I'm going to close this issue. Let us know if there is anything else we can help with.
Thanks heaps 🙏! That would probably take a good chunk of time to figure out.
I'll get that fixed now... that debug thing is definitely a bjeaking public api, and selenium sid not release a major version. This is not a first time unfortunately and I am afraid they just do not really respect semver :(
Thanks again. That thing is fixed now: https://github.com/nkbt/nightwatch-autorun/pull/195/files