y@y:karma-t01$ protractor protractor.conf.js
[launcher] Process exited with error code
undefined:
vlog(, () => 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::)
at Object.goog.loadModule (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js::)
at /home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js::
at Object.exports.runInContext (vm.js::)
at Object.Context.closure.goog.retrieveAndExecModule_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/_base.js::)
at <anonymous>::
at Object.exports.runInContext (vm.js::)
at Context.closure.closure.vm.createContext.CLOSURE_IMPORT_SCRIPT (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/_base.js::)
at Object.goog.importScript_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js::)
at Object.goog.importModule_ (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js::)
y@y:karma-t01$
y@y:karma-t01$ npm install -g protractor
y@y:karma-t01$ protractor --version
Version 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 

源码进行手动安装:

y@y:my_download$ tar -zxvf node-v4.2.2-rc.2.tar.gz

y@y:my_download$ cd node-v4.2.2-rc.2/

y@y:node-v4.2.2-rc.2$ ./configure

y@y:node-v4.2.2-rc.2$ make (编译需要大约十五分钟)

y@y:node-v4.2.2-rc.2$ make install

出现以下问题:

make -C out BUILDTYPE=Release V=
make[]: 正在进入目录 `/home/y/my_download/node-v4.2.2-rc./out'
make[]: 没有什么可以做的为 `all'。
make[]:正在离开目录 `/home/y/my_download/node-v4.2.2-rc./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 , in <module>
run(sys.argv[:])
File "tools/install.py", line , in run
if cmd == 'install': return files(install)
File "tools/install.py", line , in files
action(['out/Release/node' + exeext], 'bin/node' + exeext)
File "tools/install.py", line , in install
def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
File "tools/install.py", line , in <lambda>
def install(paths, dst): map(lambda path: try_copy(path, dst), paths)
File "tools/install.py", line , in try_copy
try_unlink(target_path) # prevent ETXTBSY errors
File "tools/install.py", line , in try_unlink
os.unlink(path)
OSError: [Errno ] Permission denied: '/usr/local/bin/node'
make: *** [install] 错误

根据错误信息:

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

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

y@y:node-v4.2.2-rc.2$ sudo make install

测试:

y@y:node-v4.2.2-rc.2$ node --version
v4.2.2
y@y:node-v4.2.2-rc.2$

再次运行protractor

y@y:karma-t01$ protractor protractor.conf.js
Starting selenium standalone server...
[launcher] Running 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:
var template = new Error(this.message);
^
UnknownError: unknown error: Chrome version must be >= 43.0.2357.0
(Driver info: chromedriver=2.20. (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Linux 3.13.--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::)
at Object.bot.response.checkResponse (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js::)
at /home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js::
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::)
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::)
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::)
at goog.async.run.processWorkQueue (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js::)
at process._tickCallback (node.js::)
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::)
at Function.webdriver.WebDriver.createSession (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js::)
at [object Object].Builder.build (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/selenium-webdriver/builder.js::)
at [object Object].DriverProvider.getNewDriver (/home/y/.npm-packages/lib/node_modules/protractor/lib/driverProviders/driverProvider.js::)
at [object Object].Runner.createBrowser (/home/y/.npm-packages/lib/node_modules/protractor/lib/runner.js::)
at /home/y/.npm-packages/lib/node_modules/protractor/lib/runner.js::
at _fulfilled (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/q/q.js::)
at self.promiseDispatch.done (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/q/q.js::)
at Promise.promise.promiseDispatch (/home/y/.npm-packages/lib/node_modules/protractor/node_modules/q/q.js::)
at /home/y/.npm-packages/lib/node_modules/protractor/node_modules/q/q.js::
[launcher] Process exited with error code
y@y: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 &

y@y: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

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

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

    thinkphp 在Apache上配置启用伪静态,重启Apache1 restart 竟然失败了,报错 Job for httpd.service failed because the control ...

  2. 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.

    [root@web01 ~]#  systemctl start php-fpm Job for php-fpm.service failed because the control process ...

  3. Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

    环境:Ubuntu 16.04.1 + Django  1.11.15 + Apache 2.4.18 + python 3.5 此篇文章内容提到的第几步,对照以下链接中的步骤 百度云的ubuntu1 ...

  4. Job for vsftpd.service failed because the control process exited with error code

    # systemctl start vsftpd.serviceJob for vsftpd.service failed because the control process exited wit ...

  5. kali linux重启网卡失败:Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details. 问题排查

    linux菜鸡的时候,总是为了配置网络而烦恼,重启网卡的原因有很多,我这次是因为配置了固定IP[使用第三方工具连接]所以需要重启网卡,出现 Job for networking.service fai ...

  6. Job for redis-server.service failed because the control process exited with error code(Centos 7 设置Redis开机自启报错)

    报错信息如下: Job for redis-server.service failed because the control process exited with error code.  See ...

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

    一.启动失败 1.启动docker [root@localhost ~]# systemctl start docker Job for docker.service failed because t ...

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

    转自:https://blog.csdn.net/dongfei2033/article/details/81124465 今天在centOS 7下更改完静态ip后发现network服务重启不了,翻遍 ...

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

    今天在进行项目联系的时候,启动在待机的虚拟机,发现虚拟机的网络设置又出现了问题. 我以为像往常一样重启网卡服务就能成功,但是它却报了Job for iptables.service failed be ...

随机推荐

  1. sl4j记录

  2. Spring Boot 启动原理分析

    https://yq.aliyun.com/articles/6056 转 在spring boot里,很吸引人的一个特性是可以直接把应用打包成为一个jar/war,然后这个jar/war是可以直接启 ...

  3. POJ3169 Layout(差分约束系统)

    POJ3169 Layout 题意: n头牛编号为1到n,按照编号的顺序排成一列,每两头牛的之间的距离 >= 0.这些牛的距离存在着一些约束关系:1.有ml组(u, v, w)的约束关系,表示牛 ...

  4. ios使用openUrl进行应用跳转

    1.拨打电话: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://68979"]]; ...

  5. FFmpeg的HEVC解码器源码简单分析:解析器(Parser)部分

    ===================================================== HEVC源码分析文章列表: [解码 -libavcodec HEVC 解码器] FFmpeg ...

  6. Linux服务器监控系统 ServMon V1.1---张宴

    http://zyan.cc/post/291/ http://blog.zyan.cc/post/276/ http://zyan.cc/post/354/

  7. IOS Dictionary和Model相互转换

    // // HYBJSONModel.h // Json2ModelDemo // // Created by huangyibiao on 14-9-15. // Copyright (c) 201 ...

  8. TCP/IP协议原理与应用笔记10:TCP/IP协议族

    1. 协议族视图如下:(这里我们列举重要的,并不是所有的) (1)网络接入层(数据链路层 和 物理层): 通过接入的物理网络的 功能 和 覆盖范围 进行分析划分为: •LANs :局域网(Local ...

  9. TCP/IP协议原理与应用笔记09:数据通信---封装

    2016-08-091. 数据通信----封装: 2. 协议数据单元: PDU:对等层数据通信的单元. 比如Source端的应用层 和 Destination端的应用层是对等层(L7),这个时候L7 ...

  10. 【IOS】 XML解析和xml转plist文件(GDataXML)

    iOS对于XML的解析有系统自带的SDK--NSXMLParser,鄙人愚拙,只会用GDataXML进行解析,这里仅介绍GData的使用.(以下图为例) 1.对于一个xml文件,先读取出来 NSDat ...