Login Issues - Credentials do not match records

Problem: Unable to log in to Invoice Ninja (via browser) after being log offed for a day. Receive error message “These credentials do not match our records”. This is the third clean install I have done with the same result.

Setup Invoice Ninja in a Virtual Box VM using a TurnKeyLinux Invoice Ninja ova (TKL Invoice Ninja 16.1). This is runs Invoice Ninja v4.5.33 installed from zip on Debian10.8/ Buster…

After creating the vm I was able to successfully log in to Invoice Ninja from web browsers on multiple computers. I set up additional user accounts and was also able to connect with those. I was also able to create and email invoices (using PostFix).

After not logging in for a day I now find I am not able to log in at all. This includes the additional accounts I set up. This behavior happened in the previous two VMs. This third attempt I was very careful from the start and did nothing extraneous.

I am a plebe on *nix, but am comfortable using the command line and doing stuff. Not sure where to look, or what to look for though? If asking me to view a file, please provide me the full path to find it. I am still getting used to which folders hold what, and the find command sometimes takes a long while.

Thanks for any help.


I’m not sure, I’m not aware of anyone else reporting this problem.

You may want to try running this command to ensure the app can access the database.

php artisan tinker

ran it, but not sure what to do with it? I appears to be waiting for a response from me.

Ok, that means your database credentials are correct.

Is there a reason you’re using v4 instead of v5?

As stated in the original post, this is a TurnKeyLinux appliance. There latest appliance for Invoice Ninja uses v4.5.33 installed from zip on Debian10.8/ Buster.

The TKL appliances make it very easy to fire up a VM and use frameworks, apps, etc. Once I import the appliance, all I have to do is setup a few passwords and I am off and running. This lets me focus on what I am trying out, in this case Invoice Ninja.

As for the “php artisan tinker” command; what am I supposed to be doing with that? I still have the arrows/prompt awaiting for input it seems.

You may want to ask them if anyone else has reported the issue and if they’re planning to support v5.

You’re done with tinker, if you see the command line it means your database credentials are correct.

Okay, so read up a little on tinker and I was able to select from the users table. Never worked with Laravel before.

Is there a way to test, from the console, the database call and response when trying to log in. I am thinking something along the lines of
“SELECT * FROM USERS WHERE username=‘x’ AND password = ‘y’”
I am not sure how the password is hashed though, and don’t know how to hash it.

You can hash the password using tinker by running bcyrpt(‘password’);

How do I use that in tinker? I get an error message “1305 FUNCTION ninja.bcrypt does not exist”.

I tried this in tinker:
DB::select(“SELECT username, password, bcrypt(‘DAPASSWORD’) AS subpass FROM users WHERE username = ‘NAMELOOKINGFOR’;”)

bcrypt is a PHP function, not a SQL function. You need to run: bcyrpt(‘password’);

Is that the function that was used to store the original password values? I did a
DB::select(“SELECT username, password FROM users;”)

then I ran
run: bcrypt(‘password1’)
run: bcrypt(‘password2’)

The results from the bcrypt calls look nothing like passwords in the resultset from the SELECT.

EDIT: Is there a seed that is supposed to be used? I noticed each time bcrypt is run with the same input it provides different results.

I believe that is the command used to encrypt the password but I could be mistaken.

OK, I am going to keep playing. I was finally able to get the password reset to work and was able to login, but as soon as I logged out I was no longer able to log in again with the same credentials do not match error.

I appreciate your help and rapid responses. I learned a few things today that will be helpful to me in the future (e.g. tinker and running commands against the database).

Going to get some rest now and try and tackle this again tomorrow.

@ hillel

I am also having this issue.
I am using Invoice Ninja selfhost with shared hosting environment. All OK until last week.
Now I cannot log into Invoice Ninja system. I am 100% sure with email address and password. Even recover password link not receiving to email.

Is there any way I can modify files to reset the password in hosting account?

Appreciate your help on this matter.

You can run php artisan tinker then bcyrpt('new_password'); to generate a new password.