I have docker image
FROM php:8.0.2-fpm-buster
in composer
"symfony/panther": "^2.0",
"require-dev": {
"dbrekelmans/bdi": "^1.0",
i run
composer require --dev dbrekelmans/bdi && vendor/bin/bdi
inside container i have
root@c2392b7b5478:/usr/src/app# chromium -version
Chromium 90.0.4430.212 built on Debian 10.9, running on Debian 10.8
root@c2392b7b5478:/usr/src/app# google-chrome-stable -version
Google Chrome 106.0.5249.103
but
$httpClient = SymfonyComponentPantherClient::createChromeClient();
give my
RuntimeException {#1085 ▼
#message: ""chromedriver" binary not found. Install it using the package manager of your operating system or by running "composer require --dev dbrekelmans/bdi && vendor/b ▶"
UPDATE 1
I download
https://chromedriver.storage.googleapis.com/index.html?path=106.0.5249.61/
for my chrome
root@e752debb2a72:/usr/src/app# google-chrome -version
Google Chrome 106.0.5249.103
run
$httpClient = SymfonyComponentPantherClient::createChromeClient(
$this->kernel->getProjectDir().'/bin/chromedriver'
);
get error
FacebookWebDriverExceptionUnknownErrorException {#988 ▼
-results: array:1 [▼
"value" => array:3 [▼
"error" => "unknown error"
"message" => """
unknown error: Chrome failed to start: crashed.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
"""
2
Answers
Ok I add
now work fine
You have to put chromedriver manually to your image: https://chromedriver.chromium.org/downloads