Previously my angular e2e tests ran fine using protractor/selenium/grunt. Now they fail with the
Exception thrown: Going to shut down the Selenium server
after creating the browser sessions
Session created: count=1, browserName=chrome
Session created: count=1, browserName=firefox
The selenium server is then shutdown.
The tests work fine for me locally and I rebuilt a previous passing build to see the e2e tests fail. Has anyone else experienced this?
Same problem here.
I have found out that my tests fail when I upgrade from protractor 3.0.0 to 3.1.0 or 3.1.1. Tests run fine locally, but they fail in Circle with the following error:
/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108
[chrome #1-0] var template = new Error(this.message);
[chrome #1-0] ^
[chrome #1-0] UnknownError: unknown error: Chrome version must be >= 46.0.2490.0
[chrome #1-0] (Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 3.13.0-77-generic x86_64) (WARNING: The server did not provide any stacktrace information)
[chrome #1-0] Command duration or timeout: 2.57 seconds
[chrome #1-0] Build info: version: '2.51.0', revision: '1af067d', time: '2016-02-05 19:15:17'
[chrome #1-0] System info: host: 'box1592', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-77-generic', java.version: '1.7.0_76'
[chrome #1-0] Driver info: org.openqa.selenium.chrome.ChromeDriver
[chrome #1-0] at new bot.Error (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
[chrome #1-0] at Object.bot.response.checkResponse (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
[chrome #1-0] at /home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:160:24
[chrome #1-0] at [object Object].promise.Promise.goog.defineClass.invokeCallback_ (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1337:14)
[chrome #1-0] at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_.execute_ (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2776:14)
[chrome #1-0] at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_ (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2758:21)
[chrome #1-0] at goog.async.run.processWorkQueue (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:124:15)
[chrome #1-0] at process._tickCallback (node.js:368:9)
[chrome #1-0] From: Task: WebDriver.createSession()
[chrome #1-0] at Function.webdriver.WebDriver.acquireSession_ (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
[chrome #1-0] at Function.webdriver.WebDriver.createSession (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
[chrome #1-0] at [object Object].Builder.build (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
[chrome #1-0] at [object Object].DriverProvider.getNewDriver (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/lib/driverProviders/driverProvider.js:42:27)
[chrome #1-0] at [object Object].Runner.createBrowser (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/lib/runner.js:190:37)
[chrome #1-0] at /home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/lib/runner.js:280:21
[chrome #1-0] at _fulfilled (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/q/q.js:834:54)
[chrome #1-0] at self.promiseDispatch.done (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/q/q.js:863:30)
[chrome #1-0] at Promise.promise.promiseDispatch (/home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/q/q.js:796:13)
[chrome #1-0] at /home/ubuntu/nvm/versions/node/v4.2.5/lib/node_modules/protractor/node_modules/q/q.js:604:44
[launcher] Runner process exited unexpectedly with error code: 1
@DeividasK I ran into the same problem as you. The issue occurs because CircleCi Machine images run Chrome version 43.0.2357.130 and the new Protractor build expects Chrome version >= 46.0.2490.0.
Until CircleCI upgrades the version of Chrome that they use, you will continue to run into this issue.
To fix, you can upgrade google chrome by executing the following shell commands in your circle.yml script before you run your protractor tests.
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- sudo apt-get update
- sudo apt-get install google-chrome-stable
@AndyPWarren I’m not sure if the cause of your issue is the same but it might be worth a shot.
I have a similar problem with cucumber/protractor/selenium/gulp : the tests are fine locally but not on Circle, and I rebuilt a previous passing build on Circle with no cache, and the tests fail now.
Many (but not all) of my e2e tests fail with the message : Timed out waiting for Protractor to synchronize with the page after 30 seconds.
I used protractor 1.3, the default node (0.10.33), and the default chrome version.
I tried to upgrade to protractor 1.8, node 0.12.0, last stable chrome (through circle.yml), with no result.
EDIT : it was due to one of my bower components being updated on circleCi (after a cache clean) and not on my local environment (I had tilde and caret versions instead of fixed ones)
I removed my bower components on my local dev environment and ran bower install, to reproduce the error outside of circleCi and debug it.
Hi this is happending again after the chrome release on March 31st - does anyone have any solutions please?
Updating selenium standalone
downloading h t t ps://selenium-release.storage.googleapis.com/2.51/selenium-server-standalone-2.51.0.jar…
Updating chromedriver
downloading h t t ps://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip…
chromedriver_2.21.zip downloaded to /home/ubuntu/energy-scanner-prototype/node_modules/gulp-protractor/node_modules/protractor/selenium/chromedriver_2.21.zip
selenium-server-standalone-2.51.0.jar downloaded to /home/ubuntu/energy-scanner-prototype/node_modules/gulp-protractor/node_modules/protractor/selenium/selenium-server-standalone-2.51.0.jar
Starting selenium standalone server…
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at h t t p://10.0.4.1:47589/wd/hub
/home/ubuntu/energy-scanner-prototype/node_modules/selenium-webdriver/lib/atoms/error.js:108
var template = new Error(this.message);
^
UnknownError: unknown error: Chrome version must be >= 46.0.2490.0
(Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 3.13.0-83-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 868 milliseconds
Build info: version: ‘2.51.0’, revision: ‘1af067d’, time: '2016-02-05 19:15:17’
System info: host: ‘box1159’, ip: ‘127.0.0.1’, os.name: ‘Linux’, os.arch: ‘amd64’, os.version: ‘3.13.0-83-generic’, java.version: '1.7.0_76’
Driver info: org.openqa.selenium.chrome.ChromeDriver
Just used the following that worked:
machine:
post:
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- sudo apt-get update
- sudo apt-get install google-chrome-stable
This fix no longer works. http://dl.google.com/linux/chrome/deb/ now returns a 404 error.
Here’s the trace from CircleCI:
Err http://dl.google.com/linux/chrome/deb/ stable/main google-chrome-stable amd64 52.0.2743.116-1
404 Not Found
Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main lsb-base all 4.1+Debian11ubuntu6.2 [13.3 kB]
Fetched 13.3 kB in 0s (76.0 kB/s)
Failed to fetch http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_52.0.2743.116-1_amd64.deb 404 Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Any ideas?
Got the same issue. Getting packages from different mirror still works: http://us.archive.ubuntu.com/ubuntu/
[UPDATE] Looks like the us-east mirror is working now