New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot launch Chrome: OSX 10.9.3, Selenium 2.42.0, chromedriver 2.10 #954

Closed
ldeavila opened this Issue Jun 19, 2014 · 25 comments

Comments

Projects
None yet
@ldeavila

ldeavila commented Jun 19, 2014

Trying to run protractor tests on OSX. We get the error below. Have tried a variety of fixes suggested. I think we're running the latest stand-alone server and chrome driver. Thoughts?

/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:109
 var template = new Error(this.message);
                ^
UnknownError: null
   at new bot.Error (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:109:18)
   at Object.bot.response.checkResponse (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:106:9)
   at /Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:134:24
   at /Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1243:15
   at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1531:20)
   at notify (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:354:12)
   at notifyAll (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:323:7)
   at resolve (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:301:7)
   at fulfill (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:421:5)
   at /Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1243:15
==== async task ====
WebDriver.createSession()
   at Function.webdriver.WebDriver.acquireSession_ (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:49)
   at Function.webdriver.WebDriver.createSession (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:111:30)
   at Builder.build (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/selenium-webdriver/builder.js:106:20)
   at HostedDriverProvider.getDriver (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/lib/driverProviders/hosted.js:54:9)
   at /Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/lib/runner.js:207:35
   at _fulfilled (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:797:54)
   at self.promiseDispatch.done (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:826:30)
   at Promise.promise.promiseDispatch (/Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:759:13)
   at /Users/riley/dash.frontend/node_modules/grunt-protractor-runner/node_modules/protractor/node_modules/q/q.js:525:49
@juliemr

This comment has been minimized.

Member

juliemr commented Jun 20, 2014

You're right, the error is in not starting chrome. Can you post the logs from the selenium stand-alone server?

@ldeavila

This comment has been minimized.

ldeavila commented Jun 20, 2014

Hi Julie.

Here is the log. The log is from a different box (first was a macbook pro, this one is from a mac mini) but the errors are exactly the same.

Browsers-Mac-mini:dash.frontend btp$ ./node_modules/protractor/bin/webdriver-manager start
seleniumProcess.pid: 2695
Jun 20, 2014 10:56:02 AM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
Setting system property webdriver.chrome.driver to /Users/btp/dash.frontend/node_modules/protractor/selenium/chromedriver
10:56:02.323 INFO - Java: Apple Inc. 20.65-b04-462
10:56:02.323 INFO - OS: Mac OS X 10.9.2 x86_64
10:56:02.334 INFO - v2.42.0, with Core v2.42.0. Built from revision 5e82430
10:56:02.397 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: MAC
10:56:02.447 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
10:56:02.448 INFO - Version Jetty/5.1.x
10:56:02.448 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
10:56:02.449 INFO - Started HttpContext[/selenium-server,/selenium-server]
10:56:02.449 INFO - Started HttpContext[/,/]
10:56:02.489 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@56d73c7a
10:56:02.490 INFO - Started HttpContext[/wd,/wd]
10:56:02.495 INFO - Started SocketListener on 0.0.0.0:4444
10:56:02.495 INFO - Started org.openqa.jetty.jetty.Server@4ca31e1b
10:56:16.516 INFO - Executing: [new session: Capabilities [{count=1, browserName=chrome}]])
10:56:16.530 INFO - Creating a new session for Capabilities [{count=1, browserName=chrome}]
Starting ChromeDriver (v2.10.267517) on port 48763
Only local connections are allowed.
10:56:36.860 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.42.0', revision: '5e82430', time: '2014-05-22 20:18:07'
System info: host: 'Browsers-Mac-mini.local', ip: '192.168.0.31', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.2', java.version: '1.6.0_65'
Driver info: driver.version: unknown
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    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:110)
    at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:57)
10:56:36.869 WARN - Exception: null

Many Thanks

@juliemr

This comment has been minimized.

Member

juliemr commented Jun 20, 2014

Look suspiciously similar to this ChromeDriver issue: https://code.google.com/p/chromedriver/issues/detail?id=736

@ldeavila

This comment has been minimized.

ldeavila commented Jun 20, 2014

Does look very similar.
Started stand-alone server with java, like in the linked issue, and got a similar stack trace.
I verified that Chrome is installed in the expected path as defined here: https://code.google.com/p/selenium/wiki/ChromeDriver

I'm pretty stumped.

@juliemr

This comment has been minimized.

Member

juliemr commented Jun 20, 2014

I just updated the version of selenium-standalone on master from 2.42.0 to 2.42.2. If you're able, could you try running with that and see if it's fixed?

The next version of protractor on npm with this bump should be out next week.

@juliemr

This comment has been minimized.

Member

juliemr commented Jun 26, 2014

Version bump is now out. Is this fixed?

@ldeavila

This comment has been minimized.

ldeavila commented Jun 27, 2014

Hi Julie. Sorry for the delay. Unfortunately, the update to version 2.42.2 did not help. Also, unfortunately, the team is moving on and is going to write python-based selenium tests so the priority on this is pretty low now.

I'd personally would still like to get this working for other projects. I'll keep pounding away at this every once in a while. Any other suggestions?

@juliemr

This comment has been minimized.

Member

juliemr commented Jun 27, 2014

I'm curious how the team is starting ChromeDriver with python based tests, since this issue doesn't seem specific to Protractor versus other methods of using selenium.

Unfortunately, my only suggestions are to keep watching that chromedriver issue.

@seanrafferty

This comment has been minimized.

seanrafferty commented Jun 27, 2014

I was getting the exact same errors. I battled this issue for a few hours today. It seemed to be caused by a mismatch between the versions of chromedriver and selenium-server-standalone. The config.js file was referencing a directory that had chromedriver 2.9 and selenium-server-standalone 2.35.0. Once I made sure we were referencing 2.10 and 2.42.2, it worked.

Is it possible protractor is finding different versions of these files on your PATH somewhere other than you expect? As a test, you can try to explicitly set the seleniumServerJar and chromeDriver values in the protractor conf.js file e.g.

seleniumServerJar: '/usr/local/lib/node_modules/protractor/selenium/selenium-server-standalone-2.42.2.jar',
chromeDriver: '/usr/local/lib/node_modules/protractor/selenium/chromedriver',

You might also unzip /usr/local/lib/node_modules/protractor/selenium/chromedriver_2.10.zip to be certain you have the correct version.

@ldeavila

This comment has been minimized.

ldeavila commented Jul 7, 2014

Finally had some time to work on this again. Unfortunately, even with Sean's suggestions I was unable to get selenium to launch a chrome instance. I still get the same error. I don't think it's a file version issue since this is a brand new machine. I'll keep investigating.

@lopesc

This comment has been minimized.

lopesc commented Jul 28, 2014

Same issue here on Windows with standalone jar 2.42.2 and chromedriver 2.10!

@danemacaulay

This comment has been minimized.

danemacaulay commented Jul 28, 2014

Ditto, with same versions on osx

@lopesc

This comment has been minimized.

lopesc commented Jul 28, 2014

Does anybody know how the issue here was fixed:
https://groups.google.com/forum/#!topic/angular-dev/kXk4bkHdY5A

You'll note that build 402 fails with the same error we are getting and then build 403 is fine. It might be indicating that something was misconfigured on the machine, since there were no changes in the repository between those two builds.

