Best Way to migrate to V5

No problem, i hope we get the invoice template set to the same as v4 as well.

1 Like

I did another migration from 4.5.26 to 5.0.43, but it breaks the default admin accounts login.

did php artisan migrate:fresh --seed

and started the v5 configuration from scratch, and did another migrate. Also break the default admin account and i cannot login to the v5 installation any more.

@david
I did another migration and now PDF is not working agian, i am on the 5.0.43 version and i have the following:

In browser console, i get the follwowing error:

cannot load the resource and give me this path:

http://in5.ghf.loc/client/invoice/npqdetwytsds5jkuxujb6d1v8giqqca1/download_pdf

but in the laravel.log, i get the following error:

[2021-01-07 03:54:34] production.ERROR: The file “/var/www/html/ninja5/public/storage/1w7yqbxctnznmz98dbqfz4impkxldkf5/yVZZrYYy5GyaO3be2gc3HQf4ceDnge8xFoKObzlP/invoices/INV-2021-01.pdf” does not exist {“exception”:"[object] (Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException(code: 0): The file “/var/www/html/ninja5/public/storage/1w7yqbxctnznmz98dbqfz4impkxldkf5/yVZZrYYy5GyaO3be2gc3HQf4ceDnge8xFoKObzlP/invoices/INV-2021-01.pdf” does not exist at /var/www/html/ninja5/vendor/symfony/http-foundation/File/File.php:36)
[stacktrace]

can you give us more context? are you able to view the PDF the application?

I get the following

500: Internal Server Error

and what is the reported error in laravel.log

i get the following error:

[2021-01-07 03:54:34] production.ERROR: The file “/var/www/html/ninja5/public/storage/1w7yqbxctnznmz98dbqfz4impkxldkf5/yVZZrYYy5GyaO3be2gc3HQf4ceDnge8xFoKObzlP/invoices/INV-2021-01.pdf” does not exist {“exception”:"[object] (Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException(code: 0): The file “/var/www/html/ninja5/public/storage/1w7yqbxctnznmz98dbqfz4impkxldkf5/yVZZrYYy5GyaO3be2gc3HQf4ceDnge8xFoKObzlP/invoices/INV-2021-01.pdf” does not exist at /var/www/html/ninja5/vendor/symfony/http-foundation/File/File.php:36)
[stacktrace]

i checked the permissions and public/storage is writable by www-data

ok just to confirm are you trying to access a migrated invoice PDF?

yes, it is a migrated invoice.

So my guess is that the PDF generation hasn’t kicked off. To test the theory can you edit the invoice, and then make a small change, perhaps place a word in the Public Notes section, click Save, and then click View PDF.

didn’t make any difference. Still getting the same error.
I cannot find any additional folders after this path:

/var/www/html/ninja5/public/storage/1w7yqbxctnznmz98dbqfz4impkxldkf5

i cannot find this

VZZrYYy5GyaO3be2gc3HQf4ceDnge8xFoKObzlP/invoices/INV-2021-01.pdf from the error in laravale.log

@gerootech

I am stumped on this. i just did a test migration and was able to get PDFs of the migrated data. I am not sure why you are seeing this.

Perhaps restarting the queue with php artisan queue:restart may help.

didn’t work, but it is fixed after i did composer install --no-dev.

seems > vendor/bin/snappdf was not working or not installed. now it is working.

Great! Happy you got it running! :tada:

Hello @david and @hillel

The latest migration i did, migrated all the quotes but status was not set correctly. The migrated quotes status are all set to draft.

@gerootech i’ll check this out, thanks for reporting.

Hi David,

still have the quotes issue, not sure when it is planned to get fixed, or if it is something on my side.

second issue started to happen all of a sudden my logo in the pdf invoices not being displayed at all now. Instead i get a missing picture icon like this picture.logo Invoice Ninja

The logo is being displayed in my company with no issues, it is only when i try to generate the pdf invoice.

When i remove my logo, the invoice ninja default logo is being displayed with no issues.

I am on the latest 5.1.11 version

This one should be fairly easy to solve. In one of the upgrades we changed the way we present the company logo… The solution is to just reupload your logo and that should be it!

I did this already but didn’t fix it for me. tried with incognito mode as well but still not working. No errors in laravel log as well.

@gerootech

Does the invoice PDF update at all for you? I am seeing a related issue where Invoice PDFs are not updating when being editted.