varspool / Wrench

A simple PHP WebSocket implementation for PHP 7.1
Do What The F*ck You Want To Public License
596 stars 210 forks source link

No accept header receieved on handshake response #118

Closed agentmarine closed 6 years ago

agentmarine commented 6 years ago

HI guys,

This package is included into chrome-php except Wrench is throwing an error when connecting to a chrome webservice

[2018-05-11 15:06:10] local.ERROR: No accept header receieved on handshake response {"exception":"[object] (Wrench\\Exception\\HandshakeException(code: 500): No accept header receieved on handshake response at /Users/dansmacbook/projects/project-scrapper/vendor/wrench/wrench/lib/Wrench/Protocol/Protocol.php:417)

I am not entierly sure how to resolve this issue though any thoughts?

my class

        $webSocketUri = "ws://localhost:9222/devtools/page/$targetID";
        // create a connection
        $connection = new Connection($webSocketUri);
        $connection->connect();

Connection.php

        $socketClient = new Wrench(new WrenchBaseClient($socketClient, 'http://127.0.0.1'), $this->logger);