Hi,
I am currently running version v5.3.27-C62 dockerized.
After creating 3 invoices the pdf generation stopped working. Neither the preview nor the download is working.
The error message I receive is the following:
“500: Internal Server Error There was an error generating the PDF with Phantom JS”
What I’ve done so far:
docker-compose down / pull / up to update
looked up the internet - only found the idea of a new installation to resolve this issue (I really don’t want to)
changing PHANTOMJS_PDF_GENERATION=false to true and again back to false
hmm this doesn’t seem to solve the issue or am I doing something wrong, this is my env file:
APP_URL=blurred
APP_KEY=blurred
REQUIRE_HTTPS=true
APP_DEBUG=false
MULTI_DB_ENABLED=false
DB_HOST1=db
DB_PORT1=3306
DB_USERNAME1=ninja
DB_PASSWORD1=blurred
DB_DATABASE1=ninja
MYSQL_ROOT_PASSWORD=blurred
MYSQL_USER=ninja
MYSQL_PASSWORD=blurred
MYSQL_DATABASE=blurred
#this is a system variable please do not remove
IS_DOCKER=true
It seems like the docker containers do ignore the changes I do in my env file.
If I change the the generator to PDF_GENERATOR=hosted_ninja it stills shows an error of PhantomJs - souldn’t there be at least a different error?
Ok, now I really believe to have found the issue. I have never used the mail function before but as it is required to export all data (because a url will be sent to you) I wanted to set it up.
Result: Nothing - invoice ninja does not even try to login on my mailserver (I don’t see anything in the logs).
As a result I assume that the env variables of my env file do not get read or intepreted.
Calling php artisan optimize results with success but no changes can be seen.
EDIT: OK it seems to work after tinkering with different kind of quotes…
okay - do you have any documentation how to set snappdf up wtih docker - I can’t find anything right now
EDIT: I just found out it is already in the docker-image:
Snappdf is also the default PDF engine in our Docker image, so if you prefer a very simple installation please consider our Docker setup as it is very fast to get going!
Although I have declared
PDF_GENERATOR=snappdf
It still shows an error that something with phantomjs went wrong
Today I tried again to create an invoice and it worked (only my companys’ logo was print as if the image could not be found - but that’s another topic).
I believe it only worked because it’s a new day and as a result a I have new free PhantomJs Cloud credits. So this shows me that the settings of the env file which configure the pdf generator or the PhantomJs Cloud Key do not get applied correctly in the application.
Do you have any idea what I could do or what the problem is?
I really want to avoid reinstalling invoice ninja…
Thank you very much!!!
It seems now to be working correctly.
Do you have any idea why snappdf (which is now in use) cannot print the logo on my pdfs? I have already deleted my company logo and uploaded it again but this made no difference!