panther: [Question] Web Driver Curl Exception - docker
Hi everyone,
I try to run Panther on a new installation of Symfony (4.2). I have this error message when I start my tests :
1) App\Tests\Controller\HomeControllerTest::testIndex
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY"}}
Operation timed out after 30002 milliseconds with 0 bytes received
/srv/myproject/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:292
/srv/myproject/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:126
/srv/myproject/vendor/symfony/panther/src/ProcessManager/ChromeManager.php:59
/srv/myproject/vendor/symfony/panther/src/Client.php:80
/srv/myproject/vendor/symfony/panther/src/Client.php:272
/srv/myproject/vendor/symfony/panther/src/Client.php:186
/srv/myproject/tests/Controller/HomeControllerTest.php:15
My Dockerfile:
FROM php:latest
RUN apt-get update && apt-get install -y libzip-dev zlib1g-dev chromium && docker-php-ext-install zip
My test:
class HomeControllerTest extends PantherTestCase
{
public function testIndex()
{
$client = static::createPantherClient();
$crawler = $client->request('GET', '/');
$this->assertCount(1, $crawler->filter('h1'));
}
}
PS: I followed the recommended installation
Thanks for the help 😃
About this issue
- Original URL
- State: open
- Created 5 years ago
- Comments: 23 (3 by maintainers)
On my side I get an error on destruct:
If anyone got this error let me know please 😄
@nicoweb I played a bit and i came with a quick workaround. You have to add the “–no-sandbox” option to your client. It prevent the timeout to happen.
You can do it like this :
Tell me if it works
@qdequippe Exactly ! I was trying to make my own usage of panther. Using directly stuff in this Trait solve all my problem.
I have the same issue an not in docker Debian 9
when I changed execution time https://github.com/symfony/panther/issues/155#issuecomment-474011523 now I have error
Do I need any Desktop installed to use Panther?
I assumed something like this, but wanted to make shure I don’t miss a possible hint. But this leaves the problem still open. The call to $client->request() currently times out after 30s.