Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP chrome-php / headless-chromium-php error

I have been using the chrome-php & headless-chromium libraries for few months without any issues but now I get this error. Does anyone know why this would start happening? Thanks.

Fatal error: Uncaught Wrench\Exception\HandshakeException: No 
accept header receieved on handshake response in         
C:\Users\kamurj\vendor\chrome-php\wrench\src\Protocol\Protocol.php:469 
Stack trace: #0 C:\Users\kamurj\vendor\chrome- php\wrench\src\Client.php(243): Wrench\Protocol\Protocol- >validateResponseHandshake('HTTP/1.1 403 Fo...', 'oMHZ8u72RCw63G9...')                 
 #1 C:\Users\kamurj\vendor\chrome- php\chrome\src\Communication\Socket\Wrench.php(99): Wrench\Client- >connect() #2 C:\Users\kamurj\vendor\chrome- php\chrome\src\Communication\Connection.php(186): HeadlessChromium\Communication\Socket\Wrench->connect() #3 C:\Users\kamurj\vendor\chrome-php\chrome\src\Browser\BrowserProcess.php(146): HeadlessChromium\Communication\Connection->connect() #4 C:\Users\kamurj\vendor\chrome-php\chrome\src\BrowserFactory.php(81): HeadlessChromium\Browser\BrowserProcess->start('C:\\Program File...', Array) #5 C:\xampp\htdocs\zmeta.php(266): HeadlessChromium\BrowserFactory->createBrowser(Array) #6 {main} thrown in C:\Users\kamurj\vendor\chrome-php\wrench\src\Protocol\Protocol.php on line 469
like image 743
virap Avatar asked May 22 '26 22:05

virap


1 Answers

I also just stumbled upon this issue. As @ottenhoff mentioned, downgrading to the earlier version works well.

For anybody else encountering this issue. Below are instruction on how to set a specific version for deb Ubuntu.

CHROME_VERSION=110.0.5481.96-1
wget --no-check-certificate https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb || apt -y -f install
rm google-chrome-stable_${CHROME_VERSION}_amd64.deb;

IF you are runnning this in a docker image use the below:

ENV CHROME_VERSION=110.0.5481.96-1
RUN curl -LO https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
RUN dpkg -i google-chrome-stable_${CHROME_VERSION}_amd64.deb || apt -y -f install
RUN rm google-chrome-stable_${CHROME_VERSION}_amd64.deb;

I hope this helps...

like image 137
preschool Avatar answered May 24 '26 15:05

preschool



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!