protractor protractor.conf.js [launcher] Process exited with error code 1 undefined:1190

[email protected]:karma-t01$ protractor protractor.conf.js
[launcher] Process exited with error code 1
undefined:1190
    vlog(2, () => this + ‘ scheduling notifications‘, this);
             ^
SyntaxError: Unexpected token )
    at goog.loadModuleFromSource_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1123:19)
    at Object.goog.loadModule (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1085:46)
    at /home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1:6
    at Object.exports.runInContext (vm.js:64:17)
    at Object.Context.closure.goog.retrieveAndExecModule_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/_base.js:135:8)
    at <anonymous>:1:6
    at Object.exports.runInContext (vm.js:64:17)
    at Context.closure.closure.vm.createContext.CLOSURE_IMPORT_SCRIPT (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/_base.js:104:12)
    at Object.goog.importScript_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:879:9)
    at Object.goog.importModule_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:900:14)
[email protected]:karma-t01$ 
[email protected]:karma-t01$ npm install -g protractor[email protected]:karma-t01$ protractor --versionVersion 3.0.0

原因:https://github.com/angular/protractor/issues/2731

Protractor 3.x.x no longer supports node < 4.2

BREAKING CHANGE: 1) Users will no longer be able to use node versions <4. 2)

You‘ll need to keep using the 2.x.x version of protractor or upgrade the version of node you are using.

下载 https://nodejs.org/download/rc/v4.2.2-rc.2/

node-v4.2.2-rc.2.tar.gz 

源码进行手动安装:

[email protected]:my_download$ tar -zxvf node-v4.2.2-rc.2.tar.gz

[email protected]:my_download$ cd node-v4.2.2-rc.2/

[email protected]:node-v4.2.2-rc.2$ ./configure

[email protected]:node-v4.2.2-rc.2$ make (编译需要大约十五分钟)

[email protected]:node-v4.2.2-rc.2$ make install

出现以下问题:

