Using the Turnkey Linux install of IN, everything works fine except when I try to print or download an invoice, it just spins it’s wheels and I get nothing.
I’ve gone into the invoice design and if I turn on HTML viewing, I can see an invoice there, but there seems to be no way to actually get an invoice to print or display at the actual invoice page.
I tried looking for a log file that might help show what’s going wrong, I suspect it’s something with the snappdf generator but I’m not sure how to test or fix that.
Running server on Debian with 5.15.60 kernel, version of IN is v5.5.48-C102
root@invoice-ninja .../www/invoiceninja# ./vendor/bin/snappdf convert --html "<h1>Hello world!</h1>" test.pdf
-bash: !: event not found
root@invoice-ninja .../www/invoiceninja# ./vendor/bin/snappdf convert --html "<h1>Hello world</h1>" test.pdf
In Snappdf.php line 260:
The command "'/var/www/invoiceninja/vendor/beganovich/snappdf/versions/1084837-Linux_x64/chrome-linux/chrome' '--headless' '--disable-gpu' '--dis
able-translate' '--disable-extensions' '--disable-sync' '--disable-background-networking' '--disable-software-rasterizer' '--disable-default-apps
' '--disable-dev-shm-usage' '--safebrowsing-disable-auto-update' '--run-all-compositor-stages-before-draw' '--no-first-run' '--no-margins' '--no-
sandbox' '--print-to-pdf-no-header' '--hide-scrollbars' '--ignore-certificate-errors' '--print-to-pdf=/tmp/pdf_3tvP1x.pdf' '/tmp/html_vDBGOy.html
'" failed.
Exit Code: 127(Command not found)
Working directory: /var/www/invoiceninja
Output:
================
Error Output:
================
/var/www/invoiceninja/vendor/beganovich/snappdf/versions/1084837-Linux_x64/chrome-linux/chrome: error while loading shared libraries: libnss3.so:
cannot open shared object file: No such file or directory
convert [--url URL] [--html HTML] [--binary BINARY] [--] <path>
So missing libnss.so. Installed libnss3 and that’s led me down a rabbithole that probably stems from not having a DE installed on a server distro. So I’m putting in packages as I go through retrying that command. Will come back if I run into a dead end.
Edit: on the plus side, I now get the invoice showing up in the Invoice Design pane without turning on HTML view. So I have that going for me, which is nice. Been playing with saving versions of the design and making new invoices to see if it generates at some point.
Edit^2: now I get it coming up fine in the Client Portal and can download a copy that opens correctly.
Submitted a PR to the Turnkey project to satisfy these dependencies. It still doesn’t seem to want to VIew/Print pdfs from the Invoice page. Not sure what to do about that, but I can still pull off the invoice using FF pdf viewer from the preview screen.