Selenium webdriver exits with error code 135 - selenium-webdriver

I am new to protractor. I am getting the following error while trying to run Selenium tests using protractor
I/hosted - Using the selenium server at http://localhost:4444/wd/hub
I/launcher - Running 1 instances of WebDriver
E/launcher - Error code: 135
E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
E/launcher - Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:4444
at ClientRequest.<anonymous> (c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:381:15)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at Socket.socketErrorListener (_http_client.js:267:9)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at emitErrorNT (net.js:1269:8)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
From: Task: WebDriver.createSession()
at Function.createSession (c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:329:24)
at Builder.build (c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\builder.js:458:24)
at Hosted.DriverProvider.getNewDriver (c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\driverProvider.js:37:33)
at Runner.createBrowser (c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\built\runner.js:187:43)
at c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\built\runner.js:261:30
at _fulfilled (c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
at c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49
at runSingle (c:\Users\SavDevService.SAVISIONLAB\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:137:13)
E/launcher - Process exited with error code 135
I checked to see if any other process is listening to port 4444, but did not find any. also I am running web driver with --standalone flag.

It seems like selenium server is not running on http://127.0.0.1:4444/wd/hub. Before running your protractor test,you must start the selenium server using below command.webdriver-manager start. After starting the server your tests will execute without any errors.
If you dont want to start selenium server manually,then just remove seleniumAddress:http://localhost:4444/wd/hub property from your conf.js.

You can also add these lines to your conf.js file:
chromeOnly: true,
directConnect: true,

Start the webdriver, its good to update the web driver and start the web driver before you start executing your automation test suite by executing the below commands in console screen.
webdriver-manager update
webdriver-manager start

Do you have selenium drivers installed for the browser you want to test with?
Try with
webdriver-manager update
It will take care of installing the drivers for you. You just need to run it once, if you call it again it will see that the drivers are already installed and will not procede.

Did you start selenium server using this command webdriver-manager start?
If not there might be a problem with your configuration with selenium server.
I would suggest follow this thread
Solution 1
try webdriver-manager update --standalone
Solution 2
Remove previous instance (.jar file) of web driver from the location- C:\Users\HP\AppData\Roaming\npm\node_modules\p rotractor\selenium
Download the selenium-server-standalone-2.45.0 from http://www.seleniumhq.org/download/ and replace the .jar file.

i also get this type of error, but after set environment variables this issue is solved.
location of the npm;
Example:
C:\Users\AppData\Roaming\npm

The directConnect solution is nice when running protractor locally, but it didn't work when trying to do it on Jenkins. It seems like when running everything in Docker containers in Jenkins, you'll have to start webdriver-manager start in detached mode -d first, wait, and then start protractor.

check your web driver status by the below command
webdriver-manager status
if it's not up to date you can remove and install it by following these steps
webdriver-manager clean
webdriver-manager status
webdriver-manager update
webdriver-manager start
then start your web driver by
if you get this error
ERROR [BaseServer.start] - Port 4444 is busy, please choose a free port and specify it using -port option
you can set another port by this command(for example port 4545)
webdriver-manager start --seleniumPort 4545
then your selenium web driver will run

I have run the windows command prompt as administrator and solved this problem. I am not seeing this problem anymore.
And I added also
chromeOnly: true,
directConnect: true,

Related

protractor not starting selenium

I am encounteing following error when starting an end to end test using protractor.
manu#MANU:/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app$ ./node_modules/protractor/bin/protractor ./conf.js
[16:29:47] I/launcher - Running 1 instances of WebDriver
[16:29:47] I/direct - Using ChromeDriver directly...
[16:29:47] E/launcher - EINVAL: invalid argument, uv_interface_addresses
[16:29:47] E/launcher - Error: EINVAL: invalid argument, uv_interface_addresses
at Error (native)
at getLoInterface (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/selenium-webdriver/net/index.js:30:20)
at getAddress (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/selenium-webdriver/net/index.js:46:14)
at Object.exports.getLoopbackAddress (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/selenium-webdriver/net/index.js:85:10)
at resolveCommandLineFlags.then.args (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/selenium-webdriver/remote/index.js:240:24)
at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
at Function.createSession (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
at Function.createSession (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/selenium-webdriver/chrome.js:709:29)
at Direct.getNewDriver (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/lib/driverProviders/direct.ts:90:25)
at Runner.createBrowser (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/lib/runner.ts:225:39)
at q.then.then (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/lib/runner.ts:391:27)
at _fulfilled (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/node_modules/q/q.js:796:13)
at /mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/node_modules/q/q.js:556:49
at runSingle (/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/node_modules/q/q.js:137:13)
[16:29:47] E/launcher - Process exited with error code 199
manu#MANU:/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app$
I could be because of issue in starting webdriver. I tried to run selenium but I got following error
manu#MANU:/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app$ ./node_modules/protractor/bin/webdriver-manager start
[16:27:55] I/start - java -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.32 -Dwebdriver.gecko.driver=/mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.18.0 -jar /mnt/c/Users/Manu/Documents/manu/programs/web/angular/dw-ng2-app/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.5.3.jar -port 4444
[16:27:55] I/start - seleniumProcess.pid: undefined
[16:27:55] W/start - Selenium Standalone server encountered an error: Error: spawn java ENOENT
I have tried cleaning and restarting using clean and start options with webdriver-manager but that hasn't solved the problem
Update---
I am running this on Windows machine through Bash for Windows. The issue with starting Selenium is Bash cannot find Java. I exported Path but because Java is installed in Program Files, I am unable to set the path in Bash as Bash is unable to process the space in Program Files. I could run the selenium server on CMD where JAVA path is set. The problem is still not resolved though.
It seems the issue was I didn't install correctly the first time. I should have run webdriver-manager update from home directory. I cleaned up using webdriver-manger clean and re-run webdriver-manger start from project's home directory project home> .\node_modules\protractor\bin\webdriver-manager start. Probably the installation sets some paths which get messed up if some other directory is used. I also started protractor from project's home directory >node .\node_modules\protractor\bin\protractor .\protractor.conf.js

why webdriver-update command not found although protractor is installed ?

why webdriver-update command not found although protractor is installed ?
i installed protractor node as
sudo npm install protractor -g
and when i try to make
sudo webdriver-manager update
it return with
sudo: webdriver-manager: command not found
i tried also to install it manually but i failed to do.
tamer#tamer-Inspiron-N5110:/media/tamer/Work/conFusion/test$ protractor protractor.conf.js
[15:23:48] I/direct - Using ChromeDriver directly...
[15:23:48] I/launcher - Running 1 instances of WebDriver
[15:23:48] E/direct - Error code: 135
[15:23:48] E/direct - Error message: Could not find chromedriver at /home/tamer/.npm-global/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22
[15:23:48] E/direct - Error: Could not find chromedriver at /home/tamer/.npm-global/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22
at Direct.getNewDriver (/home/tamer/.npm-global/lib/node_modules/protractor/built/driverProviders/direct.js:65:27)
at Runner.createBrowser (/home/tamer/.npm-global/lib/node_modules/protractor/built/runner.js:198:43)
at /home/tamer/.npm-global/lib/node_modules/protractor/built/runner.js:277:30
at _fulfilled (/home/tamer/.npm-global/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/home/tamer/.npm-global/lib/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/home/tamer/.npm-global/lib/node_modules/protractor/node_modules/q/q.js:796:13)
at /home/tamer/.npm-global/lib/node_modules/protractor/node_modules/q/q.js:556:49
at runSingle (/home/tamer/.npm-global/lib/node_modules/protractor/node_modules/q/q.js:137:13)
at flush (/home/tamer/.npm-global/lib/node_modules/protractor/node_modules/q/q.js:125:13)
at nextTickCallbackWith0Args (node.js:420:9)
[15:23:48] E/launcher - Process exited with error code 135
tamer#tamer-Inspiron-N5110:/media/tamer/Work/conFusion/test$ sudo webdriver-manager update
[sudo] password for tamer:
sudo: webdriver-manager: command not found
Root Causes of your issue might Node REPL unable to pick up the installed node_module
Can you try one of below and see
In order to make modules available to the Node.js REPL, it might be useful to add <</usr/lib>>/node_modules folder to the $NODE_PATH environment variable.
Refer here for more info
Goto .\node_modules\protractor\bin and execute the webdriver-manager trigger script directly.
node webdriver-manager update

How to debug protractor in Intellij?

In OSX, I have configured an Intellij 15 run/debug task as in this question:
How to debug angular protractor tests in WebStorm
It runs ok but debug doesn't work. It throws:
/usr/local/bin/node --debug-brk=60144 --nolazy /usr/local/lib/node_modules/protractor/lib/cli.js /Users/XXXX/Workspace/frontend-test/config.js
Debugger listening on port 60144
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Process finished with exit code 139
Any idea?
Thanks in advance.
Got it! Just add --harmony parameter to "Node parameters" in the Run/Debug Configuration window.

Protractor + CucumberJS Error after update: cucumber.js:150:36

I'm bringing this into discussion here, since I had started this conversation over GithubIssue 2630, Basically I'm having problems with the integration of Protractor and Cucumber, I had even tried to downgrade to a older versions for both but the same thing happens, here's an explanation of what I did so far:
I had uninstalled everything and started from scratch. I started by installing Protractor, Cucumber and Webdriver globally and I can see this error, same as before, when I run the protractor command.
$ protractor conf.js
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.0.104:64737/wd/hub
[launcher] Error: TypeError: undefined is not a function
at /usr/local/lib/node_modules/protractor/lib/frameworks/cucumber.js:150:36
at Function.promise (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:650:9)
at /usr/local/lib/node_modules/protractor/lib/frameworks/cucumber.js:147:14
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:759:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:525:49
at flush (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:108:17)
at process._tickCallback (node.js:355:11)
[launcher] Process exited with error code 100
```
Then I've installed all locally, running npm install, and I got this error
[launcher] Process exited with error code 1
/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:126
throw e;
^
Error: No selenium server jar found at the specified location (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/selenium/selenium-server-standalone-2.47.1.jar). Check that the version number is up to date.
at LocalDriverProvider.addDefaultBinaryLocs_ (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/driverProviders/local.js:37:11)
at LocalDriverProvider.setupEnv (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/driverProviders/local.js:71:8)
at Runner.run (/Users/brunosoko/Documents/Dev/Personal/olapic-test2/node_modules/protractor/lib/runner.js:261:31)
at TaskRunner.run (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/taskRunner.js:123:19)
at createNextTaskRunner (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/launcher.js:223:20)
at /Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/lib/launcher.js:246:7
at _fulfilled (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:759:13)
at /Users/brunosoko/Documents/Dev/Personal/test2/node_modules/protractor/node_modules/q/q.js:573:44
Which I resolved by installing locally webdriver ./node_modules/.bin/webdriver-manager update
Then I ran ./node_modules/.bin/protractor conf.js and I'm getting the same error as above, for cucumber.js:150:36
Later, I tried to uninstall globally framework, npm uninstall -g protractor and npm uninstall -g cucumber
But the same error happens! I'm not sure what am I doing wrong!
I'm not sure what is wrong with your specific situation, but I have created a bare minimum example of cucumber 0.8.1 working with the yet to be released version of protractor here - https://github.com/darrinholst/protractor-cucumber-example. Hope this helps.
git clone https://github.com/darrinholst/protractor-cucumber-example
cd protractor-cucumber-example
npm install
npm test

Unable to run Protractor - ECONNREFUSED connect ECONNREFUSED

I'm trying to learn AngularJS. As part of this, I want to learn to use end-to-end testing. Currently, I have a directory structure like this:
node_modules
.bin
...
protractor
...
node_modules
.bin
adam-zip
glob
minijasminenode
optimist
saucelabs
selenium-webdriver
protractor
config.js
src
tests
test.e2e.js
My config.js file looks like the following:
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
'browserName': 'chrome'
},
specs: [
'../src/tests/test.e2e.js'
],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
}
};
test.e2e.js looks like the following:
'use strict';
describe('My Sample', function () {
driver = protractor.getInstance();
beforeEach(function () {
driver.get('#/');
});
it('My First Test', function () {
message = "Hello.";
expect(message).toEqual('World.');
});
});
When I attempt to run my end-to-end tests using protractor, I run the following command from the command-line:
node_modules\.bin\protractor protractor\config.js
When I run that command, I receive the following error:
C:\Src\MyProject\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1542
throw error;
^
Error: ECONNREFUSED connect ECONNREFUSED
at ClientRequest.<anonymous> (C:\Src\MyProject\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:12
7:16)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1528:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:441:14
at process._tickCallback (node.js:415:13)
==== async task ====
WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (C:\Src\MyProject\node_modules\protractor\node_modules\selenium-webdriv
er\lib\webdriver\webdriver.js:130:49)
at Function.webdriver.WebDriver.createSession (C:\Src\MyProject\node_modules\protractor\node_modules\selenium-webdriver
\lib\webdriver\webdriver.js:110:30)
at Builder.build (C:\Src\MyProject\node_modules\protractor\node_modules\selenium-webdriver\builder.js:105:20)
at runJasmineTests (C:\Src\MyProject\node_modules\protractor\lib\runner.js:191:45)
at C:\Src\MyProject\node_modules\protractor\lib\runner.js:255:5
at C:\Src\MyProject\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\base.js:1178:15
at webdriver.promise.ControlFlow.runInNewFrame_ (C:\Src\MyProject\node_modules\protractor\node_modules\selenium-webdriv
er\lib\webdriver\promise.js:1438:20)
at notify (C:\Src\MyProject\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:328:12)
at then (C:\Src\MyProject\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:377:7)
What am I doing wrong?
I solved this with --standalone flag:
webdriver-manager start --standalone
I got it working by removing the following line from my config.js
seleniumAddress: 'http://localhost:4444/wd/hub',
Are you running a selenium server? The git README states the following:
WebdriverJS does not natively include the selenium server - you must start a standalone selenium server. All you need is the latest selenium-server-standalone.
source: https://github.com/angular/protractor
The error message is due to the following:
[ECONNREFUSED] The attempt to connect was ignored (because the target is not listening for connections) or explicitly rejected.
Check the URL of the Webdriver manager. The default URL is:
http://localhost:4444/wd/hub
Use a background process to run the webdriver-manager, then run protractor:
Start-Process webdriver-manager start -passthru
protractor conf.js
This will start up a Selenium Server and will output a bunch of info logs. Your Protractor test will send requests to this server to control a local browser. Leave this server running
References
Protractor Tutorial
Protractor Docs: Config File Reference
CONNECT Man Page
POSIX Man Page
For me, this had happened due to incompatible versions of Node and Protractor.
My fix-
Update Node to latest version (v7.0.0 in my case)
Follow steps given here https://stackoverflow.com/a/19333717/1902831
Install latest protractor version (4.0.10 in my case) using:
npm install -g protractor
Open another terminal and execute these command:
webdriver-manager update
webdriver-manager start
Run tests in another terminal using:
protractor conf.js
If you are using the npm protractor-webdriver grunt plugin (https://www.npmjs.org/package/grunt-protractor-webdriver) you may exeprience same kind of error.
This is due to webdriver termination just before test ends. The test runs successfully and then you have a message like :
Session deleted: Going to shut down the Selenium server
Shutting down Selenium server: http://127.0.0.1:4444
Shut down Selenium server: http://127.0.0.1:4444 (OKOK)
d:\Projets\Clouderial\nodeProjects\cld-apps\node_modules\grunt-protractor-runner\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:145
callback(new Error(message));
^
Error: ECONNREFUSED connect ECONNREFUSED
at ClientRequest.<anonymous> (d:\Projets\Clouderial\nodeProjects\cld-apps\node_modules\grunt-protractor-runner\node_modules\protractor\node_modules\selenium-webdriver\http\index.js:145:16)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at Socket.socketErrorListener (http.js:1547:9)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:419:13)
I resolve this using the keepAlive option in the grunt plugin.
Here is my Gruntfile.js config :
protractor_webdriver: {
options: {
keepAlive : true // True to keep the webdriver alive
},
start: {
},
},
...
I hope this will help someone.
JM.
I also faced the same problem,the trick that worked for me is to use two cmd windows,keeping the one open after typing webdriver-manager start and without pressing enter key(if enter key is pressed the selenium server is shutdown,don't know why) open another cmd window and call your tests.
#Alexandros Spyropoulos, it took me quite some time to figure out how to run protractor and I think we had the same problem. You should open one terminal tab and run webdriver-manager start --standalone. Then open another terminal tag and run protractor ***.conf.js
In the hopes that it might help someone: I'd been having the same problem - encountering ECONNREFUSED using grunt-protractor-runner. The nuance to my case is that I was running my entire E2E environment (test files, web application and entire backend) within a Docker container.
I tried running protractor
with and without additional grunt-protractor-webdriver task to get webdriver up and running 'manually' (no difference);
with and without enabling directConnect and keepAlive settings (bypassing Selenium and resulting in crashes related to Chromedriver, one of which was described here).
The solution was rather simple: increase the amount of memory allocated to the container. On my Windows 10 host machine, I performed the following steps:
Run VBoxManage.exe modifyvm default --memory 8192 (via custom shell script) before starting the docker-machine (via Docker Quickstart script, which is equivalent to docker-machine start). (Thanks to this SO answer).
Changing my shell script to run my default container, adding the --shm-size=4G argument to my docker run command. (See docs)
You can verify if it worked by running df -h in your guest machine, by checking the amount of memory mounted on /dev/shm.
As a result, I no longer have seemingly inexplicable errors such as ECONNREFUSED.
If you run the provided protractor demo, you should try running the protractor config in the same command prompt as selenium. Try running both selenium server and protractor separately.
Make Sure first selenium runs by following command.
webdriver-manager start --standalone
And run the protractor in a separate command window.
protractor conf.js
(In my case conf.js was the config file )
I faced a similar issue to the one #David Remie faced with the Selenium Docker grid/standalone. With minimal RAM/CPU, the tests would start before the webdriver was up. A less resource consuming approach is to wait a few seconds before testing (run 'sleep 5' or something like that).
Increasing RAM was sometimes enough as a workaround for the issue, but the real problem was that the Selenium CMD (/opt/bin/entry_point.sh, starts a supervisor that runs the webdriver) from the image based on https://hub.docker.com/r/selenium/node-base/dockerfile was taking time to start the Selenium webdriver.
webdriver-manager start ----- didn't help, But below one helped
webdriver-manager start --standalone

Resources