make -C out BUILDTYPE=Release V=1
make[1]: 正在进入目录 `/home/y/my_download/node-v4.2.2-rc.2/out‘
make[1]: 没有什么可以做的为 `all‘。
make[1]:正在离开目录 `/home/y/my_download/node-v4.2.2-rc.2/out‘
ln -fs out/Release/node node
/usr/bin/python tools/install.py install ‘‘ ‘/usr/local‘
installing /usr/local/bin/node
Traceback (most recent call last):
File "tools/install.py", line 213, in <module>
run(sys.argv[:])
File "tools/install.py", line 207, in run
if cmd == ‘install‘: return files(install)
File "tools/install.py", line 133, in files
action([‘out/Release/node‘ + exeext], ‘bin/node‘ + exeext)
File "tools/install.py", line 79, in install
def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
File "tools/install.py", line 79, in <lambda>
def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
File "tools/install.py", line 70, in try_copy
try_unlink(target_path) # prevent ETXTBSY errors
File "tools/install.py", line 33, in try_unlink
os.unlink(path)
OSError: [Errno 13] Permission denied: ‘/usr/local/bin/node‘
make: *** [install] 错误 1

根据错误信息:

OSError: [Errno 13] Permission denied: ‘/usr/local/bin/node‘

可知是权限问题,重新安装:

[email protected]:node-v4.2.2-rc.2$ sudo make install

测试:

[email protected]:node-v4.2.2-rc.2$ node --version
v4.2.2
[email protected]:node-v4.2.2-rc.2$

再次运行protractor

[email protected]:karma-t01$ protractor protractor.conf.js
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.0.177:53829/wd/hub

/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108
  var template = new Error(this.message);
                 ^
UnknownError: unknown error: Chrome version must be >= 43.0.2357.0
  (Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 3.13.0-24-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.62 seconds
Build info: version: ‘2.48.2‘, revision: ‘41bccdd‘, time: ‘2015-10-09 19:59:12‘
System info: host: ‘y‘, ip: ‘127.0.1.1‘, os.name: ‘Linux‘, os.arch: ‘amd64‘, os.version: ‘3.13.0-24-generic‘, java.version: ‘1.7.0_55‘
Driver info: org.openqa.selenium.chrome.ChromeDriver
    at new bot.Error (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
    at Object.bot.response.checkResponse (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
    at /home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:160:24
    at [object Object].promise.Promise.goog.defineClass.invokeCallback_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1337:14)
    at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_.execute_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2776:14)
    at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2758:21)
    at goog.async.run.processWorkQueue (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:124:15)
    at process._tickCallback (node.js:368:9)
From: Task: WebDriver.createSession()
    at Function.webdriver.WebDriver.acquireSession_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
    at Function.webdriver.WebDriver.createSession (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
    at [object Object].Builder.build (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js:445:22)
    at [object Object].DriverProvider.getNewDriver (/home/y/.npm-packages/lib/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
    at [object Object].Runner.createBrowser (/home/y/.npm-packages/lib/node_modules/protractor/lib/runner.js:186:37)
    at /home/y/.npm-packages/lib/node_modules/protractor/lib/runner.js:276:21
    at _fulfilled (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/q/q.js:759:13)
    at /home/y/.npm-packages/lib/node_modules/protractor/node_modules/q/q.js:573:44
[launcher] Process exited with error code 1
[email protected]:karma-t01$ 

可以发现之前的错误已经解决,但是提示:

UnknownError: unknown error: Chrome version must be >= 43.0.2357.0

下面需要升级Chrome浏览器
$ 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
$ google-chrome &
 [or]
$ google-chrome-stable &

[email protected]:karma-t01$ protractor protractor.conf.js
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.0.177:60148/wd/hub
Started

时间: 2024-11-05 16:07:01

protractor protractor.conf.js [launcher] Process exited with error code 1 undefined:1190的相关文章

Job for php-fpm.service failed because the control process exited with error code. See &quot;systemctl status php-fpm.service&quot; and &quot;journalctl -xe&quot; for details.

[[email protected] ~]#  systemctl start php-fpm Job for php-fpm.service failed because the control process exited with error code. See "systemctl status php-fpm.service" and "journalctl -xe" for details. [[email protected] ~]#  systemc

Job for httpd.service failed because the control process exited with error code. See &quot;systemctl status httpd.service&quot; and &quot;journalctl -xe&quot; for details

thinkphp 在Apache上配置启用伪静态,重启Apache1 restart 竟然失败了,报错 Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details 嗯,看状态 执行命令 systemctl status http

docker 报错: Job for docker.service failed because the control process exited with error code. See &quot;systemctl status docker.service&quot; and &quot;journalctl -xe&quot; for details.

centos 启动docker服务报错: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. 1,create daemon.json in /etc/docker/ 2, put this in it: { &q

Linux 重启网卡失败 Job for network.service failed because the control process exited with error code. See &quot;systemctl status network.service&quot; and &quot;journalctl -xe&quot; for details.

linux下重启网卡使用命令 : service network restart 时报错: [[email protected] hadoop]# service network restart Starting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemctl status network.servi

CentOS启动docker1.13失败(Job for docker.service failed because the control process exited with error code. See &quot;systemctl status docker.service&quot; and &quot;journalctl -xe&quot; for details.)

一.启动失败 1.启动docker [[email protected] ~]# systemctl start docker Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe " for details. 上面表示输入 systemctl

Centos7 网络报错Job for iptables.service failed because the control process exited with error code.

今天在进行项目联系的时候,启动在待机的虚拟机,发现虚拟机的网络设置又出现了问题. 我以为像往常一样重启网卡服务就能成功,但是它却报了Job for iptables.service failed because the control process exited with error code. 后来在网上查找了一列方法进行尝试,虽然没有解决我的问题,但是也做一下记录: 打开任务管理器,先确定你的Vm服务有没有被停止,我开始弄了好一阵子才发现被停止了,虽然启动之后没有解决我的问题,但这种事情也

Linux系统Docker启动问题Job for docker.service failed because the control process exited with error code. See &quot;systemctl status docker.service&quot;

在Liunx中使用Docker, 注: Liunx使用的是在虚拟机下的centOS7版本在刚开始安装Docker时没有任何错误, 但是在后续的docker启动过程中, 出现以下问题: 1 [[email protected] docker]# service docker start 2 Redirecting to /bin/systemctl start docker.service 3 Job for docker.service failed because the control pr

Job for network.service failed because the control process exited with error code问题

Job for network.service failed because the control process exited with error code问题 因为是克隆的,所以需要重新修改静态IP vim /etc/sysconfig/network-scripts/ifcfg-xxx 修改 BOOTPROTO=static 下方添加 IPADDR=静态IP地址 GATEWAY=默认网关 NETMASK=255.255.255.0 DNS1=114.114.114.114 保存之后执行

Job for docker.service failed because the control process exited with error code. See

在Liunx中使用Docker, 注: Liunx使用的是在虚拟机下的centOS7版本在刚开始安装Docker时没有任何错误, 但是在后续的docker启动过程中, 出现以下问题: Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service"1刚遇到这个问题时, 在百度上找答案, 但是找到的答案都不能满足这个