snappdf icon indicating copy to clipboard operation
snappdf copied to clipboard

Errors with chrome on Ubuntu 20.04 and some possible fixes

Open robwent opened this issue 7 months ago • 7 comments

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:

[2543468:2543468:0708/213831.722702:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
[2543468:2543468:0708/213831.722895:ERROR:env.cc(258)] The platform failed to initialize.  Exiting.

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 https://github.com/puppeteer/puppeteer/issues/8148#issuecomment-1397528849 Ran

apt-get install xvfb x11-apps x11-xkb-utils libx11-6 libx11-xcb1
Xvfb -ac :99 -screen 0 1280x1024x16 & export DISPLAY=:99

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.

robwent avatar Jul 08 '24 22:07 robwent