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

Full page image: Fix blank page #554

Merged
merged 1 commit into from
Aug 13, 2024
Merged

Conversation

juanicabanas
Copy link
Contributor

This PR fixes blank page screenshot bug.

Puppeter resizes the viewport when taking a screenshot. See details here

After this PR in scenes, when taking the screenshot isMobile is true for a while (randomly). That makes the dashboard re-render and the screenshot ends up being a blank page, showing only the NavToolbar.
Issue thread.

With captureBeyondViewport as false, it works as expected, because we set the viewport based on panels container scrollHeight here

Before After
image image

@@ -397,7 +398,7 @@
});
}

return page.screenshot({ path: options.filePath, fullPage: options.fullPageImage, captureBeyondViewport: options.fullPageImage || false });
return page.screenshot({ path: options.filePath, fullPage: options.fullPageImage, captureBeyondViewport: false });

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
Copy link
Contributor

@evictorero evictorero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and couldn't reproduce the blank page anymore. It takes good screenshots with and without scenes.

@juanicabanas juanicabanas merged commit bf7f999 into master Aug 13, 2024
4 checks passed
@juanicabanas juanicabanas deleted the juanicabanas/blink-page-fix branch August 13, 2024 19:07
@juanicabanas
Copy link
Contributor Author

@lsfc02
Copy link

lsfc02 commented Aug 27, 2024

the same thing here

@juanicabanas
Copy link
Contributor Author

Hi @lsfc02 . Are you still facing the same issue?
Could you provide more info?
Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/puppeteer type/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants