Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

run protractor fails, Error: Timed out waiting for the WebDriver server #276

Closed
jackwhit3 opened this issue Sep 30, 2015 · 25 comments
Closed

Comments

@jackwhit3
Copy link

I'm running on a Mac OS X Yosemite v10.10.2.
Resembles #168 , tried with their solution running
./node_modules/.bin/protractor test/protractor-conf.js still does not work.
Also relates to this issue, but the commit doesn't seem to solve.

angular-phonecat@0.0.0 preprotractor /Users/lihsing/Workspace/angular-phonecat
npm run update-webdriver

angular-phonecat@0.0.0 preupdate-webdriver /Users/lihsing/Workspace/angular-phonecat
npm install

angular-phonecat@0.0.0 postinstall /Users/lihsing/Workspace/angular-phonecat
bower install

angular-phonecat@0.0.0 update-webdriver /Users/lihsing/Workspace/angular-phonecat
webdriver-manager update

selenium standalone is up to date.
chromedriver is up to date.

angular-phonecat@0.0.0 protractor /Users/lihsing/Workspace/angular-phonecat
protractor test/protractor-conf.js

Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
[launcher] Process exited with error code 1
/Users/lihsing/Workspace/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/nexttick.js:39
goog.global.setTimeout(function() { throw exception; }, 0);
^
Error: Timed out waiting for the WebDriver server at http://192.168.0.102:54508/wd/hub
at Error (native)
at onResponse (/Users/lihsing/Workspace/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/http/util.js:87:66)
at /Users/lihsing/Workspace/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/http/util.js:42:21
at /Users/lihsing/Workspace/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/http/http.js:123:5
at ClientRequest. (/Users/lihsing/Workspace/angular-phonecat/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:145:7)
at ClientRequest.emit (events.js:107:17)
at Socket.socketErrorListener (_http_client.js:271:9)
at Socket.emit (events.js:107:17)
at net.js:459:14
at process._tickCallback (node.js:355:11)

npm ERR! Darwin 14.1.0
npm ERR! argv "/Users/lihsing/.nvm/versions/node/v0.12.7/bin/node" "/Users/lihsing/.nvm/versions/node/v0.12.7/bin/npm" "run" "protractor"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! angular-phonecat@0.0.0 protractor: protractor test/protractor-conf.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-phonecat@0.0.0 protractor script 'protractor test/protractor-conf.js'.
npm ERR! This is most likely a problem with the angular-phonecat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! protractor test/protractor-conf.js
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-phonecat
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/lihsing/Workspace/angular-phonecat/npm-debug.log

npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/lihsing/.nvm/versions/node/v0.12.7/bin/node',
1 verbose cli '/Users/lihsing/.nvm/versions/node/v0.12.7/bin/npm',
1 verbose cli 'run',
1 verbose cli 'protractor' ]
2 info using npm@2.11.3
3 info using node@v0.12.7
4 verbose run-script [ 'preprotractor', 'protractor', 'postprotractor' ]
5 info preprotractor angular-phonecat@0.0.0
6 verbose unsafe-perm in lifecycle true
7 info protractor angular-phonecat@0.0.0
8 verbose unsafe-perm in lifecycle true
9 info angular-phonecat@0.0.0 Failed to exec protractor script
10 verbose stack Error: angular-phonecat@0.0.0 protractor: protractor test/protractor-conf.js
10 verbose stack Exit status 1
10 verbose stack at EventEmitter. (/Users/lihsing/.nvm/versions/node/v0.12.7/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
10 verbose stack at EventEmitter.emit (events.js:110:17)
10 verbose stack at ChildProcess. (/Users/lihsing/.nvm/versions/node/v0.12.7/lib/node_modules/npm/lib/utils/spawn.js:24:14)
10 verbose stack at ChildProcess.emit (events.js:110:17)
10 verbose stack at maybeClose (child_process.js:1015:16)
10 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
11 verbose pkgid angular-phonecat@0.0.0
12 verbose cwd /Users/lihsing/Workspace/angular-phonecat
13 error Darwin 14.1.0
14 error argv "/Users/lihsing/.nvm/versions/node/v0.12.7/bin/node" "/Users/lihsing/.nvm/versions/node/v0.12.7/bin/npm" "run" "protractor"
15 error node v0.12.7
16 error npm v2.11.3
17 error code ELIFECYCLE
18 error angular-phonecat@0.0.0 protractor: protractor test/protractor-conf.js
18 error Exit status 1
19 error Failed at the angular-phonecat@0.0.0 protractor script 'protractor test/protractor-conf.js'.
19 error This is most likely a problem with the angular-phonecat package,
19 error not with npm itself.
19 error Tell the author that this fails on your system:
19 error protractor test/protractor-conf.js
19 error You can get their info via:
19 error npm owner ls angular-phonecat
19 error There is likely additional logging output above.
20 verbose exit [ 1, true ]

@mikaelperrin
Copy link

Hi jackwhit3,
I had the same issue when using protractor. This seems to be caused by selenium-server-standalone-2.47.1.jar
I solved it for now by downloading selenium-server-standalone-2.46.0.jar to replace the problematic one. I then modified the requiered version number in config.json to prevent it from upgrading and then I ran protractor using ./node_modules/.bin/protractor test/protractor-conf.js

@jackwhit3
Copy link
Author

Hi @hellrider42 ,
After updating Java, I followed @Alecsandre 's solution at #230 and it worked for me.
I removed chromeOnly: true and added directConnect: true in test/protractor-conf.js.
The version of .jar file doesn't matter I think, I had older version and still worked after I changed.

@mikaelperrin
Copy link

I made it work with your solution indeed, thanks.

@santiagos11
Copy link

I can confirm that @jackwhit3 's solutions. However, I still want to make it work without using the direct connect option. What is causing this error?

@wojciechpe
Copy link

@Alecsandre 's solution at #230 worked for me in Windows 10 64b

@srokatonie
Copy link

@jackwhit3

I removed chromeOnly: true and added directConnect: true in test/protractor-conf.js.

Helped!

@albertopiras
Copy link

@jackwhit3

I removed chromeOnly: true and added directConnect: true in test/protractor-conf.js.

It works! thanks

@jeongl
Copy link

jeongl commented Nov 13, 2015

OMG - after losing my night trying to get this stupid test to run, @jackwhit3 's solution worked. Thanks so much!

@Sheeryada
Copy link

@jackwhit3 Thanks a lot. your solution solved my issue.

@marciandmnd
Copy link

@jackwhit3
This solution works on Ubuntu 15.04

@KassPerf
Copy link

Thanks @jackwhit3 it works for me on my Mac 10.11.2

@SeanGo
Copy link

SeanGo commented Jan 16, 2016

@jackwhit3 Thank You Very Much! it works on Centos7 x64

@wjazz3911
Copy link

Thanks @jackwhit3 it works for me on my Mac 10.10.1 and Chrome version must be >= 43.0.2357.0

@victorhazbun
Copy link

Thank you @jackwhit3, is there an alternative for "directConnect" ? Please let me know.

@Bretto
Copy link

Bretto commented Feb 10, 2016

"directConnect: true" solved my problem. Thanks man!

@ghost
Copy link

ghost commented Feb 24, 2016

add directConnect: true to protractor.conf.js

@EoinGriffin-AI
Copy link

Didn't work for me. I'm already using directConnect: true
Currently blocked by this issue.

@EoinGriffin-AI
Copy link

Installing the latest Java 8 JRE using apt-get (Ubuntu) fixed this for me, although I don't know why. I already had the JDK installed.

@KeidyGibson01
Copy link

I use selenium webdriverjs and i have this same problem but I can not find the rotractor-conf.js

@gkalpak
Copy link
Member

gkalpak commented Jun 8, 2016

It is in /e2e-tests/protractor.conf.js.

@sankargorthi
Copy link

Was trying out the tutorial and ran into this today. Had to add this to e2e-tests.js/protractor.conf.js

directConnect: true

The tags in the tutorial don't have this change.

@mjohenneken
Copy link

If you search google for "Timed out waiting for Webdriver" this is the first result. I find it worth to mention, that this Error happens when you use Firefox > 47.0 with an Selenium version < 3.0.
That's because Firefox made some changes and the native FirefoxDriver doesn't work anymore. If you want to use the newest Firefox you have to use the Marionette driver.

@aniruddhadas9
Copy link

adding directConnect: true in protractor config file worked for me.

@anurbol
Copy link

anurbol commented Apr 11, 2018

In my case, chrome was not installed, installing helped: https://askubuntu.com/a/510186

@edgarechm
Copy link

Quick and easy question:
This URL: http://192.168.0.102:54508/wd/hub
Is a Local domain, the same as using 127.0.0.1? Where does it come from?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests