Can't update by file overwrite


I can’t update IN installation.

I have the version v5.1.16. It was working fine till one day the recurring invoices and reminders just stopped working out of the blue. Otherwise, I would not care about updating whatsoever. This update is an attempt to get a working system again.

I have tried the update button but it does nothing. Then the only option left is to update the files, right?

So far I have tried to download the release file from the link below and replace the files.

I basically download, unzip and replace the files to my installation directory, making sure the file .env is the same.
Then I change the ownership of everything to www-data:www-data.

When I access the system I get a 500 Server error message. I see no other message to debug the install.

What can I do to update the IN instalation?

Thank you.

Are there any details about the error in storage/logs/

There is a file there called Lavral.log It is too big to copy and paste here.

Bu the first few lines are:
[2021-05-12 01:21:55] production.INFO: latest version = 5.1.61
[2021-05-12 01:21:55] production.INFO: latest version = 5.1.61
[2021-05-12 01:25:01] production.INFO: latest version = 5.1.61
[2021-05-12 01:30:02] production.INFO: latest version = 5.1.61
[2021-05-12 01:35:01] production.INFO: latest version = 5.1.61
[2021-05-12 01:40:01] production.INFO: latest version = 5.1.61
[2021-05-12 01:45:01] production.INFO: latest version = 5.1.61
[2021-05-12 01:50:02] production.INFO: latest version = 5.1.61
[2021-05-12 01:55:02] production.INFO: latest version = 5.1.61

And the last few lines are:
#10 /var/www/souzahub/vendor/symfony/console/Command/Command.php(256): Illuminate\Console\Command->execute()
#11 /var/www/souzahub/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#12 /var/www/souzahub/vendor/symfony/console/Application.php(971): Illuminate\Console\Command->run()
#13 /var/www/souzahub/vendor/symfony/console/Application.php(290): Symfony\Component\Console\Application->doRunCommand()
#14 /var/www/souzahub/vendor/symfony/console/Application.php(166): Symfony\Component\Console\Application->doRun()
#15 /var/www/souzahub/vendor/laravel/framework/src/Illuminate/Console/Application.php(92): Symfony\Component\Console\Application->run()
#16 /var/www/souzahub/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run()
#17 /var/www/souzahub/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#18 {main}

Also, when I try to run “php artisan” in the command line I get

In Container.php line 1064:

Unresolvable dependency resolving [Parameter #0 [ array $options ]] in class App\Utils\CssInlinerPlugin

What do do? The version 5.1.61 runs(with a few problems). I am trying to upgrade to v5.2.14

To update from data files themselves, you need to backup and reinstall, it’s very easy.

Backup the ‘.env’ file from your InvoiceNinja directory, because this file holds encryption key for the SQL data. Then backup the public/storage directory, which holds invoice and client attachments in folder structure the database can recognize.

Then completely remove all files from the InvoiceNinja directory, reinstall the latest version, and instead of running any setup from the browser, you just copy back in the .env file and the public/storage directory, and access your data again.

What distro are you running to host with, and what package are you downloading to install with?

Sorry for the big gap between posts.
I am using Debian and I was trying to replace the v5.1.16 to the v5.2.14.
Any further recommendations based on this?

Are you using, or

And are you removing ALL the old contents of the directory before reinstalling latest version from scratch, then pasting in only the .env file, and the public/storage folder?


Thank you for your answer, and again sorry for the gap between replies.

Unfortunately, it didn’t work. Just to be clear, I attempted to install the new version on top of the old database.

Any other ideas of what to do?

Thank you.

Get an old working version running, export your records in, and start over clean on an updated version, and import the records.

Do not delete your old database, just make a new one for the updated version, and attempt to import from there. I think it only exports a .JSON file in v5. But at the very least it should be more successful that way because it handles records differently.

Also, you shouldn’t just be replacing files, you should be deleting everything that was once there and starting fresh with the new package. You want to preserve public/storage, and .env, but the rest should be deleted. If you didn’t do that, it could be your mistake.

Just a follow up to update what I did.

I had a version v5 early release which was updated by the auto update at some point. The updated version (now very old), was broken and I couldn’t change anything in the settings. Let alone to export data.

My solution was to:
-Make a clean install and only keep the .env file (selectively).
-Export the old database, table by table.
-Import the each table, performing an alter table on the tables that has a different schema of the original.

Bottom line. The whole problem was that the database schema was different, making the 3 different versions (All invoice ninja 5) incompatible between them each other.

I am now on version v5.3.66-c66 and generally I am almost happy about it. I have just discovered a problem emailing the invoices. But that is talk to another thread. :slight_smile: