After performing bench update
trying to login via LDAP results in freezing login window with constant Verifying...
message. Previous update was on May 31st (apparently Frappe v11.1.32).
Current version:
ERPNext: v11.1.46 (master)
Frappe Framework: v11.1.41 (master)
Before last update it was working fine.
Except that similar freeze was seen for one specific user.
UPDATE
Frappe stack trace on LDAP login attempt:
Request Error
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 61, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1036, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py", line 206, in login
user = ldap.authenticate(frappe.as_unicode(args.usr), frappe.as_unicode(args.pwd))
File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py", line 172, in authenticate
return self.create_or_update_user(self.convert_ldap_entry_to_dict(user), groups=groups)
File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py", line 123, in create_or_update_user
self.sync_roles(user, groups)
File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py", line 89, in sync_roles
lower_groups = [g.lower() for g in additional_groups]
TypeError: 'NoneType' object is not iterable
[ERROR] 2019-07-12 15:51:19,926 | /home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py:
Could not take error snapshot: startswith first arg must be str or a tuple of str, not bytes
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 61, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1036, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py", line 206, in login
user = ldap.authenticate(frappe.as_unicode(args.usr), frappe.as_unicode(args.pwd))
File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py", line 172, in authenticate
return self.create_or_update_user(self.convert_ldap_entry_to_dict(user), groups=groups)
File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py", line 123, in create_or_update_user
self.sync_roles(user, groups)
File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings/ldap_settings.py", line 89, in sync_roles
lower_groups = [g.lower() for g in additional_groups]
TypeError: 'NoneType' object is not iterable
BUG
additional_groups
is not tested for being None befor being iterated. See here: