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 WrenchExceptionHandshakeException: No
accept header receieved on handshake response in
C:Userskamurjvendorchrome-phpwrenchsrcProtocolProtocol.php:469
Stack trace: #0 C:Userskamurjvendorchrome- phpwrenchsrcClient.php(243): WrenchProtocolProtocol- >validateResponseHandshake('HTTP/1.1 403 Fo...', 'oMHZ8u72RCw63G9...')
#1 C:Userskamurjvendorchrome- phpchromesrcCommunicationSocketWrench.php(99): WrenchClient- >connect() #2 C:Userskamurjvendorchrome- phpchromesrcCommunicationConnection.php(186): HeadlessChromiumCommunicationSocketWrench->connect() #3 C:Userskamurjvendorchrome-phpchromesrcBrowserBrowserProcess.php(146): HeadlessChromiumCommunicationConnection->connect() #4 C:Userskamurjvendorchrome-phpchromesrcBrowserFactory.php(81): HeadlessChromiumBrowserBrowserProcess->start('C:\Program File...', Array) #5 C:xampphtdocszmeta.php(266): HeadlessChromiumBrowserFactory->createBrowser(Array) #6 {main} thrown in C:Userskamurjvendorchrome-phpwrenchsrcProtocolProtocol.php on line 469
3
Answers
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.
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.
IF you are runnning this in a docker image use the below:
I hope this helps…
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.