Skip to content
Advertisement

Laravel Dusk: FacebookWebDriverExceptionUnknownErrorException: unknown error: net::ERR_CONNECTION_REFUSED

Running php artisan dusk get the error:

JavaScript

Versions:

  • OS: Windows 10 v1903 build 18362.1016
  • Chrome: 85.0.4183.83
  • Laravel: v6.18.37
  • Dusk: v5.11.0
  • Phpunit: v8.5.8

Tried:

  • Disable firewall
  • Set test website to use localhost (was myapp.local)
  • Can access all pages using Chrome browser
  • Check that vendor/laravel/dusk/bin/chromedriver-win.exe is executable (-rwxr-xr-x)
  • php artisan route:clear
  • php artisan cache:clear
  • php artisan config:clear
  • composer dump-autoload
  • google “FacebookWebDriverExceptionUnknownErrorException: unknown error: net::ERR_CONNECTION_REFUSED”

The server localhost:9515 appears to be running while tests executing as I get the following response in Chrome when trying it:

JavaScript

DuskTestCase driver:

JavaScript

Does anyone have any clues on what else to try? Or does anyone else know a resolution?

Advertisement

Answer

I faced the same issue and for me what worked was setting the APP_URL parameter in the .env file as:

JavaScript

As that was the same port on which my php artisan serve would also serve the website i.e.

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement