Skip to content
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

Running protractor on Chrome 54 fails. #3639

Closed
jeanpylone opened this issue Oct 13, 2016 · 16 comments
Closed

Running protractor on Chrome 54 fails. #3639

jeanpylone opened this issue Oct 13, 2016 · 16 comments

Comments

@jeanpylone
Copy link

Hello !

I just updated my Chrome to 54.0.2840.59 (64-bit) and my protractor process does not seems to work anymore... Same config works well with previous version (53.0.2785.116 64-bit).

you can find a trace below, hope this helps!

Bug report

  • Node Version: 4.2.1
  • Protractor Version: 4.0.9
  • Browser(s): Chrome 54.0.2840.59 (64-bit)
  • Operating System and Version Linux Mint 17.3
16:05:40.508 INFO - Executing: [new session: Capabilities [{count=1, browserName=chrome}]])
16:05:40.516 INFO - Creating a new session for Capabilities [{count=1, browserName=chrome}]
Starting ChromeDriver 2.22.397932 (282ed7cf89cf0053b6542e0d0f039d4123bbb6ad) on port 18371
Only local connections are allowed.
16:05:45.041 INFO - Command failed to close cleanly. Destroying forcefully (v2). [/home/jps/.nvm/versions/node/v4.2.1/lib/node_modules/webdriver-manager/selenium/chromedriver_2.22, --port=18371][ {}]
16:05:46.046 ERROR - Unable to kill process with PID 25443
16:05:46.049 WARN - Exception thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'aerith', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '4.2.0-27-generic', java.version: '1.8.0_60'
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:183)
        at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)
        at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)
        at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:124)
        at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59)
        at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1)
        at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)
        at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:79)
        at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:204)
        at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:166)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:132)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
        at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680)
        at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571)
        at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526)
        at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479)
        at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920)
        at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)
        at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)
        at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)
        at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358)
        at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537)
Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'aerith', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '4.2.0-27-generic', java.version: '1.8.0_60'
Driver info: driver.version: unknown
        at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:113)
        at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
        at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
        at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
        at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
        ... 9 more
Caused by: org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'aerith', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '4.2.0-27-generic', java.version: '1.8.0_60'
Driver info: driver.version: ChromeDriver
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:138)
        ... 14 more
Caused by: org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:18371 [localhost/127.0.0.1] failed: Connexion refusée  
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'aerith', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '4.2.0-27-generic', java.version: '1.8.0_60'
Driver info: driver.version: ChromeDriver
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:91)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
        ... 19 more
Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:18371 [localhost/127.0.0.1] failed: Connexion refusée
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
        at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:162)
        at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
        ... 20 more
@bringking
Copy link

@jeanpylone I am having the same issue. I think it might be related to the default chrome driver being 2 versions behind (2.22 vs 2.24). I am having trouble forcing protractor to download a newer version of the chromedriver to test though

@axelssonHakan
Copy link

MacOS
node_modules/.bin/webdriver-manager update --standalone true --versions.chrome 2.24

Will default to 2.24/chromedriver_mac32.zip but should be 2.24/chromedriver_mac64.zip

Can I specify arch as command line arg?

@bringking
Copy link

bringking commented Oct 13, 2016

@axelssonHakan I don't believe there is a macOS 64 for version 2.24 - http://chromedriver.storage.googleapis.com/index.html - EDIT- I was wrong there totally is

@jeanpylone
Copy link
Author

Thanks to all your comments :) It finally worked. What I did :

  • webdriver-manager update --versions.chrome 2.24
  • webdriver-manager start --versions.chrome 2.24 << without arg it takes the default one (2.22)

@bringking
Copy link

@jeanpylone glad its working for you. Still broken for us in CircleCI, we are getting Error message: Could not find chromedriver at /home/ubuntu/<project>/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22 even after specifying both --versions.chrome 2.24 for webdriver-manager start and update

@heathkit
Copy link
Contributor

We'll push a new webdriver-manager with 2.24 today!

@axelssonHakan
Copy link

@mgiambalvo is that the webdriver-manager bundled with protractor?
both 3.x and 4.x?
Or is it the "standalone" webdriver-manager npm?

And thanks :-)

@Neil-Ni
Copy link

Neil-Ni commented Oct 13, 2016

@bringking that will probably be fixed after new release, but in the meantime, I'm able to get in running on CircleCI by setting directConnect to true and setting chromeDriver to node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.24: Ex: https://github.com/angular/protractor/blob/master/spec/unit/driverProviders/direct_test.js#L20-L22

@ronaldotijucas
Copy link

You can use this module https://www.npmjs.com/package/chromedriver and configure the chromeDriver in protractor.conf.js as follow:

  chromeDriver: './node_modules/chromedriver/lib/chromedriver/chromedriver',

@Pablodotnet
Copy link

Is there a fix for this? Having same issue.

@heathkit
Copy link
Contributor

A new webdriver-manager with the latest chromedriver is released. If you do npm install and then webdriver-manager update, you should be fine.

@robwatkin
Copy link

robwatkin commented Oct 18, 2016

Hi @mgiambalvo . We're using grunt-protractor-webdriver. Where have you applied this fix - I can't see a relevant commit in this repo. Do you think that a fix will need to be applied to grunt-protractor-webdriver?

Thanks
Rob

@Akta3d
Copy link

Akta3d commented Oct 18, 2016

Same error here

protractor : 4.0.9
chrome.driver : 2.24

I have updated protractor and webdriver.
I have always error :
Driver info: driver.version: unknown

@remborg
Copy link

remborg commented Oct 19, 2016

I had the same issue with gulp-protractor. My fix was the following:

  1. Download webdriver v2.24 here http://chromedriver.storage.googleapis.com/index.html?path=2.24/
  2. Rename it webdriver v2.21 (or the same name as the one used by the module)
  3. Replace the file in .../node_modules/protractor/selenium by the new one

Edit: It's obviously a temporary fix...

@ghost
Copy link

ghost commented Oct 19, 2016

running:
npm update -g protractor
and
webdriver-manager update

fixed it for me on Chrome 54.

@Akta3d
Copy link

Akta3d commented Oct 19, 2016

Thanks @JonathanRowley, install protractor as global work for me

christianacca pushed a commit to esvit/ng-table that referenced this issue Oct 23, 2016
This is to fix e2e test failing with the latest version of chrome
(see angular/protractor#3639)
topheman added a commit to topheman/react-es6-redux that referenced this issue Mar 10, 2017
chrome has bumped to v56 - chromedriver's version doesn't work anymore neither the update version
-> so the e2e tests fail

angular/protractor#3639 (comment)
topheman added a commit to topheman/react-es6-redux that referenced this issue Mar 10, 2017
* fix(e2e): chromedriver version

Since chrome 56, webdriver update won't work properly. Found a fix by using chromedriver npm package and referencing it in protractor.config.js file as chromeDriver: './node_modules/chromedriver/lib/chromedriver/chromedriver',.

See : angular/protractor#3639 (comment)

angular/protractor#3639 (comment)

* fix(e2e): reset webdriver-update
topheman added a commit to topheman/vanilla-es6-jspm that referenced this issue Mar 10, 2017
brainy989 added a commit to brainy989/react-es6-redux that referenced this issue Jul 25, 2023
* fix(e2e): chromedriver version

Since chrome 56, webdriver update won't work properly. Found a fix by using chromedriver npm package and referencing it in protractor.config.js file as chromeDriver: './node_modules/chromedriver/lib/chromedriver/chromedriver',.

See : angular/protractor#3639 (comment)

angular/protractor#3639 (comment)

* fix(e2e): reset webdriver-update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants