webdriverio-boneyard / wdio-selenium-standalone-service

WebdriverIO v4 service to start & stop Selenium Standalone http://webdriver.io
MIT License
54 stars 28 forks source link

Selenium exited before it could start #10

Closed davidosomething closed 8 years ago

davidosomething commented 8 years ago
A service failed in the 'onPrepare' hook
Error: Selenium exited before it could start
    at ChildProcess.errorIfNeverStarted (/Users/david/projects/elitedaily/ed-bootstrap/www/ed-com/tests/webdriver/node_modules/selenium-standalone/lib/start.js:128:15)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

I get this every time I run a test using wdio. Using latest stuff:

    "chai": "3.5.0",
    "mocha": "3.0.2",
    "phantomjs-prebuilt": "2.1.12",
    "selenium-standalone": "5.6.1",
    "wdio-junit-reporter": "^0.1.0",
    "wdio-mocha-framework": "^0.4.0",
    "wdio-phantomjs-service": "^0.1.0",
    "wdio-selenium-standalone-service": "0.0.6",
    "wdio-spec-reporter": "0.0.3",
    "webdriverio": "4.2.8"
matoilic commented 8 years ago

I have the same issue with the latest webdriverio package 4.2.11.

christian-bromann commented 8 years ago

@davidosomething what OS are you using? Can you bundle me a reproducible example?

matoilic commented 8 years ago

Sorry, just after I wrote the message I found the issue. I was starting Selenium Server in another process before running wdio. Thus, the selenium standalone service failed to start.

dayanamcc commented 7 years ago

same error for me., i dont have another selenium server process installed

swetashahi commented 7 years ago

Has anyone found a solution to this?

christian-bromann commented 7 years ago

If you see this error Error: Selenium exited before it could start it means that the server can't be started for some reasons (e.g. port 4444 is blocked)

kirkstrobeck commented 7 years ago

Check for a running java process or try killall java

ghost commented 7 years ago

on mac try to see if you have a stuck zombie process still binding to port 4444 lsof -i :4444

Maybe previous run didn't complete the process of shutting down selenium