Date: Mon, 28 Jul 2014 14:13:55 -0700
From: notifications@github.com
To: protractor@noreply.github.com
CC: cristoverlopes@hotmail.com
Subject: Re: [protractor] Cannot launch Chrome: OSX 10.9.3, Selenium 2.42.0, chromedriver 2.10 (#954)

Ditto, with same versions on osx


Reply to this email directly or view it on GitHub.

@coderigo

This comment has been minimized.

coderigo commented Aug 1, 2014

Fixed same issue here on OS X 10.9.4.

Was able to get it to work by downlading chromedriver 2.9, and renaming the existing 2.10 version to end with 2.10 so that protractor picks up the 2.9 version I copied in there:

screen shot 2014-08-01 at 11 21 28 am

That is the chromedriver in the above image is the 2.9 version.

My protractor config file looks like this and it works fine with chrome now:

screen shot 2014-08-01 at 11 26 25 am

I'm very green to this but hopefully that helps someone. Not sure what I'm missing out on by downgrading to 2.9 but will find out I guess and in the meantime keep an eye on the issue to see when it's OK to try with >2.10.

I'm off to learn more about all this now.

@lopesc

This comment has been minimized.

lopesc commented Aug 1, 2014

Apologies for the late reply. It turns out that the version of Chrome on the machine was out of date. Chrome driver 2.10 supports versions 33-36. Upgrading to one of those resolve issue for me.

--- Original Message ---

From: "Rodrigo Martell" notifications@github.com
Sent: 1 August 2014 02:30
To: "angular/protractor" protractor@noreply.github.com
Cc: "lopesc" cristoverlopes@hotmail.com
Subject: Re: [protractor] Cannot launch Chrome: OSX 10.9.3, Selenium 2.42.0, chromedriver 2.10 (#954)

Fixed same issue here on OS X 10.9.4.

Was able to get it to work by downlading chromedriver 2.9, and renaming the existing 2.10 version to end with 2.10 so that protractor picks up the 2.9 version I copied in there:

screen shot 2014-08-01 at 11 21 28 am

That is the chromedriver in the above image is the 2.9 version.

My protractor config file looks like this and it works fine with chrome now:

screen shot 2014-08-01 at 11 26 25 am

I'm very green to this but hopefully that helps someone.
I'm off to learn more about all this now.


Reply to this email directly or view it on GitHub:
#954 (comment)

@coderigo

This comment has been minimized.

coderigo commented Aug 1, 2014

Nice. Though I was using v35 with chromedirver v2.10 in the above attempt without success before changing to v2.9.
Just putting it here FWIW.

@chadupton

This comment has been minimized.

chadupton commented Aug 8, 2014

This should be obvious, but I'll mention it in case it helps anyone in a similar situation. Some members of our team use PCs, so we only had the Windows driver in our repository and this error came up. Downloading the mac version of the chromedriver was the solution of course (so be sure to double check you're using the mac version, not the exe).

Download here:
https://code.google.com/p/selenium/wiki/ChromeDriver

We are using: Selenium 2.40.0, Chromedriver 2.10, Chrome 36.0.1985.125

@torinsar

This comment has been minimized.

torinsar commented Aug 25, 2014

Hi, I have Jenkins master (Linux) server to execute Selenium test runner installed on the Windows slave server (Windows server 2008 R2). The command is executed through SSH pipeline between the master and the slave machines.
The result: Selenium is executed and Jenkins gets Selenium console log ok. The only problem is that ChromeDriver is not able to launch the browser.

The log message shows:
Starting ChromeDriver (v2.10.267521) on port 8805
Only local connections are allowed.

If I RDP from my PC to the slave server and execute the same command in Cygwin terminal, it'll launch Chrome without any issue.

What do I need in order to get it to work from Jenkins master server?

Thanks in advance for any help.

Regards,
Torin

@priyabrat1801

This comment has been minimized.

priyabrat1801 commented Sep 18, 2014

I am having the same issue on Windows. It does not launch the browser at all. The version info are below:
(Session info: chrome=37.0.2062.120)
(Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)
Command duration or timeout: 25 milliseconds
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:03'

This ran successfully on my local mac OS. But it has chrome version 35.0.1916.114. Can it be because of the version. Struggling since yesterday to identify.

@priyabrat1801

This comment has been minimized.

priyabrat1801 commented Sep 18, 2014

This solved my issue when i downgraded my chrome driver from 2.10 to 2.9. Not sure what was the issue with it. Been using 2.10 from the beginning.

@juliemr

This comment has been minimized.

Member

juliemr commented Sep 23, 2014

This thread seems to have become a mash of various issues with version mismatches, binaries that weren't downloaded, and some old external bugs. I don't think it's providing much value to anyone, so I'm going to go ahead and close it.

If you have a specific bug, please open up a new issue with Protractor or, preferably, with WebDriver if it is not a protractor-specific issue.

@juliemr juliemr closed this Sep 23, 2014

@abhishek402

This comment has been minimized.

abhishek402 commented Jan 7, 2015

Even i downgraded from 2.10 to 2.9 its working properly.

@yesobo

This comment has been minimized.

yesobo commented Feb 7, 2015

I Downgraded from 2.10 to 2.9 as coderigo said and it solved the problem. I'm on chrome v 40.

@c0debreaker

This comment has been minimized.

c0debreaker commented Feb 25, 2015

Ok, I'm going to try downgrading to 2.9 too. I'll let you know later

@arun0009

This comment has been minimized.

arun0009 commented Jun 19, 2015

I downgraded my chromedriver to 2.9 in /usr/bin location and /usr/local/lib/node_modules/protractor/selenium/ location (from 2.15) and it started working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment