bug: Invites aren't properly reaching some clients #1249

Closed
opened 2025-12-28 04:30:51 +00:00 by nex · 3 comments
Owner

After 0.5.0 there's been a few reports of invites from the local server not properly reaching clients, manifesting as either not being presented to the user at all, or being presented with broken information:
image

This is likely related to information clients need to construct an invite being missed over /sync, but needs investigation.

After 0.5.0 there's been a few reports of invites *from the local server* not properly reaching clients, manifesting as either not being presented to the user at all, or being presented with broken information: ![image](/attachments/e3053baf-6249-48d2-8ca1-08fa0dd99493) This is likely related to information clients need to construct an invite being missed over /sync, but needs investigation.
7.2 KiB
Author
Owner

image

Element Web seems to display these as joined rooms? Not sure what's happening here

{
  "next_batch": "174137877",
  "rooms": {
    "invite": {
      "!Jrb1FOLyr3tXDCq1YO:nexy7574.co.uk": {}
    }
  },
  "device_lists": {
    "changed": [
      "@test5:nexy7574.co.uk"
    ]
  },
  "device_one_time_keys_count": {
    "signed_curve25519": 50
  },
  "device_unused_fallback_key_types": null
}

(account_data value omitted for brevity)

![image](/attachments/c8fc2343-5830-448a-9702-698366d9930f) Element Web seems to display these as joined rooms? Not sure what's happening *here* ```json { "next_batch": "174137877", "rooms": { "invite": { "!Jrb1FOLyr3tXDCq1YO:nexy7574.co.uk": {} } }, "device_lists": { "changed": [ "@test5:nexy7574.co.uk" ] }, "device_one_time_keys_count": { "signed_curve25519": 50 }, "device_unused_fallback_key_types": null } ``` (account_data value omitted for brevity)
145 KiB

I think I've been running into this on our new homeserver, here's logs from around that time, this was trying to create a DM between two users both on the same server. both using cinny as clients but I also use fluffychat on my phone which finally showed an invite after a few refreshes. tried to clear cinny client cache which seems to sometimes help but not always. let me know if there is any other info i can provide :)

Jan 31 00:27:42 chat.pprbry.net conduwuit[20218]: 2026-01-30T13:27:42.248148Z  INFO conduwuit_api::client::room::create: @raspberry:pprbry.net created a room with room ID !QF14LnERRNsWelOh2t:pprbry.net
Jan 31 00:28:50 chat.pprbry.net conduwuit[20218]: 2026-01-30T13:28:50.665748Z  WARN conduwuit_service::rooms::timeline::backfill: No servers could backfill, but backfill was needed in room !BeIInJ0fY4PZdfMavW:pprbry.net
Jan 31 00:29:26 chat.pprbry.net conduwuit[20218]: 2026-01-30T13:29:26.408366Z  WARN conduwuit_service::rooms::timeline::backfill: No servers could backfill, but backfill was needed in room !BeIInJ0fY4PZdfMavW:pprbry.net
I think I've been running into this on our new homeserver, here's logs from around that time, this was trying to create a DM between two users both on the same server. both using cinny as clients but I also use fluffychat on my phone which finally showed an invite after a few refreshes. tried to clear cinny client cache which seems to sometimes help but not always. let me know if there is any other info i can provide :) ``` Jan 31 00:27:42 chat.pprbry.net conduwuit[20218]: 2026-01-30T13:27:42.248148Z INFO conduwuit_api::client::room::create: @raspberry:pprbry.net created a room with room ID !QF14LnERRNsWelOh2t:pprbry.net Jan 31 00:28:50 chat.pprbry.net conduwuit[20218]: 2026-01-30T13:28:50.665748Z WARN conduwuit_service::rooms::timeline::backfill: No servers could backfill, but backfill was needed in room !BeIInJ0fY4PZdfMavW:pprbry.net Jan 31 00:29:26 chat.pprbry.net conduwuit[20218]: 2026-01-30T13:29:26.408366Z WARN conduwuit_service::rooms::timeline::backfill: No servers could backfill, but backfill was needed in room !BeIInJ0fY4PZdfMavW:pprbry.net ```

Based on my little investigation, the issue seems to originate from here:

| MembershipState::Invite => {
// TODO: make sure that passing None for `last_state` is correct behavior.
// the call from `append_pdu` used to use `services.state.summary_stripped`
// to fill that parameter.
self.mark_as_invited(user_id, room_id, pdu.sender(), None, None)
.await?;
},

None is getting inserted into state_cache, which is then served as an empty object directly to clients from /sync

Based on my little investigation, the issue seems to originate from here: https://forgejo.ellis.link/continuwuation/continuwuity/src/commit/55fb3b8848b839b13c6d5253b657ce99a1ed1ef2/src/service/rooms/state_cache/update.rs#L120-L126 None is getting inserted into state_cache, which is then served as an empty object directly to clients from /sync
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity#1249
No description provided.