Login with username

Unfortunately there are sites everyone are logged out and no one can log back in. Not even the administrator.

Yes, and i am not able to reset the Administrator password from bench too. So no way to log in back. Is the team working on this?

Yes. I had raised a github issue and there is a comment saying they are investigating this issue.

1 Like

In my initial configuration “allow use of mobile number” was not checked:
Login user with username: Yes
Login user with email: Yes
Login Administrator: Yes

I have updated to 12.18 → 12.19:
Login user with username: No
Login user with email: Yes
Login Administrator: Yes

I have marked “allow to use mobile number”:
Login user with username: No
Login user with email: No
Login Administrator: No

I have updated Python 2.7.17 → 3.7
Login user with username: No
Login user with email: No
Login Administrator: No

I suggest we use the other thread to have all the information grouped together:

Hello frappe team,

**ERPNext:**  v12.19.0 (version-12)

**Frappe Framework:**  v12.16.1 (version-12)

Yes I can confirm, after updating to this version users cannot login to the system using username, while some can login using email but not all can login.
This also breaks Enable Password Policy as default to 2 level but even with strong password it says you need symbols and number which is weird bug.

Enable Password Policy
If enabled, the password strength will be enforced based on the Minimum Password Score value. A value of 2 being medium strong and 4 being very strong.

I will follow up on the github issue. Any timeline to push this in hotfix?

@rahy Please share the link of the github issue as I am not able to find it in bench and frappe repo.
Update: Found the issue It have a manual fix which doesnt seem to work either.

Update2: Only users with System Manager access are able to login

Thanks.

for me, i am on the develop branch and happened when i updated my v13-beta to develop. since i was logged as Administrator before updating, i was able to use it until i logged out. After that i was not able to log in again.

Since the following thread is already closed, I’m continuing here.

I’ve updated our server to the latest versions:
ERPNext: v12.19.0 (version-12)
Frappe Framework: v12.16.2 (version-12)

But the behavior is still the same. Login with the username still doesn’t work. Only when using the email address works (we don’t use the login with mobile number).

Our security settings:
Allow only one session per user
Allow Login using Mobile Number
Allow Login using User Name
Show Full Error and Allow Reporting of Issues to the Developer

Enable Password Policy is turned off.

The console log:

Traceback (most recent call last):
  File "/opt/bench/erpnext/apps/frappe/frappe/app.py", line 54, in application
    init_request(request)
  File "/opt/bench/erpnext/apps/frappe/frappe/app.py", line 125, in init_request
    frappe.local.http_request = frappe.auth.HTTPRequest()
  File "/opt/bench/erpnext/apps/frappe/frappe/auth.py", line 51, in __init__
    frappe.local.login_manager = LoginManager()
  File "/opt/bench/erpnext/apps/frappe/frappe/auth.py", line 105, in __init__
    if self.login()==False: return
  File "/opt/bench/erpnext/apps/frappe/frappe/auth.py", line 126, in login
    self.authenticate(user=user, pwd=pwd)
  File "/opt/bench/erpnext/apps/frappe/frappe/auth.py", line 216, in authenticate
    self.fail('Invalid login credentials')
  File "/opt/bench/erpnext/apps/frappe/frappe/auth.py", line 276, in fail
    raise frappe.AuthenticationError
frappe.exceptions.AuthenticationError
website.js:161:28

The latest Frappe Framework update: v12.16.2 (version-12) has fixed “Allow Login using Mobile Number” but not “Allow Login using User Name”

no it does not work for both of them
not mobile number or username

i have read the auth.py and found that they did major changes and did not mentioned the username on it or the mobile number, they are using a new technique which is caused that failure

From the Github issue:
https://github.com/frappe/frappe/pull/12637#issue-598007617

Thanks for bringing this up. We are looking into it and should be fixed by end of day. Thanks!

Hi @Bassam_Mamdouh ,

Login with username is not working currently but you can use Email ID to login. By checking system setting Allow Login using Mobile Number , you should be able to login using mobile number as well.

yes i know, but even login using mobile number does not work with me

Sorry for the inconvenience caused. Issue has been fixed with the recent release version 12.16.3.

Please update Frappe app to resolve this issue.

P.S: Issue is also fixed in develop branch

1 Like

It’s fixed in the latest release, thanks!

Thank You Leela and team Frappe , Kudos :clap:

Thanks for the quick fix and for your efforts.

Hey, I am only able to login with email ID. Can we login with username? Please confirm/ help. Thanks.

same here

Hi,

You will have to check these two boxes under System Settings> Security tab ---- Allow Login using Mobile Number and Allow Login using User Name.

Let me know if there is any difficulty.

Regards