Internal server 500 after running upgrade 😱

Hi @david and @hillel :smiley:

So I just ran the upgrade on our server which ran fie without any error messages. But once the update was finalized and the browser reloads it then received the 500 error.

As the first thing i did was to run the artisan optimize and migrate commands, but they both fails.


-AND-

Here is the part of the error log for today/update:
https://pastebin.com/BGkBg0LG

So do you guys have any idea what is going on and how to fix this?

Thanks a bunch in advance.
Kind regards
AngryWarrior

Hi,

It should help to copy over the latest zip

https://github.com/invoiceninja/invoiceninja/releases/download/v5.3.79/invoiceninja.zip

Hi @hillel
thanks for your reply.

What do you mean with that?
Like extract the zip file directly over the installed files in the www directory, (overwrite the old files)?

Or how would you go about?

I did a rollback on the server so I’m back on the older version so at least it is working again.:
image
Thanks in advance.
Kind regards
AngryWarrior.

Yes, that is correct. You may want to make a backup first.

Alternatively you can setup a new install of the app and then copy over the database and .env file.

Right thanks. :+1:
Any idea of what went wrong or why though?
Is the automatic updater bugged or something?

Kind regards
AngryWarrior.

@david any thoughts?

@AngryWarrior

I think there a few threads covering this. Some systems didn’t run composer install after pulling in the new files, this meant their systems were inoperable.

From 5.3.78 onwards we have changed the auto updater to pull in the entire package which will prevent this from being an issue.

1 Like

Right.
Thanks for the reply @david

The auto installer has always worked before which is why I was quite surprised when it failed.
Is there something I can do to prevent this and then run the auto installer again or is the best option to use the full zip file and you extract it over the old files?

Kind regards
AngryWarrior.

@AngryWarrior

The reason why the updater has fallen over this particular time is that we updated some dependencies which exposed this issue.

If you are on 5.3.78, you now have the new version of the updater onboard so we shouldn’t see this particular issue again.

The alternative to using the updater is to use the full size invoiceninja.zip file and use this to overwrite your existing files.

Well I’m on the version on my screenshot:
image
so version 5.3.66.

Thank you @david

Kind regards
AngryWarrior

Hi @david

So I uploaded and extracted the invoiceninja.zip over the older files as you recommended to upgrade manually from v.5.3.66 to v.5.3.78.

After that it throws a 500 error again. So after that I did attempt to run the artisan optimize and migrate commands to finalize the upgrade. But then the system pukes again with this error.
image

So what do I do now?

Kind regards
AngryWarrior.

Delete the contents of bootstrap/cache

that should resolve it.

1 Like

Thanks David :smiley:

I’ll try that and see what happens.

Kind regards
AngryWarrior.

Thanks a bunch you’re a rock star mate @david :facepunch:

That solved it.

Kind regards
AngryWarrior.

WOW…That fixed mine as well…

1 Like

Awesome sauce! :smiley:

Kind regards
AngryWarrior.

@david @hillel @AngryWarrior
For some reason I have to keep clearing the cache because if it sits for a while and I try to log back into the web interface, I get a 400 error not found. Once I clear the bootstrap cache and refresh the page, voila…

Have you tried the above as suggested in this forum thread with over writing the old files with a new set of Invoice ninja and then clear that directory @bggunnz ?
Remember that you need to run the artisan optimize and migrate commands also after you refreshed the files too.

Kind regards
AngryWarrior.

I had the same issue and Ive been running an extra step post upgrades which include:

sudo php artisan migrate
sudo php artisan optimize:clear

These are helping and my 400 errors after a period of time have stopped happening. I’m still monitoring if it continues to not but so far so good.

1 Like

As an updated: it work for a bit using my method but the next day the 400 error came back. Running the commands again fixes it but it continues to be a issue everyday with the 400 error as of this post.