5

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?

hafizan
  • 111
  • 2
  • 2
  • 7

7 Answers7

10

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
Liam
  • 27,717
  • 28
  • 128
  • 190
Madhan Raj
  • 1,404
  • 1
  • 7
  • 13
  • Hi Madhan, I am using package script and it run from node module, so your first solution did not work for me. However, i tried to perform webdriver-clean and the update and it is working now. Thanks for helping :) – hafizan May 08 '19 at 03:19
  • adding `directConnect: true` to my config did it! – scipper May 28 '19 at 12:43
  • I had the same error code 100, but changing my java home to 8, uninstalling webdriver and installing again with the version of my chrome have worked – vmrvictor Jun 12 '19 at 07:25
  • There are a couple of issues here, one the latest version (at time of writing) is `12.1.6` so hard coding this command to `3.8.0` is a bit short sighted, two, as soon as you reinstall your npm packages your going to have to do this again. It's much better to actually [update the package and then update](https://stackoverflow.com/a/57491921/542251) – Liam Aug 16 '19 at 09:38
1

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.

karl li
  • 1,316
  • 15
  • 19
1

For me, the issue was a space after Scenario in the feature file

Wrong Scenario : Corrected to Scenario: and the feature started executing

Cant see this answer above, so this might help someone

Silverbullet
  • 144
  • 1
  • 12
0

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.

Steven McConnon
  • 2,650
  • 2
  • 16
  • 21
0

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

Liam
  • 27,717
  • 28
  • 128
  • 190
0

In my case I had to run update + start

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

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

thank you

Junior Vieira
  • 553
  • 5
  • 5
0

For me it was a missing tsconfig.json file in my e2e folder. If you don't have one in your e2e folder, simply create one and put this code into it. Then run ng e2e again.

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/e2e",
    "module": "commonjs",
    "target": "es5",
    "types": [
      "jasmine",
      "jasminewd2",
      "node"
    ]
  }
}

I'm using:

Angular CLI: 9.0.7

Node: 14.16.0

Chrome: 89.0.4389.82

chromedriver_89.0.4389.23

Boommeister
  • 1,591
  • 2
  • 15
  • 54