Protractor Process exited with error code 100

戏子无情 提交于 2020-01-14 14:07:59

问题


I'm trying to setup protractor on different computer. It is using the same files with my other computer (cannot be used because hdisc corrupted).

It run fine on my other computer but I am getting error "Process exited with error code 100" when I tried to run protractor on this one.

I've tried to delete the node modules, clean cache and perform npm install again to install the dependencies. It helps my earlier issue (cannot run webdriver) but is now causing me this one.


[14:44:09] I/launcher - Running 1 instances of WebDriver
[14:44:09] I/local - Starting selenium standalone server...
[14:44:11] E/launcher - Error: Error: Server terminated early with status 1
    at earlyTermination.catch.e (C:\Users\PMO\Documents\DG\Jasmine\node_modules\selenium-webdriver\remote\index.js:252:52)
    at process._tickCallback (internal/process/next_tick.js:68:7)
[14:44:11] E/launcher - Process exited with error code 100
npm ERR! code ELIFECYCLE
npm ERR! errno 100
npm ERR! ProtractorTutorial@ protractor: `protractor conf.js`
npm ERR! Exit status 100
npm ERR!
npm ERR! Failed at the protractor@ protractor script.

My current chrome version is: 74.0.3729.131 Webdriver version: chromedriver_74.0.3729.6.exe OS: Windows 10.

Please advise me on how to fix this issue. Or is there any specific version of chrome and webdriver that can work?


回答1:


use directConnect=true in your config. if you are already using that, The problem is with the webdriver.

Try running below commands from your project location

webdriver-manager clean

node node_modules/protractor/bin/webdriver-manager update --standalone --versions.standalone=3.8.0



回答2:


Your problem might be that you need to run your tests without sudo!

Sometimes if you get an EACCESS error, you can then change directory permissions so that you can run it without sudo.




回答3:


My issue here was an outdated version of webdriver-manager. This fix only partially fixes the issue because it does not update the npm package. To completely fix this you need to ensure your package.json is configured with the correct webdriver-manager version (npm install webdriver-manager@latest --save-dev). Then you'll need to run:

  • npm install
  • node ./node_modules/protractor/bin/webdriver-manager clean
  • node ./node_modules/protractor/bin/webdriver-manager update

You may also need to run a npm dedupe to ensure all items are using the new package




回答4:


I encountered a similar issue yesterday and inspired by Madhan's solution I worked it out.

I'm learning angularJS thru the official tutorial. I found protractor is actually a standalone tool (I'm a newbie in front-end development), which means it can be run separately.

So following the official setup guide, I run

protractor e2e-tests/protractor.conf.js

and found below feedback:

E/launcher - SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 77
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'xxx', ip: 'xxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '11.0.2'
Driver info: driver.version: unknown
remote stacktrace: 0   chromedriver_77.0.3865.40           0x00000001078b7f09 chromedriver_77.0.3865.40 + 3694345

And my chrome version was 76 in the moment.

So after I upgraded chrome to 77, it worked.

Tips:

if use directConnect=true in your config still doesn't work, try to run in standalone mode, which can provide you more useful feedback.



来源:https://stackoverflow.com/questions/56000297/protractor-process-exited-with-error-code-100

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!