Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincent15000's avatar

Error with dusk

Hello,

I have this error with Dusk and I don't find why.

Tests\Browser\LoginTest::test_member_can_login
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"capabilities":{"firstMatch":[{"browserName":"chrome","goog:chromeOptions":{"args":["--window-size=1920,1080","--disable-gpu","--headless"]}}]},"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"args":["--window-size=1920,1080","--disable-gpu","--headless"]}}}

If you have any idea.

Thanks.

V

0 likes
5 replies
Nakov's avatar
Nakov
Best Answer
Level 73

I am just curious, have you ever tried to search by yourself on Google? For example based on the error that is thrown you type on Google: WebDriverCurlException: Curl error thrown for http POST to /session and see what results it shows?

For me for example the first result has huge conversation for the same issue that happened on other folks: https://github.com/laravel/dusk/issues/588

So basically you've got to check your chrome version or install the latest if you haven't done what the documentation says: php artisan dusk:chrome-driver

https://laravel.com/docs/8.x/dusk#managing-chromedriver-installations

It takes a little bit of effort before posting here to check the other options, this is just a suggestion as that's much better way to learn, then just throwing an error and someone from here solving it for you, tomorrow you won't know what happened again.

Here is the same question on laracasts as well> https://laracasts.com/discuss/channels/testing/dusk-curl-error-thrown-for-http-post

1 like
vincent15000's avatar

@Nakov Yes I have found all these and some others :

https://laracasts.com/discuss/channels/testing/dusk-curl-error-thrown-for-http-post https://laravelquestions.com/2021/05/01/curl-error-thrown-for-http-post-to-session/ https://askubuntu.com/questions/1204571/how-to-install-chromium-without-snap https://barryvanveen.nl/articles/61-how-to-fix-common-laravel-dusk-problems

I have tested several things without any positive result.

And only after this I have posted here on Laracast. I understand what you mean and I'm not upset ;) ... I really search by myself before posting here.

vincent15000's avatar

@Sinnbeck Here is what I have done :

  • checked the Chromium driver versions
  • installed staudenmeir/dusk-updater and executed the update
  • updated Chromium on my computer (Ubuntu)
  • checked the permissions of vendor/laravel/dusk/bin/ to be 755 (I have 775)
vincent15000's avatar

@nakov and @sinnbeck I have it ... I thought it was possible to use Chromium and I had not tried with Google Chrome ... so I have just installed the official Google Chrome on my Ubuntu and it works fine.

Please or to participate in this conversation.