matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

Can't connect to the dendrite room #2206

Closed SSamDav closed 2 years ago

SSamDav commented 2 years ago

Background information

I'm running a docker compose with the following images:

Description

kegsay commented 2 years ago

In order to send an event in a room Dendrite needs to get the current state of the room to attach things like auth events to the new event. This error message indicates dendrite cannot get the state of the room.

SSamDav commented 2 years ago

What should I do?

neilalexander commented 2 years ago

Just to be clear, your client is showing you the room but when you try to send a message or a typing notification, you see these errors?

The state NID error indicates that Dendrite doesn’t think you are joined to the room — the state NID that it’s looking for is your own membership event.

In some cases, you can issue another /join command from within Element to try to prompt the server to rejoin the room, but it’s a pretty bad bug if you still manage to see a room you aren’t fully joined to.

SSamDav commented 2 years ago

When I try to join the room I get this error:

time="2022-02-21T00:01:03.511389603Z" level=info msg="User requested to room join" room_id="#dendrite:matrix.org" servers="[]" user_id="@ssamdav:matrix.bongole.xyz"
time="2022-02-21T00:01:03.628886067Z" level=error msg="Failed to join room" error="error joining local room: \"QueryLatestEventsAndState: storage: state NIDs missing from the database (0 != 1)\"" room_id="#dendrite:matrix.org" servers="[]" user_id="@ssamdav:matrix.bongole.xyz"
time="2022-02-21T00:01:06.626713610Z" level=error msg="QueryCurrentState: could not query membership for user" error="storage: state NIDs missing from the database (0 != 1)" req.id=y29Gh8xuUj7U req.method=POST req.path="/_matrix/client/r0/rooms/!yomrOFwgFXzmeMAbzX:matrix.org/read_markers" user_id="@ssamdav:matrix.bongole.xyz"
time="2022-02-21T00:01:07.143057319Z" level=error msg="QueryCurrentState: could not query membership for user" error="storage: state NIDs missing from the database (0 != 1)" req.id=3JX8jCxwrztY req.method=POST req.path="/_matrix/client/r0/rooms/!yomrOFwgFXzmeMAbzX:matrix.org/read_markers" user_id="@ssamdav:matrix.bongole.xyz"
SSamDav commented 2 years ago

I also can't leave the room.

neilalexander commented 2 years ago

Can you please try commit https://github.com/matrix-org/dendrite/pull/2210/commits/bb2043d1cf2cf5bc1c64818418492c49ea9179b3 from #2210 and then try to re-join the room?

SSamDav commented 2 years ago

It seems that the new version solved the problem. Thanks!!

neilalexander commented 2 years ago

Glad to hear it!