Skip to content

Containerized v1.149.0 fails to start if using the packaged ldap_auth_provider #19541

@ananace

Description

@ananace

Description

The container image for v1.149.0 still packages matrix-synapse-ldap3 version 0.3.0 (since no newer version has been released), which fails to load due to matrix-org/matrix-synapse-ldap3#199

Steps to reproduce

  • Attempt to start the ghcr.io/element-hq/synapse:v1.149.0 image with;
password_providers:
- module: "ldap_auth_provider.LdapAuthProvider"

Homeserver

Personal Homeserver

Synapse Version

1.149.0

Installation Method

Docker (matrixdotorg/synapse)

Database

postgresql

Workers

Multiple workers

Platform

Kubernetes

Configuration

No response

Relevant log output

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/lib/python3.13/site-packages/synapse/app/generic_worker.py", line 477, in <module>
    main()
    ~~~~^^
  File "/usr/local/lib/python3.13/site-packages/synapse/app/generic_worker.py", line 450, in main
    homeserver_config = load_config(sys.argv[1:])
  File "/usr/local/lib/python3.13/site-packages/synapse/app/generic_worker.py", line 331, in load_config
    config = HomeServerConfig.load_config("Synapse worker", argv_options)
  File "/usr/local/lib/python3.13/site-packages/synapse/config/_base.py", line 595, in load_config
    obj, _ = cls.load_config_with_parser(config_parser, argv_options)
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/synapse/config/_base.py", line 676, in load_config_with_parser
    obj.parse_config_dict(
    ~~~~~~~~~~~~~~~~~~~~~^
        config_dict,
        ^^^^^^^^^^^^
    ...<2 lines>...
        allow_secrets_in_config=config_args.secrets_in_config,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/synapse/config/_base.py", line 919, in parse_config_dict
    self.invoke_all(
    ~~~~~~~~~~~~~~~^
        "read_config",
        ^^^^^^^^^^^^^^
    ...<3 lines>...
        allow_secrets_in_config=allow_secrets_in_config,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/synapse/config/_base.py", line 438, in invoke_all
    res[config_class.section] = getattr(config, func_name)(*args, **kwargs)
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/synapse/config/password_auth_providers.py", line 77, in read_config
    (provider_class, provider_config) = load_module(
                                        ~~~~~~~~~~~^
        {"module": mod_name, "config": provider["config"]},
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        ("password_providers", "<item %i>" % i),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/synapse/util/module_loader.py", line 53, in load_module
    module = importlib.import_module(module_name)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1023, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/usr/local/lib/python3.13/site-packages/ldap_auth_provider.py", line 24, in <module>
    from pkg_resources import parse_version
ModuleNotFoundError: No module named 'pkg_resources'

Anything else that would be useful to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions