PDFs not updating/regenerating

Hello all,
I am having an issue where I update an invoice the live preview at the bottom shows correctly, but the “view pdf” hasn’t updated since last week. Additionally if I change the number to an invoice that has been deleted, it will show the preview for the deleted invoice. If I set the invoice for a random number, it will generate a correct preview for this. It almost seems like a cache issue that isn’t updating. This has just started happening and I can’t figure out why. I have run the artisan optimise command, cleared cache, etc and nothing seems to fix the issue.
Running version v5.5.50-C104, using database queue, but have tried sync, also.

The only thing in logs is

2023-01-12 15:30:10] production.ERROR: The "" file does not exist or is not readable. {"userId":1,"exception":"[object] (Symfony\\Component\\Mime\\Exception\\I> [stacktrace] #0 /var/www/invoiceninja/vendor/symfony/mime/MimeTypes.php(123): Symfony\\Component\\Mime\\FileinfoMimeTypeGuesser->guessMimeType() #1 /var/www/invoiceninja/vendor/symfony/http-foundation/File/File.php(77): Symfony\\Component\\Mime\\MimeTypes->guessMimeType() #2 /var/www/invoiceninja/vendor/symfony/http-foundation/File/File.php(59): Symfony\\Component\\HttpFoundation\\File\\File->getMimeType() #3 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Http/FileHelpers.php(50): Symfony\\Component\\HttpFoundation\\File\\File->guessExtension() #4 /var/www/invoiceninja/app/Jobs/Util/UploadFile.php(87): Illuminate\\Http\\UploadedFile->hashName() #5 /var/www/invoiceninja/app/Utils/Traits/SavesDocuments.php(48): App\\Jobs\\Util\\UploadFile->handle() #6 /var/www/invoiceninja/app/Http/Controllers/ProductController.php(542): App\\Http\\Controllers\\ProductController->saveDocuments() #7 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\ProductController->upload() #8 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction() #9 /var/www/invoiceninja/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(21): Illuminate\\Routing\\Contro> #10 /var/www/invoiceninja/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingRoutingDispatcher.php(19): Sentry\\Laravel\\Tracing\\Routing\\T> #11 /var/www/invoiceninja/vendor/sentry/sentry-laravel/src/Sentry/Laravel/Tracing/Routing/TracingControllerDispatcherTracing.php(20): Sentry\\Laravel\\Tracing\\> #12 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Routing/Route.php(259): Sentry\\Laravel\\Tracing\\Routing\\TracingControllerDispatcherTracing-> #13 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController() #14 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\\Routing\\Route->run() #15 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}() #16 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(126): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipe> #17 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(57): Illuminate\\Routing\\Middleware\\ThrottleRequests> #18 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle() #19 /var/www/invoiceninja/app/Http/Middleware/QueryLogging.php(39): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #20 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\QueryLogging->handle() #21 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pip> #22 /var/www/invoiceninja/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle() #23 /var/www/invoiceninja/app/Http/Middleware/Locale.php(46): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}() #24

I went and changed the default invoice template, openened the invoices I was having issue with, and resaved them. It appears those steps pushed the updates through and they are now updating. Any input as to why this would happen?

@david any thoughts?

Hi @hillel I have been messing around and it appears that changes are not syncing when I have QUEUE_CONNECTION=database set. If I change it to sync, changes seem to save.

It sounds like the queued jobs may not be getting processed, you may need to add the queue:work cron.

I needed to update the php value from 8.0 to 8.2. All is working smoothly now, thank you!