Installing Laravel Dusk - Failed to connect on localhost port 9515: connection refused

Posted 2 years ago by iinventedtheinternet

I'm trying to install Laravel Dusk following the documentation here: https://laravel.com/docs/5.4/dusk#installation

When I run php artisan dusk, I get the following error:

[email protected]:/var/www/html/testing$ php artisan dusk
PHPUnit 5.7.13 by Sebastian Bergmann and contributors.

EE                                                                  2 / 2 (100%)

Time: 1.13 seconds, Memory: 10.00MB

There were 2 errors:

1) Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY"}}

Failed to connect to localhost port 9515: Connection refused

/var/www/html/testing/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:287
/var/www/html/testing/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:121
/var/www/html/testing/tests/DuskTestCase.php:32
/var/www/html/testing/vendor/laravel/dusk/src/TestCase.php:180
/var/www/html/testing/vendor/laravel/framework/src/Illuminate/Support/helpers.php:639
/var/www/html/testing/vendor/laravel/dusk/src/TestCase.php:181
/var/www/html/testing/vendor/laravel/dusk/src/TestCase.php:111
/var/www/html/testing/vendor/laravel/dusk/src/TestCase.php:85
/var/www/html/testing/tests/Browser/ExampleTest.php:21

2) Tests\Browser\LoginTest::testExample
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY"}}

Failed to connect to localhost port 9515: Connection refused

/var/www/html/testing/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:287
/var/www/html/testing/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:121
/var/www/html/testing/tests/DuskTestCase.php:32
/var/www/html/testing/vendor/laravel/dusk/src/TestCase.php:180
/var/www/html/testing/vendor/laravel/framework/src/Illuminate/Support/helpers.php:639
/var/www/html/testing/vendor/laravel/dusk/src/TestCase.php:181
/var/www/html/testing/vendor/laravel/dusk/src/TestCase.php:111
/var/www/html/testing/vendor/laravel/dusk/src/TestCase.php:85
/var/www/html/testing/tests/Browser/LoginTest.php:20

ERRORS!
Tests: 2, Assertions: 0, Errors: 2.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.