Error during login, after updating to 5.2.41

I started posting this on Github issues. But will paste it here instead. I’m not really sure what the preferred approach is to reporting issues like this? In the forum or on Github?

I’ve posted this to Github, here. As it may need to be addressed as a bug. Not sure.

What version of Invoice Ninja are you running? ie v4.5.25 / v5.0.30

Was updating from whatever latest develop branch version was around mid December. Around v5.0.34, from what I recall.

**What environment are you running?
VM running Ubuntu 20.04

Have you checked log files (storage/logs/) Please provide redacted output

Have you searched existing issues?

Have you reported this to Slack/forum before posting?

Describe the bug
After doing the update, Ninja logged me out. Upon logging back in, I get the following error within the login panel.

Error :: '[{id: 4, capital: Kabul, citizenship: Afghan, country_code: 004, currency: af...' to 'minified:x<minified:iW>' failed due to: Deserializing '[id, 4, capital, Kabul, citizenship, Afghan, country_code, 004, currency, afg...' to 'minified:iW' failed due to: Tried to construct class "CountryEntity" with null field "thousandSeparator". This is forbidden; to allow it, mark "thousandSeparator" with @nullable.

And it won’t allow me to log in.

Steps To Reproduce
git pull 5.0.41 onto a 5.0.34 (aprox) installation, and try to log in.

Expected behavior
I was expecting it to log in.


The preferred approach is to only post an issue in one place, it’s the same group of people responding everywhere…

It may help to add ?clear_cache=true to the URL

Hey there.

We check both, forum & Github daily, so post to either will be enough.

When it comes to issue, make sure there isn’t any migrations left:

php artisan migrate

… and like Hillel said, clear the cache :+1:

Thanks. Doing and the php artisan migrate has done the trick. I suspect the migrate was for sure required, as I can see it outputted 2020_12_23_220648_remove_null_values_in_countries_table which seems related to the error I encounted.

1 Like

By the way … is it advisable to run this command after a git pull as a matter of course? I gather there’s no possible harm in doing so, right?

You can always check if they’re any migrations left by running:
php artisan migrate:status

If so, run:
php artisan migrate

Yes, they’re safe, unless you pass --force or fresh. :+1: