I’m using a self-hosted invoiceninja5 version (via Yunohost - v5.3.60-C76) on a raspberryPI.
I have had errors trying to generate PDF invoices (500 server error) that I solved from the information I found here and there on the forum and documentation. Mainly I modified my .env file to use PhantomJS (with a private key).
The health check is mostly green as you can see below (don’t know what Queue is, and the snapPDF warning seems normal since I can’t use it on a self-hosted installation and use Phantom JS instead):
So when I edit a draft invoice I can see a preview using the choosen template, but when I try to view the PDF or download it, I see a single page pdf which shows a grey page with no content and two white dots.
It seems to me that the dots are “loading dots” from a view that is being loaded and that you can see sometimes in the app (for example when you do a CTRL+R).
I didn’t find anything about this type of error. And the result is the same when I use the Linux app.
I would appreciate help pointing to information about similar error, or where I can find relevant log info.
I dont understand how to view the corresponding invoice in the client portal… How should I do that ?
I do not have a “client” account, and I suppose you don’t mean logging “as” the client ?
And the invoice is still a draft so it can’t be seen on the client portal I guess.
Yes I have, and this is how I got Phantom JS to generate a pdf and solve the 500 server error.
In laravel.log there are no more errors now, I can see the errors from before when I was trying to generate a pdf with snappdf before understanding that it does not work on a self-hosted instance. Edit: Actually it is written in the doc that it’s not possible in a shared hosting which I misread in self-hosted…
I added the LOG_PDF_HTML=true variable in .env as I understand I should see the content that is supposed to be converted to PDF, but there is nothing in the laravel.log… is it supposed to be logged elsewhere ?
Edit2: with snappdf I can see html dump into the logs, but when using phantomJS there is no html dump in the log…
Also I have a doubt now, I thought I read in the documentation (but can’t find it anymore) that using snappdf was not compatible with a linux system. Is this correct ?
Because I tried again using snappdf and I now run again in the 500 server error.
Could it be that my raspberryPI is 32-bit and that I don’t have the correct snappdf version ? Here is the log error:
It looks like the system won’t allow InvoiceNinja to run a cli command to execute the snappdf binary. You’ll need to either use PhantomJS or hosted_ninja for your PDF generation.
The thing is that the grey PDF page occurs using phantomJS, and that in that case there is absolutely nothing in laravel.log (except one line which seems to say that the PDF was produced without problems…).
Also with phantomJS there is no HTML dump in the log (with LOG_HTML_PDF set to true) while there is one when I tried using snappdf.