protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Protractor 5.1.1 doesn't work with Chrome 57

Open massimocode opened this issue 9 years ago • 34 comments

(node:9828) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[11:48:42] I/launcher - Running 1 instances of WebDriver
[11:48:42] I/local - Starting selenium standalone server...
[11:49:12] E/launcher - Error: Error: Timed out waiting for the WebDriver server at http://10.10.10.76:45678/wd/hub
    at onError (C:\projects\JustEat.TopPlacement.ManagementWeb\src\JustEat.TopPlacement.ManagementWeb.ProtractorTests\node_modules\selenium-webdriver\http\util.js:102:16)
    at process._tickCallback (internal/process/next_tick.js:103:7)
[11:49:12] E/launcher - Process exited with error code 100

Protractor.conf.js looks like this:

    allScriptsTimeout: 30000,
    specs: [
        "./**tests/*.js"
    ],
    capabilities: {
        browserName: "chrome",
        chromeOptions: {
            args: ["--test-type", "--no-sandbox"],
        },
        loggingPrefs: {
            browser: "ALL"
        }
    },
    jasmineNodeOpts: {
        showColors: true,
        defaultTimeoutInterval: 5 * 60 * 1000
    },

massimocode avatar Mar 10 '17 11:03 massimocode

What version of Chrome is installed on your machine and which version of Chromedriver are you using?

wswebcreation avatar Mar 10 '17 12:03 wswebcreation

Chrome is Version 57.0.2987.98 (64-bit) Ran webdriver-manager update on protractor and apparently chrome driver version is chromedriver_2.28

massimocode avatar Mar 10 '17 12:03 massimocode

Makes me think, could be a bug with chromedriver because that version should support 57+ according to this: https://sites.google.com/a/chromium.org/chromedriver/downloads

massimocode avatar Mar 10 '17 12:03 massimocode

What happens if you downgrade to chromedriver 2.27?

wswebcreation avatar Mar 10 '17 12:03 wswebcreation

How can I do that?

massimocode avatar Mar 10 '17 12:03 massimocode

Depends, are you using a separate webdriver-manager?

I've installed it global, so I can do it like this webdriver-manager update --versions.chrome=2.27

You can see all the commands by using webdriver-manager, then all the commands are shown

wswebcreation avatar Mar 10 '17 12:03 wswebcreation

Got it, will give it a try now

massimocode avatar Mar 10 '17 12:03 massimocode

Seems to give the same error with chrome driver 2.27

massimocode avatar Mar 10 '17 12:03 massimocode

In all honesty I'm not sure it's a chromedriver issue at all... when I run my E2E tests I can't even see the chromedriver process

massimocode avatar Mar 10 '17 12:03 massimocode

Updated my environment to:

  • webdriver-manager: 12.0.2
  • chromedriver: 2.28
  • Chrome: 57
  • Protractor: 5.1.1
  • Node: 7.5

And I don't have any problems, my tests are running normal

wswebcreation avatar Mar 10 '17 12:03 wswebcreation

OK I managed to get it working using protractor 5.0.0 and manually installing chromedriver 2.28... But with protractor 5.1.1 it doesn't work

massimocode avatar Mar 10 '17 12:03 massimocode

So yeah this works, assuming protractor 5.0

gulp.task('protractor-install', function(done){
    child_process.spawn(getProtractorBinary('webdriver-manager'), ['update', '--versions.chrome=2.28'], {
        stdio: 'inherit'
    }).once('close', done);
});

aarr0n avatar Mar 13 '17 22:03 aarr0n

Protractor 5.1 seems happy enough, as long as the new version of ChromeDriver is used:

// package.json
"scripts": {
    "preprotractor": "webdriver-manager update --standalone --versions.standalone=2.53.1 --versions.chrome=2.28",
    "protractor": "protractor ./protractor.conf.js"
}

jan-molak avatar Mar 14 '17 16:03 jan-molak

I'm unable to reproduce this using:

  • OSX 10.12.3
  • Chrome 57.0.2987.98
  • Selenium Webdriver 3.3.1
  • Chromedriver 2.28

Here's an example repo with passing tests.

What version of selenium standalone are you using?

NickTomlin avatar Mar 14 '17 17:03 NickTomlin

I got similar errors, I updated webdriver-manager and the chromedriver to 2.28. However, when I run protractor in my project it is keeping using chromedriver 2.25, I deleted node_modules and did another npm install but the problem remains. I got "selenium-webdriver": "^3.3.0

----- The error I get when executing protractor protractor.config.js ----- [11:32:15] E/launcher - unknown error: cannot get automation extension from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html (Session info: chrome=57.0.2987.110) (Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 10.0.14393 x86_64)

------ webdriver-manager status ----- webdriver-manager: using global installed version 12.0.4 [11:36:57] I/status - selenium standalone version available: 3.3.1 [last] [11:36:57] I/status - chromedriver version available: 2.28 [last] [11:36:57] I/status - geckodriver version available: v0.15.0 [last] [11:36:57] I/status - IEDriverServer is not present [11:36:57] I/status - android-sdk is not present [11:36:57] I/status - appium is not present

AlexDmr avatar Mar 17 '17 10:03 AlexDmr

@AlexDmr This is probably because you are using a global and not a locally installed version of webdriver-manager

------ webdriver-manager status -----
webdriver-manager: using global installed version 12.0.4

NickTomlin avatar Mar 17 '17 16:03 NickTomlin

I'm going to go ahead and close this; it's working with the latest chromedriver and selenium standalone. Most issues should be resolved by ensuring that you are using the correct version of both.

NickTomlin avatar Mar 17 '17 18:03 NickTomlin

Indeed it works ! For those who would be in my case : npm uninstall -g protractor npm install -g webdriver-manager

clean your package.json so that you only keep a dependancy to protractor 5.1.1 (no dependency to webdriver-manager nor selenium).

Erase node-modules

npm install

Use the scripts provided by NickTomlin in the repo with passing tests

AlexDmr avatar Mar 17 '17 18:03 AlexDmr

I'm having the same issue on a Mac, and on Linux, running Chrome 57, but not on another mac, same exact protractor configs, but with chrome 56. This just started happening after updating.

qualityshepherd avatar Mar 17 '17 19:03 qualityshepherd

Reverted to Protractor 4.1.14, and chrome 56 (which is what I was using) and getting (on Linux):

[16:14:25] E/launcher - chrome not reachable
  (Driver info: chromedriver=2.26.436382 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 4.4.0-67-generic x86_64)
[16:14:25] E/launcher - WebDriverError: chrome not reachable
  (Driver info: chromedriver=2.26.436382 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 4.4.0-67-generic x86_64)

qualityshepherd avatar Mar 17 '17 20:03 qualityshepherd