Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Synapse 1.24.0 fails to start at login_types.remove(LoginType.PASSWORD) #8914

Closed
dani opened this issue Dec 10, 2020 · 4 comments · Fixed by #8937
Closed

Synapse 1.24.0 fails to start at login_types.remove(LoginType.PASSWORD) #8914

dani opened this issue Dec 10, 2020 · 4 comments · Fixed by #8937
Assignees
Labels
z-auth (Deprecated Label) z-bug (Deprecated Label) z-regression (Deprecated Label)

Comments

@dani
Copy link

dani commented Dec 10, 2020

Description

After updating Synapse to 1.24.0, it fails to start with the following error :

déc. 10 13:49:00 mtx matrix-synapse[28371]: Traceback (most recent call last):
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
déc. 10 13:49:00 mtx matrix-synapse[28371]:     "__main__", mod_spec)
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
déc. 10 13:49:00 mtx matrix-synapse[28371]:     exec(code, run_globals)
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/opt/matrix/synapse/venv/lib/python3.6/site-packages/synapse/app/homeserver.py", line 512, in <module>
déc. 10 13:49:00 mtx matrix-synapse[28371]:     main()
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/opt/matrix/synapse/venv/lib/python3.6/site-packages/synapse/app/homeserver.py", line 507, in main
déc. 10 13:49:00 mtx matrix-synapse[28371]:     hs = setup(sys.argv[1:])
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/opt/matrix/synapse/venv/lib/python3.6/site-packages/synapse/app/homeserver.py", line 366, in setup
déc. 10 13:49:00 mtx matrix-synapse[28371]:     hs.setup()
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/opt/matrix/synapse/venv/lib/python3.6/site-packages/synapse/server.py", line 269, in setup
déc. 10 13:49:00 mtx matrix-synapse[28371]:     self.setup_background_tasks()
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/opt/matrix/synapse/venv/lib/python3.6/site-packages/synapse/server.py", line 278, in setup_background_tasks
déc. 10 13:49:00 mtx matrix-synapse[28371]:     getattr(self, "get_" + i + "_handler")()
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/opt/matrix/synapse/venv/lib/python3.6/site-packages/synapse/server.py", line 168, in _get
déc. 10 13:49:00 mtx matrix-synapse[28371]:     dep = builder(self)
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/opt/matrix/synapse/venv/lib/python3.6/site-packages/synapse/server.py", line 408, in get_auth_handler
déc. 10 13:49:00 mtx matrix-synapse[28371]:     return AuthHandler(self)
déc. 10 13:49:00 mtx matrix-synapse[28371]:   File "/opt/matrix/synapse/venv/lib/python3.6/site-packages/synapse/handlers/auth.py", line 218, in __init__
déc. 10 13:49:00 mtx matrix-synapse[28371]:     login_types.remove(LoginType.PASSWORD)
déc. 10 13:49:00 mtx matrix-synapse[28371]: ValueError: list.remove(x): x not in list

Steps to reproduce

  • Update to 1.24.0 (from source)
  • Restart the service

Version information

Running on CentOS 8 with Python 3.6.8, Synapse being in a virtualenv. I'm using OIDC auth (against a Lemonldap::NG instance), so internal auth has been disabled (might be related to the issue) :

password_config:
  enabled: False
  localdb_enabled: False

Downgrading to 1.23.0 makes everything working again

@clokep
Copy link
Member

clokep commented Dec 10, 2020

I think removing localdb_enabled: False will fix the issue (since it password login will get added to the list and then removed), but the code should be handling this case.

@clokep clokep added z-auth (Deprecated Label) z-bug (Deprecated Label) p1 z-regression (Deprecated Label) labels Dec 10, 2020
@clokep clokep assigned clokep and unassigned clokep Dec 10, 2020
@dani
Copy link
Author

dani commented Dec 10, 2020

Indeed, I can confirm that removing localdb_enabled: False from the config fixes the issue, I can start Synapse again

@callahad
Copy link
Contributor

@richvdh Assigning to you, per message in synapse-dev, if you don't mind?

@SNThrailkill
Copy link

SNThrailkill commented Dec 13, 2020

+1 for removing localdb_enabled from config fixes the issue. Thanks dani. Am also running SSO against Keycloak, no local users.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
z-auth (Deprecated Label) z-bug (Deprecated Label) z-regression (Deprecated Label)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants