-
Notifications
You must be signed in to change notification settings - Fork 307
Closed
Description
This only happens when using the userData, I need to keep the environment instead of having an entire fresh instance created on every load.
[2018-09-29 00:03:49] DEBUG socket(1): ← receiving data:{"error":{"code":-32602,"message":"No target with given id found"},"id":22}
Which eventually breaks the Session constructor because the sessionId is not returned.
PHP Fatal error: Uncaught TypeError: Argument 2 passed to HeadlessChromium\Communication\Session::__construct() must be of the type string, null given, called in .../vendor/chrome-php/chrome/src/Communication/Connection.php on line 240 and defined in .../vendor/chrome-php/chrome/src/Communication/Session.php:42
Current workaround:
src/Communication/Connection.php
commented out the return type of createSession so I can:
$sessionId = $response['result']['sessionId'] ?? false;
if(!$sessionId)
return;
src/Browser.php
Not creating a target if no session is returned
if(!$session)
return;
Not sure if it's the best approach as I just started to fiddle around with this library...
I will update once I track everything down.
Great work by the way!
Metadata
Metadata
Assignees
Labels
No labels