After Update from 5.3.10 to 5.3.15 I get 500:Server error on login

Greetings,
we’re running Invoice Ninja 5.3 on a virtual Debian server, Stretch 9.13, with latest updates/patches, PHP 7.4, MariaDB. Invoice Ninja 5.3.10 was running flawlessly until I updated to 5.3.15 today. Since then I get 500: Server Error on Login. There is no error in Apache2’s error log, nothing in laravel.log, but Google Chrome’s Console shows exceptions even when I tab between email and password fields.
Clicking on login comes 500: Server Error on Login and the errors in the js (main.foss.dart.js?v=5.3.15:73970; iL:function(a,b){return a.send(b)},), see at the snapshot.

I chowned the permissions for www-data again, executed php artisan optimize, chowned permissions again, nothing works… Any idea?

laravel.log
[2021-09-12 00:00:03] production.INFO: latest version = 5.3.9
[2021-09-12 00:30:02] production.INFO: Performing Autobilling 2021-09-12 12:30:02
[2021-09-13 00:00:02] production.INFO: latest version = 5.3.10
[2021-09-13 00:00:03] production.INFO: updating currencies
[2021-09-13 00:00:04] production.INFO: latest version = 5.3.10
[2021-09-13 00:30:01] production.INFO: Performing Autobilling 2021-09-13 12:30:01
[2021-09-14 00:00:02] production.INFO: latest version = 5.3.10
[2021-09-14 00:00:03] production.INFO: updating currencies
[2021-09-14 00:00:03] production.INFO: latest version = 5.3.10
[2021-09-14 00:30:01] production.INFO: Performing Autobilling 2021-09-14 12:30:01
[2021-09-15 00:00:02] production.INFO: latest version = 5.3.10
[2021-09-15 00:00:02] production.INFO: updating currencies
[2021-09-15 00:00:03] production.INFO: latest version = 5.3.10
[2021-09-15 00:30:02] production.INFO: Performing Autobilling 2021-09-15 12:30:02
[2021-09-16 00:00:02] production.INFO: latest version = 5.3.10
[2021-09-16 00:00:03] production.INFO: updating currencies
[2021-09-16 00:00:03] production.INFO: latest version = 5.3.10
[2021-09-16 00:30:02] production.INFO: Performing Autobilling 2021-09-16 12:30:02
[2021-09-17 00:00:02] production.INFO: latest version = 5.3.10
[2021-09-17 00:00:03] production.INFO: updating currencies
[2021-09-17 00:00:04] production.INFO: latest version = 5.3.10
[2021-09-17 00:30:01] production.INFO: Performing Autobilling 2021-09-17 12:30:01

1 Like

@david do you have any suggestions?

I had the same,
so I run:
/update?secret=
artisan optimize
artisan migrate --force
not sure which one helped but it was fixed

4 Likes

hey! Your last command “php artisan migrate --force” did the trick! I’m in! Thank you very much!!!

2 Likes

I had the same problem going from 10-15.
I just reverted to a snapshot to fix.

Should I wait till the upgrade is fixed or just try the artisan migrate --force command?

@xtekrepair, it’s up to you. I had to issue an urgent invoice, so I was very very glad and I am still thankful to @paganini for his solution.

Also having the same issue, but when my host ran the same command, they ran into an error (below) - any ideas?

In 2021_09_08_115919_update_designs.php line 5:
Cannot declare class UpdateDesigns, because the name is already in use

@BBComputing, have you tried all the commands from @paganini 's post?

I tried all the commands from @paganini and I still get the same error as @BBComputing on the artisan migrate --force command.

Still getting the 500 server error when attempting to log in after trying these commands.

Had to revert back to 5.3.13 for now as 5.3.14 gives the same error too.

Hello,
I have the same issue with Error500 after update to 5.3.15. I had to rollback to 5.3.10.
How can I run the command artisan migrate --force on a shared hosting without ssh access? Is there a preconfigured route?

@Dirles

Yes, run /update?secret=

Thanks. I did run /update?secret= without any result. Still Error500

@SchiffersHaar yes, my host ran all of the commands. I also just tried downloading a fresh copy of the files and uploading, still didn’t fix it… currently entirely broken.

Updated from 5.3.9 to 5.3.15 and also got an error after the update, after completing the “sudo -u www-data php artisan optimize

Debug was turned on and got the following message after update, at first log in

Selection_309

The entire log message:
500: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘invoiceninja.recurring_expenses’ doesn’t exist (SQL: select * from recurring_expenses where recurring_expenses.company_id = 1 and recurring_expenses.company_id is not null)

Was able to correct the issue by running the modified command “sudo -u www-data php artisan migrate --force

For reference, my production and test environment is Debian 10 server, PHP 8.0.10, MariaDB (current update), Apache 2 (current update)

The system now shows 5.3.16, not sure if this is the correct version number being displayed, logs show 5.3.15 is the current release ( at invoiceninja/storage/logs/laravel.log)

Selection_312

Running php artisan migrate may help.

Note: always good to make a database backup first.

cc @david

I turned on the debug feature and see this:

500: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bbcomputing_invnin.recurring_expenses' doesn't exist (SQL: select * from `recurring_expenses` where `recurring_expenses`.`company_id` = 1 and `recurring_expenses`.`company_id` is not null)

I’m unable to get the update to work either (500 server error).

Other steps? Currently still dead in the water.

Thanks a lot @paganini, that’s what fixed it for me!

Here is what I got in my terminal after running the command if that may help troubleshoot the issue further:

php artisan migrate --force

Migrating: 2021_08_14_054458_square_payment_driver
Migrated: 2021_08_14_054458_square_payment_driver (14.76ms)
Migrating: 2021_08_23_101529_recurring_expenses_schema
Migrated: 2021_08_23_101529_recurring_expenses_schema (355.92ms)

Now I can finally get back to work after sweating a little bit :sweat_smile:

For what it’s worth, I encountered a similar issue when I upgraded from 5.1.0 to 5.1.6. Manually running php artisan migrate as suggested above (but without --force in my case) worked.

worked for me too…smh…this thing is NOT STABE AT ALL…just glancing through invoice design causes error 500 and you cant safe any invoice or view in pdf format…

@Kwaku_Ananse

It sounds like your issues are due to PhantomJS. Have you added your own API key for PhantomJS?