-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/sync
returns 404 with "Could not find event" if the last event in a room was rejected
#12571
Comments
The root problem here appears to be that the last message in the room before the
I guess (Also, it shouldn't raise a |
diff --git a/synapse/storage/databases/main/stream.py b/synapse/storage/databases/main/stream.py
index 793e906630..b1e9c6ede3 100644
--- a/synapse/storage/databases/main/stream.py
+++ b/synapse/storage/databases/main/stream.py
@@ -747,7 +747,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
"SELECT stream_ordering, topological_ordering, event_id"
" FROM events"
" WHERE room_id = ? AND stream_ordering <= ?"
- " AND NOT outlier"
+ " AND NOT outlier AND rejection_reason IS NULL"
" ORDER BY stream_ordering DESC"
" LIMIT 1"
) is a patch that fixed this for me. I |
ITYM "I do think"? Correct, The patch looks about right to me, modulo joining on |
Hello, How did I end up there: Any suggestion I could try by "hand" (admin rest api) to "fix" the situation" ? addendum: I'm running synapse (1.58.1), and it might not be related to conduit room's state. I just taught it might help set the picture of how i encountered the same error message as above. |
We had similar problem with room that has messages automatically purged every 1h with /_synapse/admin/v1/purge_history/ and then all messages that bot has sent after purge were redacted. Sync would fail for new clients that are part of the room. Issue was resolved by posting something after redacted messages to room. |
I think this broke in #12319 |
fed9bba seems to fix the issue, but requires atleast Element IOS clients to manually clear cache to get sync working again. |
Hello, |
/sync
returns 404 with "Could not find event"/sync
returns 404 with "Could not find event" if the last event in a room was rejected
/sync
requests fail with logs like the following:The event id in question is a rejected event.
Stacktrace for the exception:
It looks like
get_last_event_in_room_before_stream_ordering
is returning that rejected event, and we're then trying to calculate the state at it.Jaeger link for internal users: https://jaeger.proxy.matrix.org/trace/bc8f105a8857ad29?uiFind=562187d6a0f8c25a
The text was updated successfully, but these errors were encountered: