(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
},
````
What version of Chrome is installed on your machine and which version of Chromedriver are you using?
Chrome is Version 57.0.2987.98 (64-bit)
Ran webdriver-manager update on protractor and apparently chrome driver version is chromedriver_2.28
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
What happens if you downgrade to chromedriver 2.27?
How can I do that?
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
Got it, will give it a try now
Seems to give the same error with chrome driver 2.27
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
Updated my environment to:
And I don't have any problems, my tests are running normal
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
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);
});
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"
}
I'm unable to reproduce this using:
10.12.357.0.2987.983.3.12.28Here's an example repo with passing tests.
What version of selenium standalone are you using?
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 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
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.
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
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.
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)
And now, on the machine that was _just_ working, I updated Chrome to 57, and now if fails the same way...
[15:27:45] I/launcher - Running 1 instances of WebDriver
[15:27:45] I/direct - Using ChromeDriver directly...
Started
F[15:28:10] E/launcher - chrome not reachable
(Session info: chrome=57.0.2987.110)
(Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.11.6 x86_64)
[15:28:10] E/launcher - WebDriverError: chrome not reachable
(Session info: chrome=57.0.2987.110)
(Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.11.6 x86_64)
There's definitely an issue with protractor and chrome 57. I'm seeing the browser start, and start tests, but then blow up with the messages above.
I notice there's a new, annoying "Chrome is being controlled by automated test software", which I was able to turn off by passing the chromeOptions/args --disable-infobars. It's also asking to save passwords on every run... not sure how to disable that. Anyone?
So for the people that _aren't_ seeing this behavior, what is in _your_ config? :)
@qualityshepherd could you open a separate issue with a small reproducible example repository? I'm seeing the "Chrome is being controlled by automated test software" but that isn't impacting my tests running chrome 57.
Yeah, Nick. Seems like I'm having multiple issues with Chrome 57 (and 56). I opened an issue for my linux issue. From the mac side, I'm still figuring it out. Chrome _does_ crash for me, when I interfere with the running test, by trying to dismiss the "Chrome is being controlled..." infobar.
FWIW, Chrome v55 (which is the cutoff for Protractor v5x), works fine for me... in case that helps anyone else seeing this.
@qualityshepherd To get rid of the password prompts (in a node.js client - please translate for your usage):
var prefs = utils.objectToMap({
"profile.password_manager_enabled": false,
"credentials_enable_service": false,
"password_manager_enabled": false
});
chromeOptions.setExperimentalOption("prefs", prefs);
Un tour repo @NickTomlin I am getting thie error:
(node:96218) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[13:11:50] I/launcher - Running 1 instances of WebDriver
[13:11:50] I/direct - Using ChromeDriver directly...
[13:11:51] E/launcher - session not created exception
from disconnected: unable to connect to renderer
(Session info: chrome=57.0.2987.110)
(Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.3 x86_64)
[13:11:51] E/launcher - SessionNotCreatedError: session not created exception
from disconnected: unable to connect to renderer
(Session info: chrome=57.0.2987.110)
(Driver info: chromedriver=2.28.455517 (2c6d2707d8ea850c862f04ac066724273981e88f),platform=Mac OS X 10.12.3 x86_64)
at Object.checkLegacyResponse (/Users/s/Sites/testttt/node_modules/selenium-webdriver/lib/error.js:505:15)
at parseHttpResponse (/Users/s/Sites/testttt/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/Users/s/Sites/testttt/node_modules/selenium-webdriver/lib/http.js:440:13)
at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
at Function.createSession (/Users/s/Sites/testttt/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
at Function.createSession (/Users/s/Sites/testttt/node_modules/selenium-webdriver/chrome.js:709:29)
at Direct.getNewDriver (/Users/s/Sites/testttt/node_modules/protractor/built/driverProviders/direct.js:76:33)
at Runner.createBrowser (/Users/s/Sites/testttt/node_modules/protractor/built/runner.js:194:43)
at q.then.then (/Users/s/Sites/testttt/node_modules/protractor/built/runner.js:338:29)
at _fulfilled (/Users/s/Sites/testttt/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/Users/s/Sites/testttt/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/Users/s/Sites/testttt/node_modules/q/q.js:796:13)
at /Users/s/Sites/testttt/node_modules/q/q.js:556:49
at runSingle (/Users/s/Sites/testttt/node_modules/q/q.js:137:13)
[13:11:51] E/launcher - Process exited with error code 199
npm ERR! Test failed. See above for more details.
I followed the steps from @AlexDmr so I only have webdriver globally and not protractor.
chrome not reachable on my end as well with 57.0.2987.110. I'm running it with
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: [
"--headless",
"--remote-debugging-port=9222",
"--disable-gpu",
],
},
},
directConnect: true,
Exactly the same args work well in Karma config, however Protractor doesn't seem to benefit from them. I'm running it on a headless Linux system (xvfb is not necessary anymore thanks to these options, at least with Karma).
EDIT: Also, ps aux shows that Chrome is started just fine and indeed includes these args:
/opt/google/chrome/chrome --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-gpu --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --headless --ignore-certificate-errors --load-extension=/tmp/.org.chromium.Chromium.MOgA4I/internal --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=9222 --safebrowsing-disable-auto-update --test-type=webdriver --use-mock-keychain --user-data-dir=/tmp/.org.chromium.Chromium.5Z4S6y data:,
UPDATE: removing "--remote-debugging-port" option from Protractor config (but not Karma!) solves the issue (understandably, because it interferes with ChromeDriver on that port)! I.e. Protractor 5.1.1 works with Chrome 57 on a headless system without Xvfb. https://github.com/angular/protractor/issues/4164#issuecomment-288909191 if anyone is interested.
Just for completeness, thanks to @NickTulett suggestion, you can turn off the password manager (and infobars) in Protractor thusly...
capabilities: {
browserName: 'chrome',
chromeOptions: {
args: [
'--disable-infobars'
],
prefs: {
// disable chrome's annoying password manager
'profile.password_manager_enabled': false,
'credentials_enable_service': false,
'password_manager_enabled': false
}
}
},
The above @qualityshepherd and @NickTulett works for me, thanks!
Thanks @qualityshepherd . It works for me.
SOLVED:
Something changed in Chrome v56+ that now fails to start Chrome, when running tests as root on a linux server. Creating a new user, and running the tests as that user, fixed this. Also, add that user to sudo so you can start xvfb.
Fun times.
Hi @qualityshepherd ,
Again it causes the problem of hiding infobar. (Chrome is being controlled by automated test software.)
Just updated both Protractor and webdriver.
Protractor: 5.3.0
Chrome Driver: 2.37
Can anyone help here.
Yeah, Chrome 65 now shows the infobar, with no apparent workaround. It caused my visual tests to fail. They also made a change to how you can workaround IDs starting with numbers... broke a couple tests there too. #thankschrome
Most helpful comment
Just for completeness, thanks to @NickTulett suggestion, you can turn off the password manager (and infobars) in Protractor thusly...