element-hq / element-hq/synapse

Synapse responds with `200 OK` to reaction removal, but requires ⪆ `PT4H` to remove the reaction.

Open
#18,987 4 comments 0 reactions 0 assignees View on GitHub
A-Redactions O-Occasional S-Major T-Defect
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

### Description

At [`develop.element.io`][6], [^1] within [`matrix.to/#/!LdFTpgksHpQBBtjOMN:matrix.org/$7z9qoF17VHc08wg2mlG1fRYtfhXbHmhxp-ZNQCXcK-o?via=matrix.org&via=beeper.com`][4], [^1] I am able to add reactions to messages, and remove them, until I invoke `location.reload()`, whereupon removed onces *may* re-appear, and non-removed reactions become impossible to remove. However, re-appeared reactions, and impossible-to-remove reactions disappear ⪆ `PT4H` afterward.

[^1]: [`element-meta/discussions/2993`](https://github.com/element-hq/element-meta/discussions/2993#discussion-9007979)

[6]: https://develop.element.io/#/room/!LdFTpgksHpQBBtjOMN:matrix.org/$7z9qoF17VHc08wg2mlG1fRYtfhXbHmhxp-ZNQCXcK-o

### Steps to reproduce

1. Uploaded an MP4 H265 video file to [`https://matrix.to/#/!LdFTpgksHpQBBtjOMN:matrix.org/$7z9qoF17VHc08wg2mlG1fRYtfhXbHmhxp-ZNQCXcK-o?via=matrix.org&via=beeper.com`][4]. [^1]

[4]: https://matrix.to/#/!LdFTpgksHpQBBtjOMN:matrix.org/$7z9qoF17VHc08wg2mlG1fRYtfhXbHmhxp-ZNQCXcK-o?via=matrix.org&via=beeper.com

1. Reacted with an emoji.

1. Attempted to remove the reaction.

This was successful. Thereafter, I:

1. Invoked `location.reload()`.

1. Attempted to remove the reaction.

I should have been able to. However, I was unable to remove it, yet was able to remove those which I had added since the most recent `location.reload()`:

https://github.com/user-attachments/assets/3d9700f7-9942-4ed8-a618-d6bcd175d04b

### Homeserver

`:matrix.org`

### Synapse Version

`curl http://matrix.org/_synapse/admin/v1/server_version` didn't return any data (although it succeeded), whereas `wget http://matrix.org/_synapse/admin/v1/server_version` returned data:

1. ~~~sh
#!/usr/bin/env sh
rm server_version
wget http://matrix.org/_synapse/admin/v1/server_version
cat server_version | yq -P
~~~

1.

~~~YAML
server_version: 1.139.0rc3 (b=matrix-org-hotfixes-priv,f538ed5ac3)
~~~

This is a little late, though.

### Relevant log output

Per [`element-web/issues/28249#issuecomment-2452222998`][3], the best I currently possess is:

[3]: https://github.com/element-hq/element-web/issues/28249#issuecomment-2452222998

~~~JSON
{
"content": {
"body": "1000009396.mp4",
"info": {
"duration": 71077,
"h": 720,
"mimetype": "video/mp4",
"size": 28260134,
"thumbnail_info": {
"h": 1080,
"mimetype": "image/jpeg",
"size": 280933,
"w": 1920
},
"thumbnail_url": "mxc://matrix.org/UwUKTRfOHkZaYjEbFNdShHKd",
"w": 1280
},
"msgtype": "m.video",
"url": "mxc://matrix.org/ubcJFQyLqcXmyqqNzlsLiSfX"
},
"origin_server_ts": 1729422562766,
"room_id": "!LdFTpgksHpQBBtjOMN:matrix.org",
"sender": "@rokejulianlockhart:matrix.org",
"type": "m.room.message",
"unsigned": {
"membership": "join",
"age": 1057522431,
"m.relations": {
"m.thread": {
"latest_event": {
"content": {
"body": "Re_ Submission from Service Request Form_ Black display on FW16 after inputting LUKS password. 2024-10-20T12_29_59+01_00.eml",
"info": {
"mimetype": "message/rfc822",
"size": 46349
},
"m.mentions": {},
"m.relates_to": {
"event_id": "$7z9qoF17VHc08wg2mlG1fRYtfhXbHmhxp-ZNQCXcK-o",
"is_falling_back": true,
"m.in_reply_to": {
"event_id": "$MMpRrrlL2AXm0M0gjb45KTwV8rnnJsW0pQdZZ8qQRdw"
},
"rel_type": "m.thread"
},
"msgtype": "m.file",
"url": "mxc://matrix.org/XvClKBoPaUVNvHpCZvSrvHAg"
},
"origin_server_ts": 1729424463627,
"room_id": "!LdFTpgksHpQBBtjOMN:matrix.org",
"sender": "@rokejulianlockhart:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 1055621570
},
"event_id": "$GNjxcv9C-MuE2UQ5JaQINVLRD4XQEAaoBcNJjX-nqjM",
"user_id": "@rokejulianlockhart:matrix.org",
"age": 1055621570
},
"count": 4,
"current_user_participated": true
}
}
},
"event_id": "$7z9qoF17VHc08wg2mlG1fRYtfhXbHmhxp-ZNQCXcK-o",
"user_id": "@rokejulianlockhart:matrix.org",
"age": 1057516185
}
~~~

All of the more descriptive logs have been submitted via a `/rageshake`, per [`element-web/issues/28249#issuecomment-2424882238`][2]. I may be able to reproduce, but haven't enough time immediately available to me to confirm.

[2]: https://github.com/element-hq/element-web/issues/28249#issuecomment-2424882238

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

Previously reported at [`matrix-org/matrix.org/issues/2553`][1]. Since then, I have removed [`@rokejulianlockhart:beeper.com`][6] from the aforereferenced room, which appears to have remediated it. I have re-added it, to attempt to reproduce the bug.

If it does, does [`mautrix/whatsapp/issues/842#issuecomment-3307014732`][7]'s triage policy apply here, too? I hope not, although this discussion is premature.

[7]: https://github.com/mautrix/whatsapp/issues/842#issuecomment-3307014732

[6]: https://matrix.to/#/@rokejulianlockhart:beeper.com

[1]: https://github.com/matrix-org/matrix.org/issues/2553#issue-2637886941

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the reproduction involving reaction removal after location.reload() and the linked element-web and matrix.org reports, then attempt to reproduce against Synapse 1.139.0rc3 using the supplied room and event details. Inspect the available rageshake or server logs; done means a removed reaction does not reappear and a reaction can be removed promptly after reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.