Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In Synapse 1.57.0 Docker image: module 'ldap_auth_provider' has no attribute 'LdapAuthProviderModule' #162

Closed
nmattela opened this issue Apr 20, 2022 · 2 comments · Fixed by matrix-org/synapse#12512
Assignees
Labels

Comments

@nmattela
Copy link

Describe the bug
Using module ldap_auth_provider.LdapAuthProviderModule (as suggested by the README) in a Docker installation of Matrix Synapse using Docker image v1.57.0 causes an error:

AttributeError: module 'ldap_auth_provider' has no attribute 'LdapAuthProviderModule'

This error did not show up on Docker image v1.56.0 and earlier, but started to show up in v1.57.0. Downgrading to v1.56.0 fixes the issue.

To Reproduce
Steps to reproduce the behavior:

  1. Use module: "ldap_auth_provider.LdapAuthProviderModule" in your Synapse homeserver
  2. Run Synapse

Expected behavior
Synapse should run

Synapse Installed on:

  • OS: Using the Synapse Docker image
  • Version: v1.57.0

Additional context
Full error:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.9/site-packages/synapse/app/homeserver.py", line 460, in <module>
    main()
  File "/usr/local/lib/python3.9/site-packages/synapse/app/homeserver.py", line 450, in main
    hs = setup(sys.argv[1:])
  File "/usr/local/lib/python3.9/site-packages/synapse/app/homeserver.py", line 326, in setup
    config = HomeServerConfig.load_or_generate_config(
  File "/usr/local/lib/python3.9/site-packages/synapse/config/_base.py", line 697, in load_or_generate_config
    obj.parse_config_dict(
  File "/usr/local/lib/python3.9/site-packages/synapse/config/_base.py", line 718, in parse_config_dict
    self.invoke_all(
  File "/usr/local/lib/python3.9/site-packages/synapse/config/_base.py", line 347, in invoke_all
    res[config_class.section] = getattr(config, func_name)(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/synapse/config/modules.py", line 33, in read_config
    self.loaded_modules.append(load_module(module, config_path))
  File "/usr/local/lib/python3.9/site-packages/synapse/util/module_loader.py", line 50, in load_module
    provider_class = getattr(module, clz)
AttributeError: module 'ldap_auth_provider' has no attribute 'LdapAuthProviderModule'
@reivilibre reivilibre changed the title module 'ldap_auth_provider' has no attribute 'LdapAuthProviderModule' In Synapse 1.57.0 Docker image: module 'ldap_auth_provider' has no attribute 'LdapAuthProviderModule' Apr 20, 2022
@reivilibre reivilibre self-assigned this Apr 20, 2022
@reivilibre
Copy link
Contributor

Thanks for your report and sorry about the trouble.

This probably happened because of https://github.com/matrix-org/synapse/pull/12385/files or https://github.com/matrix-org/synapse/pull/12439/files.
It looks like we have accidentally downgraded the version of the LDAP module installed in the Docker image: the 1.56.0 image came with version 0.2.0 of the module. The 1.57.0 came with version 0.1.5 of the module.

@reivilibre
Copy link
Contributor

Fixed in Synapse v1.57.1's Docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants