element-hq / element-hq/synapse

After update to latest version, login via web portal can not receive and get any messages.

Open
#19,283 1 comment 0 reactions 0 assignees View on GitHub
X-Needs-Info
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

### Description

After update to latest version, login via web portal occur the following error log.

### Steps to reproduce

Update Synapse to 1.143.0, Web to 1.26.0

Login to web portal and the error occurred.

### Homeserver

matrix.atiia.org

### Synapse Version

{"server_version":"1.143.0"}

### Installation Method

Docker (matrixdotorg/synapse)

### Database

Postgres

### Workers

Single process

### Platform

Container

### Configuration

# Configuration file for Synapse.
#
# This is a YAML file: see [1] for a quick introduction. Note in particular
# that *indentation is important*: all the elements of a list or dictionary
# should have the same indentation.
#
# [1] https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
#
# For more information on how to configure Synapse, including a complete accounting of
# each option, go to docs/usage/configuration/config_documentation.md or
# https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html
server_name: "matrix.atiia.org"
pid_file: /data/homeserver.pid
listeners:
- port: 8008
tls: false
type: http
x_forwarded: true
resources:
- names: [client, federation, openid]
compress: false
database:
name: psycopg2
args:
user: synapse
password: changeme
dbname: synapse
host: 10.10.20.140
cp_min: 5
cp_max: 10
log_config: "/data/matrix.atiia.org.log.config"
media_store_path: /data/media_store
enable_registration: false
allow_guest_access: true
registration_shared_secret: "x"
report_stats: true
macaroon_secret_key: "x,"
form_secret: "x"
signing_key_path: "/data/matrix.atiia.org.signing.key"
serve_server_wellknown: true
max_upload_size: 500M
trusted_key_servers:
- server_name: "matrix.atiia.org"
ip_range_whitelist:
- '10.0.0.0/8'
url_preview_ip_range_whitelist:
- '127.0.0.1'

outbound_push_restricted_ips:
allow:
- '127.0.0.1'
- '172.17.0.1'
- '192.168.0.0/16'

ip_range_whitelist:
- '127.0.0.1'

policy:
data:
admin_clients:
- x
push:
enabled: true
push_gateway_url: "http://10.10.20.140:8030/"
include_content: false
group_unread_count_by_room: false
jitter_delay: 2s
experimental_features:
msc3861:
enabled: true
# Synapse will call `{issuer}/.well-known/openid-configuration` to get the OIDC configuration
issuer: http://10.10.20.140:8080/
# Matches the `client_id` in the auth service config
client_id: x
# Matches the `client_auth_method` in the auth service config
client_auth_method: client_secret_basic
# Matches the `client_secret` in the auth service config
client_secret: "x"
# Matches the `matrix.secret` in the auth service config
admin_token: "x"
msc4108_enabled: true
# MSC3266: Room summary API. Used for knocking over federation
msc3266_enabled: true
# MSC4222 needed for syncv2 state_after. This allow clients to
# correctly track the state of the room.
msc4222_enabled: true

max_event_delay_duration: 24h

rc_message:
per_second: 0.5
burst_count: 30

rc_delayed_event_mgmt:
per_second: 1
burst_count: 20

# vim:ft=yaml

### Relevant log output

```shell
2025-12-06 00:55:21,750 - synapse.http.server - 146 - ERROR - GET-184 - Failed handle request via 'SyncRestServlet':
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/synapse/http/server.py", line 334, in _async_render_wrapper
callback_return = await self._async_render(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/synapse/http/server.py", line 575, in _async_render
callback_return = await raw_callback_return
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/synapse/rest/client/sync.py", line 269, in on_GET
sync_result = await self.sync_handler.wait_for_sync_for_user(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<6 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/synapse/handlers/sync.py", line 359, in wait_for_sync_for_user
res = await self.response_cache.wrap(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<7 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/synapse/util/caches/response_cache.py", line 322, in wrap
return await make_deferred_yieldable(result)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/twisted/internet/defer.py", line 1195, in __iter__
result.raiseException()
~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/twisted/python/failure.py", line 455, in raiseException
raise self.value.with_traceback(self.tb)
File "/usr/local/lib/python3.13/site-packages/twisted/internet/defer.py", line 1853, in _inlineCallbacks
result = context.run(
cast(Failure, result).throwExceptionIntoGenerator, gen
)
File "/usr/local/lib/python3.13/site-packages/twisted/python/failure.py", line 467, in throwExceptionIntoGenerator
return g.throw(self.value.with_traceback(self.tb))
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/synapse/util/caches/response_cache.py", line 300, in cb
return await callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/synapse/handlers/sync.py", line 460, in _wait_for_sync_for_user
result = await self.current_sync_for_user(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sync_config, since_token, full_state=full_state
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/synapse/handlers/sync.py", line 528, in current_sync_for_user
sync_result = await self.generate_sync_result(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sync_config, since_token, full_state
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/synapse/handlers/sync.py", line 1715, in generate_sync_result
) = await self._generate_sync_entry_for_rooms(sync_result_builder)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/synapse/handlers/sync.py", line 2229, in _generate_sync_entry_for_rooms
await concurrently_execute(handle_room_entries, room_entries, 10)
File "/usr/local/lib/python3.13/site-packages/synapse/util/async_helpers.py", line 250, in concurrently_execute
await yieldable_gather_results(
...<2 lines>...
)
File "/usr/local/lib/python3.13/site-packages/synapse/util/async_helpers.py", line 299, in yieldable_gather_results
raise dfe.subFailure.value from None
File "/usr/local/lib/python3.13/site-packages/twisted/internet/defer.py", line 1857, in _inlineCallbacks
result = context.run(gen.send, result)
File "/usr/local/lib/python3.13/site-packages/synapse/util/async_helpers.py", line 236, in _concurrently_execute_inner
await maybe_awaitable(func(value))
File "/usr/local/lib/python3.13/site-packages/synapse/handlers/sync.py", line 2218, in handle_room_entries
await self._generate_room_entry(
...<6 lines>...
)
File "/usr/local/lib/python3.13/site-packages/synapse/handlers/sync.py", line 2781, in _generate_room_entry
summary = await self.compute_summary(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
room_id, sync_config, batch, state, now_token
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/synapse/handlers/sync.py", line 877, in compute_summary
state_ids = await self._state_storage_controller.get_state_ids_for_event(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/synapse/logging/opentracing.py", line 949, in _wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/synapse/logging/opentracing.py", line 949, in _wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/synapse/storage/controllers/state.py", line 373, in get_state_ids_for_event
state_map = await self.get_state_ids_for_events(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
)
^
File "/usr/local/lib/python3.13/site-packages/synapse/logging/opentracing.py", line 949, in _wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/synapse/logging/opentracing.py", line 949, in _wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/synapse/storage/controllers/state.py", line 318, in get_state_ids_for_events
return {event: event_to_state[event] for event in event_ids}
~~~~~~~~~~~~~~^^^^^^^
KeyError: '$o8zWpI23Sl4V9Q5AxJTOxE6d9-fQRoOKgPsFXE_Xxho'
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.