Invoice PDF download issue after update to v5.5.50-W104

Hi!

After Update to v5.5.50 we encounter issues with invoice PDF downloads.

If we generate a new invoice the preview PDF is always perfect.

The FIRST download of the PDF ist perfect, too.

But if we alter the invoice after the first download, the new download will alway be a cached version of the first download.

Thats a new problem after update.

We are using PDF_GENERATOR=hosted_ninja

A workaround is to search the PDF file on the server and delete the file.

e.g.

rm /var/www/invoiceninja/public/storage/kzotnx7e3uksv0ydwgie6ooo0bttfggw/DcJzfmtOx7BQX4b5EO1dMSHSUDRxxvCOOB6f4Xv0/g8TKpcff5Hbim5wgt1u9ZKDUfuvXJ2lGsYUimJhi/invoices/RG-3995.pdf

After this the PDF Download will generate a new and correct version.

It seems the download routine uses the stored version or isn´t able to overwrite the stored version.

I hope you can help me to fix this issue.

Thanks,
Kai

Hi,

@david do you have any suggestions?

it sounds like the queues are not running,

try changing QUEUE_CONNECTION=sync

or you can try fixing the queue’s themselves.

Thanks for the answer. I altered from

QUEUE-CONNECTION=database
to
QUEUE_CONNECTION= sync

and did a

sudo -u www-data php8.1 /var/www/invoiceninja/artisan optimize

after this and a full reboot.

Unfortunally it doesn´t fix my issue. After the first download of a PDF this file “blocks” the generation of a newer file after I changed the invoice.

Regards,
Kai

@kais

are there any errors in the logs in storage/logs/laravel.log

Thanks for your answer. Theres no Error in the laravel.log

But: Today it works again correct. Have no clue why.
Kai