Having trouble installing v5.3.25-C60 Laravel error/No PDF/No save

OK, tried for a day and a half (unsuccessfully) to install a V5 version on Ubuntu 20.04/Apache so now I’m need of some expert guidance. I HAD a fully functioning version of V5 and the buggy PDF generation stopped working so I thought would try to install a fresh version in a new directory and port the data over but it’s not working and I’m stuck!

I am unable to save invoices (timeout error) or generate PDF’s and it all seems to be tied to the following laravel errors:
[stacktrace] [2021-10-26 15:15:41] production.ERROR: file_get_contents(https://inv5.myriad.ca/images/new_logo.png): failed to open stream: Connection timed out {"userId":1,"exception":"[object] (ErrorException(code: 0): file_get_contents(https://inv5.myriad.ca/images/new_logo.png): failed to open stream: Connection timed out at /var/www/invoiceninjav5/app/Models/Presenters/CompanyPresenter.php:73)

Laravel PDF error:
[stacktrace] [2021-10-25 20:48:41] production.ERROR: The file "/var/www/invoiceninja/public/storage/Zh3KnSJFS59Zc9RTh3hOryuBmvX7qNkvYiC1NaJykhKuFevmgxrmEbF1rEU106Hf/IYWF3oXZ94n9oHUTd9mFrXJVeY1X3pfTKWY45uwp/invoices/0006.pdf" does not exist {"exception":"[object] (Symfony\\Component\\HttpFoundation\\File\\Exception\\FileNotFoundException(code: 0): The file \"/var/www/invoiceninja/public/storage/Zh3KnSJFS59Zc9RTh3hOryuBmvX7qNkvYiC1NaJykhKuFevmgxrmEbF1rEU106Hf/IYWF3oXZ94n9oHUTd9mFrXJVeY1X3pfTKWY45uwp/invoices/0006.pdf\" does not exist at /var/www/invoiceninja/vendor/symfony/http-foundation/File/File.php:36)

If I paste the urls above into the browser they work but not it seems not to work in the program. I also suspect that this error might also be the cause of my non PDF generation. I am using snappdf btw. Any help would be gratefully appreciated.

Hi,

It may help to set LOCAL_DOWNLOAD=true in the .env file

https://invoiceninja.github.io/docs/env-variables/

Saved an invoice, but now it can’t delete… It times out but then when you refresh the page it is deleted?!
[stacktrace]
[2021-10-25 20:48:41] production.ERROR: The file “/var/www/invoiceninja/public/storage/Zh3KnSJFS59Zc9RTh3hOryuBmvX7qNkvYiC1NaJykhKuFevmgxrmEbF1rEU106Hf/IYWF3oXZ94n9oHUTd9mFrXJVeY1X3pfTKWY45uwp/invoices/0006.pdf” does not exist {“exception”:"[object] (Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException(code: 0): The file “/var/www/invoiceninja/public/storage/Zh3KnSJFS59Zc9RTh3hOryuBmvX7qNkvYiC1NaJykhKuFevmgxrmEbF1rEU106Hf/IYWF3oXZ94n9oHUTd9mFrXJVeY1X3pfTKWY45uwp/invoices/0006.pdf” does not exist at /var/www/invoiceninja/vendor/symfony/http-foundation/File/File.php:36)
[2021-10-23 02:38:57] production.INFO: db fails
"}

It may be helpful if you can provide more details.

cc @david

OK here is a new Laravel error relating to snappdf:

`[stacktrace] [2021-10-26 14:02:47] production.ERROR: The process "'/var/www/invoiceninjav5/vendor/beganovich/snappdf/versions/932383-Linux_x64/chrome-linux/chrome' '--headless' '--disable-gpu' '--disable-translate' '--disable-extensions' '--disable-sync' '--disable-background-networking' '--disable-software-rasterizer' '--disable-default-apps' '--disable-dev-shm-usage' '--safebrowsing-disable-auto-update' '--run-all-compositor-stages-before-draw' '--no-first-run' '--no-margins' '--no-sandbox' '--print-to-pdf-no-header' '--hide-scrollbars' '--ignore-certificate-errors' '--print-to-pdf=/tmp/pdf_AN0fow.pdf' '/tmp/html_hDVnyw.html'" exceeded the timeout of 60 seconds. {"userId":1,"exception":"[object] (Symfony\\Component\\Process\\Exception\\ProcessTimedOutException(code: 0): The process \"'/var/www/invoiceninjav5/vendor/beganovich/snappdf/versions/932383-Linux_x64/chrome-linux/chrome' '--headless' '--disable-gpu' '--disable-translate' '--disable-extensions' '--disable-sync' '--disable-background-networking' '--disable-software-rasterizer' '--disable-default-apps' '--disable-dev-shm-usage' '--safebrowsing-disable-auto-update' '--run-all-compositor-stages-before-draw' '--no-first-run' '--no-margins' '--no-sandbox' '--print-to-pdf-no-header' '--hide-scrollbars' '--ignore-certificate-errors' '--print-to-pdf=/tmp/pdf_AN0fow.pdf' '/tmp/html_hDVnyw.html'\" exceeded the timeout of 60 seconds. at /var/www/invoiceninjav5/vendor/symfony/process/Process.php:1217)

"} `

What other info do you need?

The issue here is snappdf isn’t able to complete the PDF generation and is timing out.

I am running a similar environment without issue.

I would first ensure you have these dependencies installed:

Thanks for chiming in David. All dependencies for snappdf are installed and I re-installed snappdf with:sudo vendor/bin/snappdf download --force but it is not working just spinning icon.
Times out with 500 error:
[previous exception] [object] (League\\Flysystem\\FileNotFoundException(code: 0): File not found at path: uGtnq1hqhbJJr6XZUltjs1WQBAABDXWn/qgYi5m2Pj7aeCedgVq2u4NntjiLexhOZslkRNSy3/m1cFZWiihuE1B5S0oYVEaAfcWzUhKKm4ELtpxKVJ/invoices/0003.pdf at /var/www/invoiceninjav5/vendor/league/flysystem/src/Filesystem.php:390)

[2021-10-26 14:46:53] production.ERROR: File not found at path: uGtnq1hqhbJJr6XZUltjs1WQBAABDXWn/qgYi5m2Pj7aeCedgVq2u4NntjiLexhOZslkRNSy3/m1cFZWiihuE1B5S0oYVEaAfcWzUhKKm4ELtpxKVJ/invoices/0003.pdf {"exception":"[object] (Illuminate\\Contracts\\Filesystem\\FileNotFoundException(code: 0): File not found at path: uGtnq1hqhbJJr6XZUltjs1WQBAABDXWn/qgYi5m2Pj7aeCedgVq2u4NntjiLexhOZslkRNSy3/m1cFZWiihuE1B5S0oYVEaAfcWzUhKKm4ELtpxKVJ/invoices/0003.pdf at /var/www/invoiceninjav5/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php:159)

Sounds like its looking for a non-existent file in the storage dir. Have you copied the contents of the storage directory over to your new installation? Beware of ownerships/permissions.

OK. I have moved on to a new server using docker. Everything works now EXCEPT PDF generation. It is similar to this thread in that the env app_url and the docker .yaml url are somehow out of sync. Should I start a new topic?