This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Synapse crashes with AttributeError: 'NoneType' object has no attribute 'get'
on .get("msc3861", {})
if experimental_features
is empty #15919
Copy link
Copy link
Closed
Labels
A-ConfigConfiguration, or the documentation thereofConfiguration, or the documentation thereofO-UncommonMost users are unlikely to come across this or unexpected workflowMost users are unlikely to come across this or unexpected workflowS-MajorMajor functionality / product severely impaired, no satisfactory workaround.Major functionality / product severely impaired, no satisfactory workaround.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Description
Description
Since upgrading from 1.85.2 to 1.87.0 just now, Synapse refuses to start. After quickly looking at the source code it turns out it like/expect when an empty experimental_features
appears in the configuration:
# Configure the forbidden fruits
#
# See https://github.com/matrix-org/synapse/blob/master/synapse/config/experimental.py for current list.
experimental_features:
Commenting out that last line fixes the issue and makes Synapse start again. This happened because that key previous contained some entries but they where later removed as the relevant feature became stable. Perhaps it shouldn’t have been written this way before, but Synapse failing like this on upgrade feels like a regression.
Steps to reproduce
- list the steps
- that reproduce the bug
- using hyphens as bullet points
Homeserver
matrix.ninetailed.nnja
Synapse Version
187.0
Installation Method
Docker (matrixdotorg/synapse)
Database
PostgreSQL, single server, never restored from backup or SQLite
Workers
Single process
Platform
Linux x86_64, Docker container inside VM
Configuration
No response
Relevant log output
matrix-synapse | Starting synapse with args -m synapse.app.homeserver --config-path /data/homeserver.yaml
matrix-synapse | Traceback (most recent call last):
matrix-synapse | File "<frozen runpy>", line 198, in _run_module_as_main
matrix-synapse | File "<frozen runpy>", line 88, in _run_code
matrix-synapse | File "/usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py", line 398, in <module>
matrix-synapse | main()
matrix-synapse | File "/usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py", line 388, in main
matrix-synapse | hs = setup(sys.argv[1:])
matrix-synapse | ^^^^^^^^^^^^^^^^^^^
matrix-synapse | File "/usr/local/lib/python3.11/site-packages/synapse/app/homeserver.py", line 297, in setup
matrix-synapse | config = HomeServerConfig.load_or_generate_config(
matrix-synapse | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
matrix-synapse | File "/usr/local/lib/python3.11/site-packages/synapse/config/_base.py", line 802, in load_or_generate_config
matrix-synapse | obj.parse_config_dict(
matrix-synapse | File "/usr/local/lib/python3.11/site-packages/synapse/config/_base.py", line 823, in parse_config_dict
matrix-synapse | self.invoke_all(
matrix-synapse | File "/usr/local/lib/python3.11/site-packages/synapse/config/_base.py", line 422, in invoke_all
matrix-synapse | res[config_class.section] = getattr(config, func_name)(*args, **kwargs)
matrix-synapse | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
matrix-synapse | File "/usr/local/lib/python3.11/site-packages/synapse/config/auth.py", line 35, in read_config
matrix-synapse | .get("msc3861", {})
matrix-synapse | ^^^
matrix-synapse | AttributeError: 'NoneType' object has no attribute 'get'
Anything else that would be useful to know?
No response
Metadata
Metadata
Assignees
Labels
A-ConfigConfiguration, or the documentation thereofConfiguration, or the documentation thereofO-UncommonMost users are unlikely to come across this or unexpected workflowMost users are unlikely to come across this or unexpected workflowS-MajorMajor functionality / product severely impaired, no satisfactory workaround.Major functionality / product severely impaired, no satisfactory workaround.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.