-
Notifications
You must be signed in to change notification settings - Fork 16
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
Errors with chrome on Ubuntu 20.04 and some possible fixes #43
Comments
@beganovich this is a widespread issue I think may be related to the newer version of snapped. I am also seeing that if attempting to use a dedicated path to a separate chrome binary, this is not being respected by snappdf |
The path to binary is working for me as I have it set on the live site but not the local one. I just tested command line and got the same signal "6" error, but if I set the --binary flag then it works. I was previously using hosted_ninja for pdfs on another server, but switched that to snappdf today as the servers were a similar setup (that one is Ubuntu 22.04). On another note, I couldn't get any flags working like width & height, removing margins and making landscape. @page {
size: 11in 8.5in;
margin: 0;
} |
Thanks, guys, I'll tinker on this one soon. |
@robwent can you try adding 0755 to chrome_crashpad_handler too? You can find it in vendor/beganovich/snappdf/versions and find folder where chmod 0755 chrome_crashpad_handler |
Just a quick update on this. I had to move the site to a different server running Ubuntu 24.04 and the PDF generation stopped working. This time with an error about audio libraries.
It was fixed by running The same version of Chrome that was running on the old server. It's possible 20.04 had something similar already installed, but I have no access to check it now. |
Thanks for update! Please keep in mind that we've listed this in our README. https://github.com/beganovich/snappdf?tab=readme-ov-file#headless-chrome-doesnt-launch-on-unix |
Ahh, I ran all those commands but I got some errors about multiple packages. I'm not sure what the difference is but I had to change |
I got this working on my local Windows machine, but after uploading to my live site, I was getting an unhelpful Symfony error:
The process has been signalled with signal "6"
I installed all the mentioned packages but couldn't get past this.
I then downloaded a separate copy of Chrome to see if that was the issue, but I still got the same error.
Trying to run it on the command line, I got a permission error, so chowned the main chrome file to 755 and then got an error:
I found some threads about Chrome not being able to find a default display and running
printenv DISPLAY
showed nothing.I then found this thread puppeteer/puppeteer#8148 (comment)
Ran
After that, running
printenv DISPLAY
outputs::99
At that point, I could generate a PDF by using the copy of Chrome I uploaded, but not the one downloaded by the download command (I ran it separately on each machine originally).
Unfortunately, I can't remember where I downloaded Chrome from manually, but it doesn't seem to be an official version. The filename is ungoogled-chromium_126.0.6478.127_1.vaapi_linux.tar.xz
Hopefully, this might help someone else get it working.
The text was updated successfully, but these errors were encountered: