ChromeDriver failing to start
Hi,
I'm attempting to go through the tutorial. It fails with the following message:
$ protractor conf.js
Using the selenium server at http://localhost:4444/wd/hub
/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113
var template = new Error(this.message);
^
UnknownError: The process has not exited yet therefore no result is available ...
at new bot.Error (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113:18)
at Object.bot.response.checkResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:106:9)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:151:24
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
at webdriver.promise.ControlFlow.runInNewFrame_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1640:20)
at notify (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:444:12)
at notifyAll (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:422:7)
at resolve (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:400:7)
at fulfill (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:512:5)
at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
==== async task ====
WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:148:22)
at Function.webdriver.WebDriver.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:122:30)
at Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:293:22)
at HostedDriverProvider.getDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/hosted.js:63:9)
at /usr/local/lib/node_modules/protractor/lib/runner.js:238:41
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:573:44
$ webdriver-manager start
seleniumProcess.pid: 59834
15:51:19.915 INFO - Launching a standalone server
Setting system property webdriver.chrome.driver to /usr/local/lib/node_modules/protractor/selenium/chromedriver
15:51:19.948 INFO - Java: Oracle Corporation 25.20-b23
15:51:19.948 INFO - OS: Mac OS X 10.9.5 x86_64
15:51:19.955 INFO - v2.43.1, with Core v2.43.1. Built from revision 5163bce
15:51:19.999 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match with current platform: MAC
15:51:20.047 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
15:51:20.048 INFO - Version Jetty/5.1.x
15:51:20.049 INFO - Started HttpContext[/selenium-server,/selenium-server]
15:51:20.068 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@6e3c1e69
15:51:20.068 INFO - Started HttpContext[/wd,/wd]
15:51:20.068 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
15:51:20.068 INFO - Started HttpContext[/,/]
15:51:20.071 INFO - Started SocketListener on 0.0.0.0:4444
15:51:20.071 INFO - Started org.openqa.jetty.jetty.Server@4edde6e5
15:51:27.907 INFO - Executing: [new session: Capabilities [{count=1, browserName=chrome}]])
15:51:27.915 INFO - Creating a new session for Capabilities [{count=1, browserName=chrome}]
Starting ChromeDriver (v2.10.267517) on port 34042
Only local connections are allowed.
15:51:48.114 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:33'
System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.5', java.version: '1.8.0_20'
Driver info: driver.version: unknown
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:176)
at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:112)
at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:89)
at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:108)
at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:57)
at org.openqa.selenium15:51:48.123 WARN - Exception: The process has not exited yet therefore no result is available ...
I followed the steps in the tutorial:
$ npm install -g protractor
$ webdriver-manager update
$ webdriver-manager start
My conf.js and spec.js are copies of those in step 0 of the tutorial.
My version of protractor is the latest, 1.3.1. I also installed the latest release from the link to the JDK in the tutorial:
$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
Any idea how to fix this?
Do you have Chrome installed on your machine, or maybe is it installed in an odd place? It looks like chromedriver is having trouble opening a browser.
I do have chrome installed, and it's just a standard install. I guess looking at it that way, this may be an issue that exists outside of the purview of protractor?
Hm, using firefox works:
// conf.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['spec.js'],
capabilities: {
'browserName': 'firefox'
},
}
Definitely an issue with Chrome then. ChromeDriver seems to be starting fine from your logs, but having trouble finding your Chrome binary.
Looks like others are having this issue as well: https://code.google.com/p/chromedriver/issues/detail?id=736
Would you mind chiming in on that thread?
Sure thing, thanks!
On Friday, October 10, 2014, Julie Ralph [email protected] wrote:
Definitely an issue with Chrome then. ChromeDriver seems to be starting fine from your logs, but having trouble finding your Chrome binary.
Looks like others are having this issue as well: https://code.google.com/p/chromedriver/issues/detail?id=736
Would you mind chiming in on that thread?
— Reply to this email directly or view it on GitHub https://github.com/angular/protractor/issues/1424#issuecomment-58699878.
The same happens to me with Opera :o:
I'v got the same problem when using ChromeDriver v2.10. And I'v the same Java version with @stuartnelson3 which I recently updated. So, this problem may relate to the Java version.
Also, I find the something similar in the ChromeDriver release notes with the error report: https://chromedriver.storage.googleapis.com/2.10/notes.txt
Release Note:
----------ChromeDriver v2.10 (2014-05-01)----------
Supports Chrome v33-36
Resolved issue 780: Deny remote connections unless --whitelisted-ips is passed. [Pri-0]
Error Report:
15:51:27.915 INFO - Creating a new session for Capabilities [{count=1, browserName=chrome}]
Starting ChromeDriver (v2.10.267517) on port 34042
Only local connections are allowed.
I solved it by using back the ChromeDriver v2.9.
See https://code.google.com/p/chromium/issues/detail?id=422218. Following a trail of other similar bug reports (many initially assigning responsibility to chromedriver) all generally seem to end up there.
This issue now appears to have been resolved with the latest release of Chrome (tested in 39.0.2171.65 m). Updating Chrome on our Jenkins CI box has allowed us to re-enable protractor tests.
Yup, the bug causing this is fixed. Closing!
I've just updated protractor to 1.4.0 and updated selenium and chromedriver to 2.12 (I was using 2.9) and I'm still getting the same error (this one https://github.com/angular/protractor/issues/1309#issuecomment-57777300 to be exact - it was marked as a duplicate, but maybe it's not after all). I'm using Chrome beta, which at the moment is at version 40.0.2214.10 beta (64-bit). Switching back to chromedriver 2.9 fixes the issue for me.