3

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
virap
  • 85
  • 1
  • 9

3 Answers3

5

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...

preschool
  • 183
  • 1
  • 11
4

I had the same issue. Fixed by downgrading google-chrome-stable.

I was at 111.0.5563.64 and downgraded to 110.0.5481.0 and it works again.

Ottenhoff
  • 41
  • 1
1

You no longer need to downgrade Chrome. This issue has been resolved in chrome-php/chrome v1.8.1

https://github.com/chrome-php/wrench/issues/11

I upgraded today and verified it is fixed.

  • but do not forget, updating lib - will need to migrade php to 7.4 : - Installation request for chrome-php/chrome 1.8.1 -> satisfiable by chrome-php/chrome[v1.8.1]. - chrome-php/chrome v1.8.1 requires php ^7.4.15 || ^8.0.2 -> your PHP version (7.3.33) does not satisfy that requirement. – Vladimir Ch Jun 27 '23 at 18:54