matrix-org / matrix-org/matrix-hookshot
Hookshot AppService triggers NotImplementedError in Synapse v1.138.x during /sync with MSC4222
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 450
- Forks
- 95
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 23
Description
When using the Hookshot AppService with Synapse v1.138.x, requests to /_matrix/client/v3/sync that include the org.matrix.msc4222.use_state_after parameter trigger a NotImplementedError in the SyncRestServlet. This prevents the AppService from properly syncing with the server.
**Steps to reproduce:**
1. Deploy Synapse v1.138.4 (or v1.138.x) using Docker.
2. Configure Hookshot AppService to connect to the Synapse server.
3. Trigger a sync request from the AppService that includes org.matrix.msc4222.use_state_after=true.
4. Observe the server logs:
```
synapse | Traceback (most recent call last):
...
synapse | File "/usr/local/lib/python3.12/site-packages/synapse/handlers/sync.py", line 1840, in generate_sync_result
synapse | raise NotImplementedError()
```
**Expected behavior:**
The sync request should succeed and return the expected events to the AppService without raising a NotImplementedError.
**Additional information:**
- Appears consistently on all /sync requests from the Hookshot bot that use MSC4222.
- Tested on Synapse Docker image matrixdotorg/synapse:1.138.4.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Hookshot AppService /_matrix/client/v3/sync request with org.matrix.msc4222.use_state_after against Synapse 1.138.4 in Docker, then inspect the reported SyncRestServlet and handlers/sync.py stack frames. Compare the request path with MSC4222 handling and verify that sync completes without NotImplementedError and returns the expected events.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100