Our state of the art Gantt chart


Post by Ayurchenkoi »

Hi, we try to run PDF export feature. We get docker file for export server from examples and have error when try to export.

Error: Failed to export task
at Queue.onJobFailed (/home/pptruser/src/queue.js:277:28)
at Queue.emit (events.js:198:13)
at worker.run.then.catch.e (/home/pptruser/src/queue.js:393:28)
at process._tickCallback (internal/process/next_tick.js:68:7)

Whe look at logs on docker we have follow message:

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

at onClose (/home/pptruser/node_modules/puppeteer/lib/Launcher.js:342:14)
at Interface.helper.addEventListener (/home/pptruser/node_modules/puppeteer/lib/Launcher.js:331:50)
at Interface.emit (events.js:203:15)
at Interface.close (readline.js:397:8)
at Socket.onend (readline.js:173:10)
at Socket.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1143:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

2022-10-07T12:59:53.268Z warn: [Worker@ad0chsli0nfvcjfccgfo0] Job 1/1 for request dfa6bd84-7965-4681-ba7a-6c8bc08bc542 failed after 3 attempts
2022-10-07T12:59:53.271Z error: [Queue@h5tzy5cgbdz73quqpkag3] Error: Failed to launch chrome!
/home/pptruser/node_modules/puppeteer/.local-chromium/linux-662092/chrome-linux/chrome: error while loading shared libraries: libXtst.so.6: cannot open shared object file: No such file or directory

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

at onClose (/home/pptruser/node_modules/puppeteer/lib/Launcher.js:342:14)
at Interface.helper.addEventListener (/home/pptruser/node_modules/puppeteer/lib/Launcher.js:331:50)
at Interface.emit (events.js:203:15)
at Interface.close (readline.js:397:8)
at Socket.onend (readline.js:173:10)
at Socket.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1143:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

2022-10-07T12:59:53.273Z info: [Queue@h5tzy5cgbdz73quqpkag3] Queue is stopped
2022-10-07T12:59:53.274Z warn: POST request dfa6bd84-7965-4681-ba7a-6c8bc08bc542 failed
2022-10-07T12:59:53.275Z warn: Error: Failed to export task
at Queue.onJobFailed (/home/pptruser/src/queue.js:277:28)
at Queue.emit (events.js:198:13)
at worker.run.then.catch.e (/home/pptruser/src/queue.js:393:28)
at process._tickCallback (internal/process/next_tick.js:68:7)

Can you please help us, maybe we use wrong Docker file (we get it from examples/_shared/server/Dockerfile)?

Thank you.


Post by Maxim Gorkovsky »

Hello.
Please try docker image from this repo: https://github.com/bryntum/pdf-export-server
Or you can try one from dockerhub: https://hub.docker.com/r/bryntum/pdf-export-server


Post by Ayurchenkoi »

Hi, now we use your image and export in general ok, but there is something with... styles of result pdf?
Can you please tell us hot to fix this problem?
Thank you!

image_2022-11-03_16-43-11.png
image_2022-11-03_16-43-11.png (197.87 KiB) Viewed 310 times
Gantt1.pdf
(598.71 KiB) Downloaded 29 times

Post by Ayurchenkoi »

ping...


Post by marcio »

Hey Ayurchenkoi, we'll be looking into that shortly.

Best regards,
Márcio


Post by Maxim Gorkovsky »

When you're using docker image you need to configure export feature to replace stylesheet urls to smth reachable to the export server. See this doc for explanation of different scenarios: https://github.com/bryntum/pdf-export-server/blob/main/docs/architecture.md

In this case PDF looks like stylesheets were not loaded. Either path is wrong or requests were blocked by CORS. You can check server logs inside docker container to see if there are any errors. Alternatively, you can extend docker image to include your app stylesheets


Post Reply