500: Server Error after updating from v5.3.71-W85 to v5.4.4

I have been on v5.3.71-W85 for quite sometime now and I have had issued with updates in the past so I figured I would wait for a while before upgrading to ensure that the updates are a bit more stable.

However, my production instance ran into trouble once again today when I upgraded from v5.3.71-W85 to v5.4.4 (through the prompt in the app), after which the app stopped working or responding, so I closed it and reopened it and it just kept loading. I then opened a web browser and visited the site and logged in. As soon as I hit enter, I see the “500: Server Error” error, as seen below:

Hi,

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

Hi hillel,
Thanks for the super fast response!
I’m afraid there are only two files in the logs folder, being .gitignore and laravel.log, and on inspecting laravel.log, the only two lines pertaining to today’s date (date of update) are:
[2022-06-20 00:00:04] production.INFO: updating currencies
[2022-06-20 06:00:03] production.INFO: Performing Autobilling 2022-06-20 06:00:03

Are there any errors in the web server error logs?

@david do you have any thoughts?

@sebinmichael

You may need to turn on debug mode, in the .env file set

APP_DEBUG="true"

And then run

php artisan optimize

When you attempt to log in again, the log file should populate the exact error.

Have the same problem.
With debug set to true, the login page now displays the following error below the Secret (Optional) field:

500: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘ninja.purchase_orders’ doesn’t exist (SQL: select * from purchase_orders where purchase_orders.company_id in (2) and created_at >= 1970-01-01 00:00:00)

The laravel.log doesn’t show anything additional to “Updating currencies” and “Performing Autobilling”

@shunpin

How did you attempt the upgrade? It sounds like the migrations have not run, you can either run

php artisan migrate

from the command line, or try

/update?secret=secret

in the browser.

1 Like

I wrote a little update bash script a while back that basically replaces all the files with new ones and then just runs php artisan optimize, which worked up to this point.
Wasn’t aware of the migrate command, which I’ve now added to my script.

It’s all fixed now, thanks a lot :slight_smile: