Gulp Transporter: exit selenium webdriver 1

I used Bangular (the excellent MEAN stack of Yeoman generator) to create a project, and everything went fine until I did a recent npm series of project updates. Now in my project (and on their project too) I get an error message when starting the gulp -protractor task (which worked fine in the past).

I have included the full output for reference, in case this helps, the error is halfway down (code scrolling):

Jamess-MacBook-Pro:test jamessherry$ gulp e2e [10:05:48] Using gulpfile ~/sites/test/gulpfile.js [10:05:48] Starting 'sass'... [10:05:48] Finished 'sass' after 30 ms [10:05:48] Starting 'inject'... [10:05:48] gulp-inject 7 files into index.html. [10:05:48] gulp-inject 11 files into index.html. [10:05:48] Finished 'inject' after 80 ms [10:05:48] Starting 'watch'... [10:05:48] Finished 'watch' after 27 ms [10:05:48] Starting 'nodemon'... [10:05:48] [nodemon] 1.7.1 [10:05:48] [nodemon] to restart at any time, enter `rs` [10:05:48] [nodemon] watching: *.* [10:05:48] [nodemon] starting `node server/server.js` Express server listening on port 9000, in development mode. [10:05:49] Finished 'nodemon' after 898 ms [10:05:49] Starting 'serve'... [10:05:49] Finished 'serve' after 41 ms [10:05:49] Starting 'e2e'... [10:05:49] Finished 'e2e' after 1.51 ms GET / 200 5.859 ms - 1854 [BS] Proxying: http://localhost:9000 [BS] Access URLs: ---------------------------- Local: http://localhost:3000 ---------------------------- UI: http://localhost:3001 ---------------------------- GET / 200 3.146 ms - 1854 GET /bower_components/angular/angular.js 304 3.598 ms - - GET /bower_components/angular-route/angular-route.js 304 3.977 ms - - GET /bower_components/angular-cookies/angular-cookies.js 304 3.671 ms - - GET /styles/css/app.css 200 9.292 ms - 36 GET /bower_components/angular-resource/angular-resource.js 304 8.992 ms - - GET /bower_components/angular-sanitize/angular-sanitize.js 304 2.055 ms - - GET /bower_components/angular-animate/angular-animate.js 304 0.819 ms - - GET /bower_components/angular-socket-io/socket.js 304 1.741 ms - - GET /app.js 304 1.870 ms - - GET /views/signup/signup.js 304 1.729 ms - - GET /views/signup/signup.controller.js 304 0.322 ms - - Starting selenium standalone server... GET /views/login/login.js 304 1.931 ms - - GET /views/login/login.controller.js 304 0.487 ms - - GET /views/home/home.js 304 1.295 ms - - GET /views/home/home.controller.js 304 1.538 ms - - GET /services/socket/socket.service.js 304 1.754 ms - - GET /services/socket/socket.mock.js 304 1.707 ms - - [launcher] Running 1 instances of WebDriver GET /services/auth/auth.js 304 1.208 ms - - GET /directives/nav-bar/nav-bar.directive.js 304 1.355 ms - - GET /bower_components/angular/angular.js 304 0.298 ms - - GET /bower_components/angular-route/angular-route.js 304 0.380 ms - - GET /bower_components/angular-cookies/angular-cookies.js 304 0.545 ms - - GET /bower_components/angular-resource/angular-resource.js 304 1.083 ms - - GET /bower_components/angular-sanitize/angular-sanitize.js 304 0.757 ms - - GET /bower_components/angular-animate/angular-animate.js 304 0.287 ms - - GET /app.js 304 0.347 ms - - GET /views/signup/signup.js 304 0.246 ms - - GET /views/signup/signup.controller.js 304 0.667 ms - - GET /views/login/login.controller.js 304 0.378 ms - - GET /views/home/home.js 304 0.447 ms - - [launcher] Process exited with error code 1 /Users/jamessherry/sites/test/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/nexttick.js:41 goog.global.setTimeout(function() { throw exception; }, 0); ^ Error: Server terminated early with status 1 at Error (native) at /Users/jamessherry/sites/test/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:204:18 at promise.ControlFlow.runInFrame_ (/Users/jamessherry/sites/test/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20) at goog.defineClass.notify (/Users/jamessherry/sites/test/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25) at promise.Promise.notify_ (/Users/jamessherry/sites/test/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12) at Array.forEach (native) at promise.Promise.notifyAll_ (/Users/jamessherry/sites/test/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:553:15) at goog.async.run.processWorkQueue (/Users/jamessherry/sites/test/node_modules/gulp-protractor/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:130:15) at process._tickCallback (node.js:356:9) GET /views/home/home.controller.js 304 0.508 ms - - [10:05:50] protractor exited with code 1 Jamess-MacBook-Pro:test jamessherry$ 

I'm not sure what the error code means (as in β€œ1” it means β€œdo not transmit”, but what does it mean - was it a testing error, or for some reason the driver crashed?

I am sure that the problem is that the packages do not work together as they are being updated; I just hope someone can shed some light on him or maybe have experienced something like this lately in some way ...

thanks

UPDATE

Upon initial investigation, it turns out that this problem does not occur with selenium version 2.45.0. Now, where exactly in the chain "gulp protractor β†’ protractor β†’ webdriver β†’ selenium", this error occurs for discussion. I think this will end up requiring a patch for automation or ...: /

+7
selenium selenium-webdriver protractor gulp-protractor
source share
5 answers

From angular / protractor # 2638 :

Try installing Java via brew cask instead of standard.pkg :

 brew cask install java 
+2
source share

add directConnect: true to protractor.conf.js

+2
source share

after receiving this error

 node_modules/protractor/bin/protractor config/protractor.conf.js --specs ./e2e/spec.js [14:17:54] I/launcher - Running 1 instances of WebDriver [14:17:54] I/local - Starting selenium standalone server... [14:17:54] E/launcher - Error: Error: Server terminated early with status 1 at Error (native) at earlyTermination.catch.e (/hg/clients/ion/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:252:52) at process._tickCallback (internal/process/next_tick.js:103:7) [14:17:54] E/launcher - Process exited with error code 100 

I managed to run my tests after upgrade to use java 8

+1
source share

Two people on my team have the same error (but not for any reason). We all launched Protractor 2.5.1. We are all on a Mac. We do not use gulp, so it is not. Also we do not install through the gazebo. Returning to 2.45.0 fixes the problem, so it seems to be a WebdriverJS error. I will write a question as soon as I have a chance to regress a little (I do not see it at the opening yet).

0
source share

Yes, as @caner said, adding directConnect: true to protractor.conf.js solves the problem; I also added chromeOnly: true to the same file. Hope this helps.

0
source share

All Articles