Dusk Version:6.4.0 Laravel Version: 6.18.23 PHP Version: 7.3.2 Database Driver & Version: mysql & 10.4.11 -browserVersion: 83.0.4103.61 -chromedriverVersion: 83.0.4103.39
Description: I have this issue only in the server, in localhost everything is fine. I check everything, but I don't know what is the problem, maybe it could be enviroment difference but everything is the same at localhost and in the server:
Tests\Browser\ProductPageTest::testCreateProduct
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to
/session/b4f0e4e2a6a8be095109b1c7f1201798/log with params: {"type":"browser"}
Operation timed out after 30000 milliseconds with 0 bytes received
/var/www/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:331
/var/www/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:590
/var/www/vendor/php-webdriver/webdriver/lib/Remote/RemoteExecuteMethod.php:27
/var/www/vendor/php-webdriver/webdriver/lib/WebDriverOptions.php:166
/var/www/vendor/laravel/dusk/src/Browser.php:369
/var/www/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:161
/var/www/vendor/laravel/framework/src/Illuminate/Support/Traits/EnumeratesValues.php:176
/var/www/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:162
/var/www/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:78
/var/www/tests/Browser/ProductPageTest.php:64
Caused by
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http GET to
/session/b4f0e4e2a6a8be095109b1c7f1201798/screenshot
Operation timed out after 30001 milliseconds with 0 bytes received
/var/www/vendor/php-webdriver/webdriver/lib/Remote/HttpCommandExecutor.php:331
/var/www/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:590
/var/www/vendor/php-webdriver/webdriver/lib/Remote/RemoteWebDriver.php:371
/var/www/vendor/laravel/dusk/src/Browser.php:355
/var/www/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:146
/var/www/vendor/laravel/framework/src/Illuminate/Support/Traits/EnumeratesValues.php:176
/var/www/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:147
/var/www/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:70
/var/www/tests/Browser/ProductPageTest.php:64
This is my DuskTestCaseDriver:
protected function driver() { $options = (new ChromeOptions)->addArguments([ '--disable-gpu', '--headless', '--no-sandbox', '--ignore-ssl-errors', '--verbose' ]); if (env('USE_SELENIUM', 'false') == 'TRUE') { $seleniumServerUrl = 'http://selenium:4444/wd/hub'; } else { $seleniumServerUrl = 'http://localhost:9515'; } return RemoteWebDriver::create( $seleniumServerUrl, DesiredCapabilities::chrome()->setCapability( ChromeOptions::CAPABILITY_W3C, $options ) ); }
I tried a lot of solution, but nothing work for us, if you need any additional info pls ask soon as possible!