You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: HeadlessChromium\Frame::getLatestLoaderId(): Return value must be of type string, null returned
│
│ /home/tb/code/php_frameworkless/tasks_be/tests/vendor/chrome-php/chrome/src/Frame.php:98
│ /home/tb/code/php_frameworkless/tasks_be/tests/vendor/chrome-php/chrome/src/PageUtils/PageNavigation.php:84
│ /home/tb/code/php_frameworkless/tasks_be/tests/vendor/chrome-php/chrome/src/Page.php:216
with:
public function __construct(array $frameData)
{
$this->frameData = $frameData;
$this->latestLoaderId = $frameData['loaderId'] ?? 0;
$this->frameId = $frameData['id'];
}
It would be nice if Firefox would be supported as well.
(my initial tests with MS Edge 120 on Linux were successful without further patches)
From "https://firefox-source-docs.mozilla.org/remote/index.html#remote-protocol-cdp-header":
Firefox implements a subset of the Chrome DevTools Protocol (CDP) in order to support third party automation tools such as puppeteer.
E.g. I patched the handshake:
with:
I also patched Frame::__construct:
with:
Versions:
Firefox 121.0
chrome-php/chrome v1.10.0
Headless Firefox also requires to change 2 preferences to work with ChromeDP: https://firefox-source-docs.mozilla.org/remote/cdp/RequiredPreferences.html
Reference for startup parameters and setting initial preferences from puppeteer:
Firefox: https://github.com/puppeteer/puppeteer/blob/a87a03587949406dfda22377c48a22f915c760ef/packages/puppeteer-core/src/node/FirefoxLauncher.ts
Chrome: https://github.com/puppeteer/puppeteer/blob/a87a03587949406dfda22377c48a22f915c760ef/packages/puppeteer-core/src/node/ChromeLauncher.ts
The text was updated successfully, but these errors were encountered: