`500: No Company Found / 500: Server Error` at login

Not exactly sure where to begin here - White-labeled docker install

Basically, from the computer I initially used to set up invoice-ninja, I can login without any issue, however, from any other computer/browser (or even incognito on the same computer) it doesn’t work and does a 500: No Company Found when logging in.

I just recently updated to v5.2.14-C56 and it made no difference whatsoever besides the fact that before the upgrade the error message was different: 500: Server Error (or something like that).

I’m afraid to lose that magic thing on this specific browser that allows me to log in :confused:

Looking at the app logs, there is nothing else than ““POST /index.php” 500” when the error occurs, even though I have set APP_DEBUG=true

@david do you have any thoughts?

@jsenecal

Which browser are you using that works, and do you have any browser extensions installed?

My only thoughts here is that if you are running your docker install behind a proxy, the proxy is probably not sending the headers to the invoice ninja installation, this is the only way I can think of to be seeing that kind of error on login.

My browser of choice is google Chrome, either on Windows or Linux, using the same extension set as they are synced.

The one that works is my usual Google chrome on my Linux laptop. Opening an incognito tab on the same browser breaks it…

Invoice ninja runs behind traefik reverse proxy and always has been when I was running V4. Actually, now that I think about it, this issue started occuring right after I upgraded. I didn’t notice right away because I do billable work mostly on my Linux laptop anyways so I just stayed logged in and never had to login again since ( many weeks ago ).

Let me know if I can provide any additional information that could help figuring out what the issue is.

Guys, I still havent fixed my issue - Any pointers to get me in the right direction ?

@david / @hillel just upgraded to the latest available docker image, now instead of 500: No Company Found I get 500: Server Error

Tried many other things, like php artisan optimize and php artisan ninja:check-data or php artisan ninja:check-db with EXPANDED_LOGGING=true in the environment file, to no avail. (nothing shows up in the storage/logs/invoiceninja.log file regarding the 500 error.)

At this point I’m totally lost and I would like to know if this isn’t the proper way to ask for help, what would that be ? Or what else should I enable to allow myself to troubleshoot, if only there was an error message somewhere, at least I could start looking for a way to fix it :frowning:

The only thing i can suggest is to have a look at this thread for setting up the docker instance behind traefik

@david my traefik configuration is more or less the same as what was suggested. So I don’t think the issue lies there.

Why is there no trace of any references to that error inside any of the log files I can’t even find the error message string in the source code :joy:? It just logs the 500, without any details whatsoever :frowning:

Hey there, thought I should let you guys know that I figured it out.

Turns out that the MFA setup (One-time-password) was the issue and didn’t work properly after upgrading - The solution was to disable MFA and enable it again.

I never actually managed to get any logs whatsoever from the installation, sadly, but after a lot of tests i stumbled accross that solution.

1 Like

Good work Jsenecal! As a network / systems engineer of 15years, and an I-Ninja user of ±5y, I’m terrified to upgrade to v5 due to similar issues. Sadly on v4 (cloud hosted with I-ninja) I’ve started being randomly logged out at random… Sometimes it happens while I am busy invoicing and sometimes I don’t get logged out if I leave my machine on for 10+ hours.

1 Like

I’m also running into constant 500 errors on a fresh install, its also eating a lot of memory when trying to load the pages