protractor: Running Protractor tests on Webdriver 2.47.1 gets - Error: Server terminated early with status 1
From https://github.com/SeleniumHQ/selenium/issues/1191:
Steps:
- Install Protractor 2.5.1 via npm
- Update webdriver/chrome: webriver-manager update (installs WebdriverJS 2.47.1)
- Run any Protractor test
Results: Two of four people on my team get the error below, and cannot ever run the tests until they downgrade webdriver. It works fine for the other two machines.
Impact:
Downgrading Webdriver to 2.45.0 fixes the problem. This occurs for 1/2 my team, and I found the same issue on StackOverflow
Error:
Starting selenium standalone server... [launcher] Running 1 instances of WebDriver [launcher] Process exited with error code 1 /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/nexttick.js:41 goog.global.setTimeout(function() { throw exception; }, 0); ^ Error: Server terminated early with status 1 at Error (native) at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:204:25 at promise.ControlFlow.runInFrame_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20) at goog.defineClass.notify (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25) at promise.Promise.notify_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12) at Array.forEach (native) at promise.Promise.notifyAll_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:553:15) at goog.async.run.processWorkQueue (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:130:15) at runMicrotasksCallback (node.js:337:7) at process._tickCallback (node.js:355:11)
This is affecting a coworker’s machine, but not my own 😕
Downgrading to webdriver v2.45.0 (i.e. protractor v2.2.0) is not an option for us since we have upgraded to Node.js v4.2.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 32 (4 by maintainers)
add directConnect: true to protractor.conf.js
@chriswong929 didn’t have webdriver-manager running, but installing
java
throughbrew cask
seems to fix it!Then selenium starts successfully and webdriver opens Chrome as expected.
So, seems to be some incompatibility with the standard OS X Java installation…? Very strange 😕
Turns out not to be a protractor issue though
As suggested in previous post,
solved for me.
EDIT: I believe that upgrading java through
brew
did solve my issue, but there was also an issue with my SOCKS proxy that was preventing a required connection which made it look like this wasn’t the case.This hasn’t been an issue with the proxy in the past, so I think something has changed somewhere, but it seems pretty unlikely that it is a problem for the protractor team.
I am seeing this issue too, and installing Java via brew does not solve the issue for me.
Then upon running the supplied bare-bones test above (i.e. opening chrome, navigating to google.com):
Unfortunately, not even downgrading to protractor v2.2 appears to solve this for me.
Following steps have resolved issue “Error: Another Selenium process is already running” for me as well, wasted last 2 hours trying to sort this out.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew cask install java
Thanks a lot guys
@chovy Try
brew uninstall --force brew-cask; brew update
.See also Homebrew-Cask README.md / https://github.com/caskroom/homebrew-cask/pull/15381