SnailyCAD / snaily-cadv4

💻 An open source Computer Aided Dispatch (CAD) for FiveM, this is a web based integration for communities who love police roleplaying and dispatching. Discord: https://discord.gg/eGnrPqEH7U
https://docs.snailycad.org/docs/getting-started
MIT License
140 stars 84 forks source link

PDF reports not working - file is corrupted #1836

Closed bartusek27 closed 11 months ago

bartusek27 commented 11 months ago

What version of Node.js are you using?

18

What operating system are you using?

Ubuntu

What version of SnailyCAD are you currently using?

v1.73.0 fedb678

Describe the Bug

Clicking on Export button that should generate PDF report of some ticket/arrest report, it generates broken PDF.

Expected Behavior

When clicking the button, it generates and downloads PDF that can be open and is not distorted.

To Reproduce

Click on the Export button and open downloaded PDF.

casperiv0 commented 11 months ago

So, this is most likely an issue that happens when installing the dependencies. Here's a similar issue I had: image

Are you able to follow their troubleshooting guide and also check if you're receiving an error in the API logs if an error occurs please.

casperiv0 commented 11 months ago

Also, let me know if you're running SnailyCAD as root user, there are some things that need to be configured in that case. @bartusek27

bartusek27 commented 11 months ago

I have probably fixed the Puppeteer problem - this should probably be implemented into the docs that I need Chromium for this - also it seems that I have the same problem with root.

casperiv0 commented 11 months ago

Alright, perfect. Will add a page to the docs later today that explains the root issue & fix for that. It will also include the required dependencies puppeteer requires

casperiv0 commented 11 months ago

Please update to the very latest version and check this doc page: https://docs.snailycad.org/docs/errors/corrupt-pdf-export