matrix-org / matrix-synapse-ldap3

An LDAP3 auth provider for Synapse
Apache License 2.0
128 stars 46 forks source link

pyasn1==0.4.5 incompatibility with synapse 1.11.0 (solved by upgrading to pyasn1==0.4.8) #87

Closed Klodd closed 4 years ago

Klodd commented 4 years ago

Description

matrix-synapse service fails to restart after upgrade of synapse to 1.11.0 (1.11.0~ynh1)

Steps to reproduce

I'm using yunohost but I don't think it should be specific.

Version information

Resolution

pyasn 0.4.5 is incompatible and the culprit here.

pip install --upgrade pyasn1 pulls 0.4.8 and everything runs smoothly.

clokep commented 4 years ago

This looks like the ldap3 package is expecting a newer version of pyasn1, not Synapse directly. Could you provide the output of pip freeze in that virtualenv? I tried downgrading pyasn1 quickly and had no issues.

Klodd commented 4 years ago

Here you go:

user@server:~$ source /opt/yunohost/matrix-synapse/bin/activate
(new) user@server:~$ pip freeze
asn1crypto==0.24.0
attrs==19.1.0
Automat==0.7.0
bcrypt==3.1.6
bleach==3.1.0
canonicaljson==1.1.4
certifi==2019.3.9
cffi==1.14.0
chardet==3.0.4
constantly==15.1.0
cryptography==2.6.1
daemonize==2.5.0
frozendict==1.2
hyperlink==18.0.0
idna==2.8
importlib-metadata==1.6.0
incremental==17.5.0
Jinja2==2.11.2
jsonschema==3.0.1
ldap3==2.7
lxml==4.5.0
MarkupSafe==1.1.1
matrix-synapse==1.11.0
matrix-synapse-ldap3==0.1.4
msgpack==0.6.1
ndg-httpsclient==0.5.1
netaddr==0.7.19
phonenumbers==8.10.7
Pillow==5.4.1
pkg-resources==0.0.0
prometheus-client==0.3.1
psutil==5.6.1
psycopg2==2.8.5
pyasn1==0.4.8
pyasn1-modules==0.2.4
pycparser==2.19
PyHamcrest==1.9.0
pymacaroons==0.13.0
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyrsistent==0.14.11
PyYAML==5.1
requests==2.21.0
service-identity==18.1.0
signedjson==1.1.1
simplejson==3.16.0
six==1.12.0
sortedcontainers==2.1.0
treq==18.6.0
Twisted==18.9.0
typing-extensions==3.7.4.2
unpaddedbase64==1.1.0
urllib3==1.24.1
webencodings==0.5.1
zipp==1.2.0
zope.interface==4.6.0
clokep commented 4 years ago

This seems to be an issue with the ldap3 package that Synapse is using, see cannatag/ldap3#802.

babolivier commented 4 years ago

Right, I've transferred this issue to the matrix-synapse-ldap3 repo since it's the one being affected, and we'll close it once the upstream bug is fixed.

richvdh commented 4 years ago

Frustratingly, cannatag/ldap3#802 has been closed without being merged. See also : cannatag/ldap3#794.

babolivier commented 4 years ago

Upstream has been fixed as of https://github.com/cannatag/ldap3/releases/tag/v2.8, I've opened https://github.com/matrix-org/matrix-synapse-ldap3/pull/99 to make sure we include this patch.