-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Sync: list index out of range #4842
Comments
I've captured the object that causes this exception:
I've fixed it with diff --git a/synapse/handlers/sync.py b/synapse/handlers/sync.py
index bd97241ab..b20736073 100644
--- a/synapse/handlers/sync.py
+++ b/synapse/handlers/sync.py
@@ -767,7 +767,7 @@ class SyncHandler(object):
current=current_state_ids,
lazy_load_members=lazy_load_members,
)
- elif batch.limited:
+ elif batch.limited and batch.events:
state_at_timeline_start = yield self.store.get_state_ids_for_event(
batch.events[0].event_id, state_filter=state_filter,
) |
If you like, I could open a PR. |
PR sounds good, thanks |
Check if the batch contains events before trying to access them. Fixes matrix-org#4842
Check if the batch contains events before trying to access them. Fixes matrix-org#4842
I'm just wondering how we could end up with Are you using a custom filter with a |
I don't remember what happened before the error came up the first time. I think it came without any action from me. Maybe, can I fetch somehow the event data from the database? Can you give me an SQL query? |
Not really, I'm afraid, since I don't have the details of the request that caused the error, or the state of your database at the time... |
ok, given we don't know what caused this issue, and have no way to reproduce it, I'm not sure we can make much progress on it, so I think it's best to close it for now. |
Version information
The text was updated successfully, but these errors were encountered: