Skip to content

Instantly share code, notes, and snippets.

@flamingbear
Last active November 10, 2015 17:13
Show Gist options
  • Save flamingbear/10506888 to your computer and use it in GitHub Desktop.
Save flamingbear/10506888 to your computer and use it in GitHub Desktop.
problems with GhostDriver not starting
Running "mochaWebdriver:phantom" (mochaWebdriver) task
[D] Task source: /Users/savoie/projects/icebridge-portal-2/node_modules/grunt-mocha-webdriver/tasks/grunt-mocha-wd.js
Verifying property mochaWebdriver.phantom exists in config...OK
Files: spec/acceptance/map_navigation_test.js
Options: username=undefined, key=undefined, identifier="166487455", concurrency=1, testName="", testTags=[], tunnelFlags=null, secureCommands=false, usePhantom
Running webdriver tests against PhantomJS.
>> [grunt-notify] growl: growlnotify wasn't found. If you were hoping to use Growl, make you sure you have their command line script called Growlnotify. Mac: http://growl.info/downloads or Windows: http://www.growlforwindows.com/gfw/help/growlnotify.aspx and put it in your path. You should be able to type growlnotify --version and get something back.
>> [grunt-notify] IS_WINDOWS: false
>> [grunt-notify] PROGRAM_FILES: undefined
>> [grunt-notify] PROGRAM_FILES_X86: undefined
>> [grunt-notify] fullPathToApplication: false
>> [grunt-notify] snarl: Snarl not available for this OS.
>> [grunt-notify] os: Darwin
>> [grunt-notify] version: 13.1.0
>> [grunt-notify] IS_MAC: true
>> [grunt-notify] MOUNTAIN_LION: true
>> [grunt-notify] notification_center: Will use Notification Center
>> [notification-center] cmd: /Users/savoie/projects/icebridge-portal-2/node_modules/grunt-notify/bin/Grunt.app/Contents/MacOS/Grunt
>> [notification-center] args: -title icebridge_portal2 mochaWebdriver:phantom -message Error starting PhantomJS
>> Error starting PhantomJS
>> [notification-center] cmd: /Users/savoie/projects/icebridge-portal-2/node_modules/grunt-notify/bin/Grunt.app/Contents/MacOS/Grunt
>> [notification-center] args: -title icebridge_portal2 -message [ERROR - 2014-04-11T22:30:56.066Z] GhostDriver - main.fail - {"message":"Could not start Ghost Driver","line":82,"sourceId":151639536,"sourceURL":":/ghostdriver/main.js","stack":"Error: Could not start Ghost Driver\n at :/ghostdriver/main.js:82","stackArray":[{"sourceURL":":/ghostdriver/main.js","line":Warning}]}
82: [ERROR - 2014-04-11T22:30:56.066Z] GhostDriver - main.fail - {"message":"Could not start Ghost Driver","line":82,"sourceId":151639536,"sourceURL":":/ghostdriver/main.js","stack":"Error: Could not start Ghost Driver\n at :/ghostdriver/main.js:82","stackArray":[{"sourceURL":":/ghostdriver/main.js","line":82}]}
 Use --force to continue.
Aborted due to warnings.
savoie@savoie-laptop ~/projects/icebridge-portal-2 (feature-all-flightlines=)$
@flamingbear
Copy link
Author

lsof -i :4444

Told me there was something running on the default phantomJS port, couldn't tell what the process was, but when I killed it, everything just worked.

@cloudEdwards
Copy link

I fixed this problem by seeing if my port was being used with
netstat -tulnap That shows you a list of all the ports in use. Find the one that phantomjs is using.
Then you can kill the process using fuser <your-port-number>/tcp -k.
For example, my port was 4444 so fuser 444/tcp -k

Just for noobs like me who don't know how to kill processes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment