Gulp 量角器:selenium webdriver 退出状态 1
Gulp Protractor: selenium webdriver exited status 1
我一直在使用 Bangular(一个出色的 MEAN 堆栈 Yeoman 生成器)来创建一个项目,一切进展顺利,直到我最近对该项目进行了一系列 npm 更新。现在在我的项目(以及他们的项目)中,当 运行 他们的 gulp-protractor 任务(过去工作正常)时,我得到一个错误。
我已经包含了完整的输出以供参考,以防万一 - 错误是一半(滚动代码框):
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$
我不确定错误代码的含义(如“1”中的含义 'not passing',但这是什么意思 - 是测试失败了,还是驱动程序因某种原因崩溃了??
我很确定这是软件包在更新时不能很好地协同工作的问题;我只是希望有人可以阐明它,或者最近可能以某种方式经历过类似的事情......
谢谢
更新
根据初步调查,selenium 版本 2.45.0 似乎没有出现此问题。现在,错误发生在 'gulp protractor -> protractor -> webdriver -> selenium' 链中的确切位置有待讨论。我认为这将以需要自动化补丁或...结束:/
我团队中的两个人遇到了同样的错误(但出于某种原因不是我)。我们都是 运行 Protractor 2.5.1。我们都在 Mac 上。我们不使用 gulp,所以不是那样的。我们也不通过 bower 安装。回到 2.45.0 确实解决了这个问题,所以它看起来是一个 WebdriverJS 错误。一旦我有机会回归一点,我就会写一个问题(我还没有看到一个打开的)。
尝试通过 brew cask
instead of the standard .pkg 安装 Java:
brew cask install java
将directConnect: true
添加到protractor.conf.js
是的,正如@caner所说,将directConnect: true
添加到protractor.conf.js就解决了问题;我还将 chromeOnly: true
添加到同一个文件中。希望这对您有所帮助。
收到此错误后
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
更新后我能够 运行 我的测试使用 java 8
我一直在使用 Bangular(一个出色的 MEAN 堆栈 Yeoman 生成器)来创建一个项目,一切进展顺利,直到我最近对该项目进行了一系列 npm 更新。现在在我的项目(以及他们的项目)中,当 运行 他们的 gulp-protractor 任务(过去工作正常)时,我得到一个错误。
我已经包含了完整的输出以供参考,以防万一 - 错误是一半(滚动代码框):
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$
我不确定错误代码的含义(如“1”中的含义 'not passing',但这是什么意思 - 是测试失败了,还是驱动程序因某种原因崩溃了??
我很确定这是软件包在更新时不能很好地协同工作的问题;我只是希望有人可以阐明它,或者最近可能以某种方式经历过类似的事情......
谢谢
更新
根据初步调查,selenium 版本 2.45.0 似乎没有出现此问题。现在,错误发生在 'gulp protractor -> protractor -> webdriver -> selenium' 链中的确切位置有待讨论。我认为这将以需要自动化补丁或...结束:/
我团队中的两个人遇到了同样的错误(但出于某种原因不是我)。我们都是 运行 Protractor 2.5.1。我们都在 Mac 上。我们不使用 gulp,所以不是那样的。我们也不通过 bower 安装。回到 2.45.0 确实解决了这个问题,所以它看起来是一个 WebdriverJS 错误。一旦我有机会回归一点,我就会写一个问题(我还没有看到一个打开的)。
尝试通过 brew cask
instead of the standard .pkg 安装 Java:
brew cask install java
将directConnect: true
添加到protractor.conf.js
是的,正如@caner所说,将directConnect: true
添加到protractor.conf.js就解决了问题;我还将 chromeOnly: true
添加到同一个文件中。希望这对您有所帮助。
收到此错误后
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
更新后我能够 运行 我的测试使用 java 8