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]: After updating spatie/browsershot to 4.2.0 all pdf's are empty #175

Closed
sstottelaar opened this issue Aug 20, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@sstottelaar
Copy link

What happened?

I updated spatie/laravel-pdf and its dependencies (spatie/browsershot) to the latest version to work with Puppeteer v23, but I only get a white page as the PDF output. When I downgrade spatie/browsershot to 4.1.3 it works again.

How to reproduce the bug

When I create a PDF with the latest version of both spatie/laravel-pdf and spatie/browsershot, I get a blank PDF with no content. When i manually downgrade spatie/browsershot in my package.lock to 4.1.3, it works again.

Package Version

1.5

PHP Version

8.3.10

Laravel Version

11.20.0

Which operating systems does with happen with?

macOS

Notes

Today was a release of spatie/browsershot, so I highly suspect this produced a unintended bug in this package.

@sstottelaar sstottelaar added the bug Something isn't working label Aug 20, 2024
@freekmurze
Copy link
Member

I'm unable to pinpoint what has gone wrong in the latest version of Browsershot, so I'm going to revert the entire release...

@freekmurze
Copy link
Member

Update to Browsershot 4.2.1 to make it work again.

@hyphen81
Copy link

Was running into the same issue and resolved it by updating Browsershot to 4.2.1. Thanks to @freekmurze for that. Disappointingly, after updating the CSS is very screwed up on my previously beautiful PDF. If anyone has run into that and fixed it, please let me know.

@bluesheep100
Copy link

I did actually experience this a few times when testing the compatibility patch for Puppeteer 23, but thought nothing of it as tests were passing, and just assumed it was my particular environment being weird. I'll try taking a look at it tomorrow, and see if I can remedy it.

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

No branches or pull requests

4 participants