Still some issues after Upgrade to v5

I’m having Invoice Ninja on a self hosted environment with CPanel and installed via Softaculous.

When I check the Health APP I can see the following. So all cron task are working.

image

So First all there is still Phanton JS Web as PDF While in my env file there is

image

So when I check or want to send an invoice I still get the error

500: There was an error generating the PDF with Phantom JS

But it should be the other one. I also tried already to change the env file and put it on Phantom and PHANTOMJS_PDF_GENERATION=true but the message stays the same. In Version 4 I don’t have this issue.

Hi,

It may help to run php artisan optimize to update the config cache.

ok so that is just create a cron job with this because I can not perform this action in CPanel

Loading /update?secret= in the browser may work

Thx and the secret = that it my APP_Secret in my env file right or is that the UPDATE_SECRET=
and is it then https://facturatie.servitweb.be/public/update?secret= or https://facturatie.servitweb.be/update?secret=

I tried both but still the same issue 500: There was an error generating the PDF with Phantom JS

Are you still seeing PhantomJS using the health check?

image

Yes it says so

Also send email is not working but maybe this is due to the PDF error

And I just see that my env file is saying QUEUE_CONNECTION=database but the Queue is still on sync

In the laravel log I have

[2021-12-29 18:48:37] production.ERROR: There was an error generating the PDF with Phantom JS {“exception”:"[object] (App\Exceptions\PhantomPDFFailure(code: 0): There was an error generating the PDF with Phantom JS at /home//app/Utils/PhantomJS/Phantom.php:150)
[stacktrace]

Maybe some extra info. But when I remove all the .env files in my directory the site is still working even after update.

So I guess my invoice ninja is using another .env file then the one in facturatie.servitweb.be directory.

Sorry went fully back to version 4.5 because can’t wait until this is finished while I need to be able to send out invoices.

It sounds like the system has cached your config. If you delete the contents of bootstrap/cache the config will regenerate.

ok will try this next week again

I had a problem with postscript generation if the image files (logo) etc were not available after an upgrade. Usually this shows up in log files. Admittedly I’m using white label version so have ninja hosted PDF creation not phantom but it is worth checking the log files for something like this
[2021-12-28 17:11:51] production.ERROR: file_get_contents(https://facturatie.servitweb.be/public/storage/76alNMIDOPei96wipCBWVzCB5KC8XRXX/WY8X1e0UFB5zVu6GxFdFaN1Jcfcp9LAe42UVjx9w.png): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found

Please note I have modified the base URL above from a real error and URL in my log to reflect your setup. including adding ‘public’ back in as I have hardened my install to prevent access to app files. This issue occurs if you have uploaded any sort of company logo to use on invoices.

After a retry I works but I had to change some settings in the env file

queue on database instead of sync
and smtp settings without quotes
and pdf to self-host ninja.

after this I need to perform the update and clear the cache folder.