Redirecting on Login

For some, but not all users, when you go to the account login page and enter your username and password you see the link in the top left saying you’re being redirected to the dashboard, but it sends you back to the login page (the user/pass is correct, so no message).

By way of background the version is 4.2.2. This problem surfaced when the hosting company got rid of cpanel and softaculous, which we utilized. Now the “app” (IN) is listed as running laravel 5.3.31. There are no errors in the laravel log. Again, this doesn’t happen for every user. It’ll happen for an admin user sometimes and sometimes for a user that isn’t admin but has other permissions. But once it happens that user account can’t login going forward.

I appreciate any help. Thanks.


Does it help if they clear their browser cookies?

Hi Hillel:

No. It doesn’t help to clear cookies.


Sorry, I’m not sure. You may want to try updating to the latest version to see if it helps.

In trying and retrying with a particular user, it finally logged in successfully. It also showed a message:

Validation token was expired. Please try again.

Does that help?

Can you explain what circumstances may generate that message?


Are you using the latest version of the app?

Ok. We’ll move to v4.5.31 because that’s what Softaculous has on the new host. So, if I install the new version code, what would be next? Do I just need to use mysqldump on the old server, copy that to the new server, restore, then configure the new database in Invoice Ninja?


We advise using mysqldump to copy the data, you also need to copy over the .env file and logo/documents.

Before moving the app you may want to check if this line is correct, it may be related to the problem.

Ok. We checked that line and it is correct, We moved the app and database and updated. All looked well until we tried an invoice. We set up a new invoice and clicked the “Save Draft” button. Nothing happens. No draft saved, no error message. Turning on the browser inspect I see:

Empty string passed to getElementById(). 4 FormAutofillHeuristics.jsm:403:22

Uncaught TypeError: t is undefined

firstJSONError script.js:1190

handleSaveFailed create:3835

onFormSubmit create:3825

jQuery 4

Laravel error log shows:

[2021-02-06 01:50:39] production.ERROR: TypeError: t is undefined {“context”:“JavaScript”,“user_id”:1,“account_id”:“1”,“user_name”:“Admin Support”,“method”:“GET”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”,“locale”:“en”,“ip”:“”,“count”:5,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“log_error”} []

Any ideas?

Many Thanks

I’m not sure, did the app work before the import?

It worked such that we could log in, set up a new client, then, while trying to test everything out, ran into the “Save Draft” invoice issue.

Could we install the latest IN version then copy over the database, logos/docs from the original install? Then, having done that, If we were to run /update will that bring the old database copy up to the current version level?


Did you see the error before or after copying your data from the SaaS app?

I don’t see why that wouldn’t work…

After copying data…

Hmm… I assume then it’s some data or setting which is causing the problem.

You may want to try updating to v5