Hello,
After upgrade to 11.1.42, the ldap connexion is not functionnal.(no problem with the previous version)
Softwares version
frappe@srv-web02:~/frappe-bench$ ./env/bin/pip3 list | grep ldap
Server Linux Debian Buster
ldap3 2.5.1
python3-ldap 0.9.8.4
ERPNext: v11.1.42 (master)
Frappe Framework: v11.1.37 (master)
frappe@srv-web02:~/frappe-bench$ python --version
Python 2.7.16
Ldap settings
Url du serveur LDAP : ldaps://dc1.domain.fr
“Distinguished Name” (DN) de base : cn=administrator,cn=users,dc=domain,dc=fr
Mot de passe pour la base DN : *************
Organizational Unit for Users : ou=domain,dc=domain,dc=fr
Champ Prénom LDAP : givenName
Default Role on Creation : Employee
LDAP Middle Name Field :
Chaine de recherche LDAP : userPrincipalName={0}
LDAP Last Name Field :
Champ Email LDAP : mail
LDAP Phone Field :
Champ Nom d’utilisateur LDAP : userPrincipalName
LDAP Mobile Field
SSL/TLS Mode : Off
Path to private Key File :
Require Trusted Certificate : Non
Path to Server Certificate :
Path to CA Certs File :
LDAP Group Field :
Logs frappe.log :
[ERROR] 2019-07-01 14:48:41,318 | /home/frappe/frappe-bench/apps/frappe/frappe/app.py:
Site: erp.domain.fr
Form Dict: {
“cmd”: “frappe.integrations.doctype.ldap_settings.ldap_settings.login”,
“device”: “desktop”,
“pwd”: “*********”,
“usr”: “lastname@domain.fr”
}
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 200, 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 166, 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 120, 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 88, in sync_roles
lower_groups = [g.lower() for g in additional_groups]
TypeError: ‘NoneType’ object is not iterable
[ERROR] 2019-07-01 14:48:41,322 | /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 200, 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 166, 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 120, 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 88, in sync_roles
lower_groups = [g.lower() for g in additional_groups]
TypeError: ‘NoneType’ object is not iterable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py”, line 36, in make_error_snapshot
snapshot = get_snapshot(exception)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py”, line 131, in get_snapshot
# render multilingual string properly
TypeError: startswith first arg must be str or a tuple of str, not bytes
[DEBUG] 2019-07-01 14:48:42,154 | /home/frappe/frappe-bench/apps/frappe/frappe/utils/scheduler.py:
Thank you