arachnys / athenapdf

Drop-in replacement for wkhtmltopdf built on Go, Electron and Docker
MIT License
2.26k stars 187 forks source link

(athenapdf:14640): Gtk-WARNING **: cannot open display: :99 #198

Open lampnick opened 4 years ago

lampnick commented 4 years ago

version:v2.13.0 env: run in k8s error message:exit status 1 : (athenapdf:14640): Gtk-WARNING **: cannot open display: :99 log meesage:

[Worker #5] processing conversion job (pending conversions: 0)
[AthenaPDF] converting to PDF: https://test.com/5-91a0-d.html
[AthenaPDF][Error1]==>[athenapdf -S --no-cache {https://test.com/5-91a0-d.html  text/html; charset=utf-8 false}],[errinfo]==>exit status 1 : 
(athenapdf:14640): Gtk-WARNING **: cannot open display: :99

captured errors:
Error #01: exit status 1 : 
(athenapdf:14640): Gtk-WARNING **: cannot open display: :99

[GIN] 2019/07/23 - 03:23:14 | 200 |  124.925714ms |    172.25.0.129 |  GET     /convert
Error #01: exit status 1 : 
(athenapdf:14640): Gtk-WARNING **: cannot open display: :99

like this issue: https://github.com/arachnys/athenapdf/issues/161 but the issue say this problem has been solved. What is the reason for this problem?

WinniX commented 3 years ago

Hi there! We have the same issue using v2.16.0. Do you have any updates? Thanks in advance!

MrSaints commented 3 years ago

Hey @WinniX, this project is a bit dated, and unmaintained. This seems to be a good successor: https://thecodingmachine.github.io/gotenberg/. Or, if you have access to Cloud Functions / Lambda, check out https://github.com/Courtsite/shuttlepdf.

mingshenggan commented 3 years ago

Leaving message here, hope it helps future folks

Try GIN_MODE=1 to get more information. For us, we allocated insufficient memory and thus it failed.