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

502 Error when attempting to set avatar #2107

Closed LennyMcLennington closed 2 years ago

LennyMcLennington commented 2 years ago

Background information

Description

Steps to reproduce

The avatar is not set, the request gets a 502 error and I get this line in the Monolith.log;

time="2022-01-24T00:41:19.758764169Z" level=error msg="QueryRoomsForUser failed" func=github.com/matrix-org/dendrite/clientapi/routing.SetAvatarURL file="github.com/matrix-org/dendrite/clientapi/routing/profile.go:147" error="GetRoomsByMembership: cannot map user ID to state key NID: context canceled" req.id=qxPUhlmXtLNC req.method=PUT req.path="/_matrix/client/r0/profile/@lenny:polymc.org/avatar_url" user_id="@lenny:polymc.org"
kegsay commented 2 years ago

context cancelled means the client gave up. Setting profile names / pictures scales with the number of rooms the account is joined to because 1 event must be sent for every room the account is joined to. How many rooms is this account joined to?

That being said, it doesn't even look like Dendrite gets that far as it seems to be stuck on QueryRoomsForUser - which is a roomserver thing.

LennyMcLennington commented 2 years ago

How many rooms is this account joined to?

It was joned to 8 rooms and 3 spaces, but now I have left two of the spaces (each of the two spaces only had one room, they were just for testing) so now it's in 1 space and 6 rooms and now I am able to set my avatar without any issue. It's something to do with one of those rooms that I left then, I guess. Is there some sort of admin API I could use to force join myself to those rooms to see which one it is or am I stuck outside of those rooms now that I've left them?

neilalexander commented 2 years ago

This shouldn't happen anymore now that the profile updates are sent asynchronously, but please reopen if this is still an issue in 0.8.1.