E/launcher - Process exited with error code 135

Viewed 21842

I am trying to run the protractor test from my windows machine.

Configuration Used:

OS : Windows 7

Node : 6.11.3

Protractor : 5.1.2

NPM : 3.10.10

I am unable to run the Protractor test because of the below error.

C:\Users\Admin>protractor conf.js [14:45:16] I/launcher - Running 1 instances of WebDriver [14:45:16] I/hosted - Using the selenium server at http://localhost:4444/wd/hub [14:45:18] E/launcher - Error code: 135 [14:45:18] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0 .1:4444 [14:45:18] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
    at ClientRequest.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\selenium-webdriver\http\index.js:238:15)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1277:8)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9) From: Task: WebDriver.createSession()
    at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
    at Function.createSession (C:\Users\Admin\AppData\Roaming\npm\node_modules\p rotractor\node_modules\selenium-webdriver\chrome.js:709:29)
    at createDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\ node_modules\selenium-webdriver\index.js:167:33)
    at Builder.build (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor \node_modules\selenium-webdriver\index.js:623:16)
    at Hosted.getNewDriver (C:\Users\Admin\AppData\Roaming\npm\node_modules\prot ractor\lib\driverProviders\driverProvider.ts:60:29)
    at Runner.createBrowser (C:\Users\Admin\AppData\Roaming\npm\node_modules\pro tractor\lib\runner.ts:225:39)
    at q.then.then (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\l ib\runner.ts:391:27)
    at _fulfilled (C:\Users\Admin\AppData\Roaming\npm\node_modules\protractor\no de_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Users\Admin\AppData\Roaming\npm\node_module s\protractor\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Users\Admin\AppData\Roaming\npm\node_ modules\protractor\node_modules\q\q.js:796:13) [14:45:18]
***E/launcher - Process exited with error code 135***

I keep receiving the error "E/launcher - Process exited with error code 135" noted in the stack-trace above. How can I get the protractor test to complete successfully?

5 Answers

Try doing below steps:-

Open cmd and in the home path use below commands.

webdriver-manager clean
webdriver-manager status
webdriver-manager update
webdriver-manager start.

It looks like You can't connect to the selenium server. Comment this :

seleniumAddress: 'http://localhost:4444/wd/hub'

and replace it with:

directConnect: true,

just to check if is working directly. Also You can navigate directly to http://localhost:4444/wd/hub to see If you can access there. If not it might be some firewall or something similar.

First, open a command prompt and then run the following command:

webdriver-manager start

Open a second command prompt then enter your command. Mine is protractor conf.js

Probably a bit late but I get this error when I fail to start server for web-driver using:

webdriver-manager start

Update the chrome driver using the command => webdriver-manager update --versions.chrome <73.0.3683.68>

after upgrading just install node modules once again using cmd => npm install

Related