matrix-org / matrix-org/matrix-js-sdk
Error: [Immer] This object has been frozen and should not be mutated.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.2k
- Forks
- 704
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 40
Description
I get this error with the following steps:-
- Send a normal message event in a room with the sendEvent method

- Edit the event by changing its content and also add rel_type as m.replace and pass eventId of edited event

- Now try to do a reaction on the same edited event like this

- And also in vice versa case first we do a reaction and then try to edit the message in that case also we get the same error.
Then it gives this error **Error: [Immer] This object has been frozen and should not be mutated.**
If more information is needed I can provide it.
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
Reproduce the failure through the sendEvent flow using an edited event and a reaction, testing both operation orders described in the report. Trace the event-edit and reaction entry points to identify where the frozen object is mutated. Done means both sequences complete without the Immer mutation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100