Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Selenium exited before it could start #10

Closed
davidosomething opened this issue Aug 26, 2016 · 8 comments
Closed

Selenium exited before it could start #10

davidosomething opened this issue Aug 26, 2016 · 8 comments

Comments

@davidosomething
Copy link

davidosomething commented Aug 26, 2016

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
Copy link

matoilic commented Sep 5, 2016

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

@christian-bromann
Copy link
Contributor

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

@matoilic
Copy link

matoilic commented Sep 5, 2016

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
Copy link

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

@swetashahi
Copy link

Has anyone found a solution to this?

@christian-bromann
Copy link
Contributor

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
Copy link

Check for a running java process or try killall java

@ghost
Copy link

ghost commented Jan 19, 2017

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

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

6 participants