Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: PageLayoutMetrics::getResultData(): Return value must be of type array, null returned #611

Open
kingjia90 opened this issue Mar 11, 2024 · 2 comments

Comments

@kingjia90
Copy link
Contributor

kingjia90 commented Mar 11, 2024

Probably something broke with #325

image

Not sure how to reproduce it, just

            $page = $browser->createPage();
            $page->navigate($url)->waitForNavigation();

            $page->screenshot([
                'captureBeyondViewport' => true,
                'clip' => $page->getFullPageClip(),
            ])->saveToFile($outputFile);
@enricodias
Copy link
Member

The key cssContentSize is missing in that response, but if we can't reproduce it the only thing we could do is just throw an exception.

@kingjia90
Copy link
Contributor Author

kingjia90 commented Mar 11, 2024

somehow it happened when i locked the docker image of browserless/chrome to 1.16-chrome-stable but doesn't happen in the latest

What about falling back to windowSize when not found, eg. ['width'=>$options['windowSize'][0], 'height'=>$options['windowSize'][1]] ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants