Just created empty room throws error on rooms and directs loading #16

Closed
opened 2020-10-22 07:47:14 +00:00 by koloml · 5 comments

Error and traceroute:

Uncaught (in promise) TypeError: Cannot read property 'map' of undefined
    at Room.getName (room-picker.js?static=a20728d65e:109)
    at Room.render (room-picker.js?static=a20728d65e:153)
    at new Room (room-picker.js?static=a20728d65e:74)
    at Rooms.askAdd (room-picker.js?static=a20728d65e:183)
    at Subscribable.js?static=19b7e44aa6:33
    at Array.forEach (<anonymous>)
    at Subscribable.js?static=19b7e44aa6:33
    at Array.forEach (<anonymous>)
    at SubscribeMapList.broadcast (Subscribable.js?static=19b7e44aa6:32)
    at SubscribeMapList.askAdd (SubscribeMapList.js?static=b2732c5460:45)

Possible reason:

Room state not contains m.room.name, m.room.canonical_alias and room summary not contains any members.

room.data.state contains only this values:

{
  "events": [
    {
      "type": "m.room.member",
      "sender": "@koloml:thecore.city",
      "content": {
        "membership": "join",
        "displayname": "KowoMl",
        "avatar_url": "mxc://thecore.city/dae60e3f69373ce7e80b907e1b18c7fc19c4ee84"
      },
      "state_key": "@koloml:thecore.city",
      "origin_server_ts": 1603351929315,
      "unsigned": {
        "age": 491868
      },
      "event_id": "$uZN2qMr-C55q3GCyQdEFF7JcvyapXahACzmXaWuqkqw"
    },
    {
      "type": "m.room.create",
      "sender": "@koloml:thecore.city",
      "content": {
        "room_version": "5",
        "creator": "@koloml:thecore.city"
      },
      "state_key": "",
      "origin_server_ts": 1603351929091,
      "unsigned": {
        "age": 492092
      },
      "event_id": "$Bds4txLQb0iRlB20tBqMs9ybcYYgTV3_JUUK8enq39g"
    },
    {
      "type": "m.room.power_levels",
      "sender": "@koloml:thecore.city",
      "content": {
        "users": {
          "@koloml:thecore.city": 100
        },
        "users_default": 0,
        "events": {
          "m.room.name": 50,
          "m.room.power_levels": 100,
          "m.room.history_visibility": 100,
          "m.room.canonical_alias": 50,
          "m.room.avatar": 50,
          "m.room.tombstone": 100,
          "m.room.server_acl": 100,
          "m.room.encryption": 100
        },
        "events_default": 0,
        "state_default": 50,
        "ban": 50,
        "kick": 50,
        "redact": 50,
        "invite": 50
      },
      "state_key": "",
      "origin_server_ts": 1603351929423,
      "unsigned": {
        "age": 491760
      },
      "event_id": "$4MgezJZz0M-induiZfRqAXUyXRVF8cX221MiZhicCmc"
    }
  ]
}
Error and traceroute: ``` Uncaught (in promise) TypeError: Cannot read property 'map' of undefined at Room.getName (room-picker.js?static=a20728d65e:109) at Room.render (room-picker.js?static=a20728d65e:153) at new Room (room-picker.js?static=a20728d65e:74) at Rooms.askAdd (room-picker.js?static=a20728d65e:183) at Subscribable.js?static=19b7e44aa6:33 at Array.forEach (<anonymous>) at Subscribable.js?static=19b7e44aa6:33 at Array.forEach (<anonymous>) at SubscribeMapList.broadcast (Subscribable.js?static=19b7e44aa6:32) at SubscribeMapList.askAdd (SubscribeMapList.js?static=b2732c5460:45) ``` Possible reason: Room state not contains `m.room.name`, `m.room.canonical_alias` and room summary not contains any members. `room.data.state` contains only this values: ```json { "events": [ { "type": "m.room.member", "sender": "@koloml:thecore.city", "content": { "membership": "join", "displayname": "KowoMl", "avatar_url": "mxc://thecore.city/dae60e3f69373ce7e80b907e1b18c7fc19c4ee84" }, "state_key": "@koloml:thecore.city", "origin_server_ts": 1603351929315, "unsigned": { "age": 491868 }, "event_id": "$uZN2qMr-C55q3GCyQdEFF7JcvyapXahACzmXaWuqkqw" }, { "type": "m.room.create", "sender": "@koloml:thecore.city", "content": { "room_version": "5", "creator": "@koloml:thecore.city" }, "state_key": "", "origin_server_ts": 1603351929091, "unsigned": { "age": 492092 }, "event_id": "$Bds4txLQb0iRlB20tBqMs9ybcYYgTV3_JUUK8enq39g" }, { "type": "m.room.power_levels", "sender": "@koloml:thecore.city", "content": { "users": { "@koloml:thecore.city": 100 }, "users_default": 0, "events": { "m.room.name": 50, "m.room.power_levels": 100, "m.room.history_visibility": 100, "m.room.canonical_alias": 50, "m.room.avatar": 50, "m.room.tombstone": 100, "m.room.server_acl": 100, "m.room.encryption": 100 }, "events_default": 0, "state_default": 50, "ban": 50, "kick": 50, "redact": 50, "invite": 50 }, "state_key": "", "origin_server_ts": 1603351929423, "unsigned": { "age": 491760 }, "event_id": "$4MgezJZz0M-induiZfRqAXUyXRVF8cX221MiZhicCmc" } ] } ```
Author

The room.data.summary don't have m.heroes field at all:

{
  "m.joined_member_count": 1,
  "m.invited_member_count": 0
}
The `room.data.summary` don't have `m.heroes` field at all: ```json { "m.joined_member_count": 1, "m.invited_member_count": 0 } ```
Owner

Maybe fixed in e18c8c77aef6a5ac36b2a9c22daa8f3fb8efb7cb? Please try, you can use https://carbon.chat to find out. (You may need to press F5 to see the changes.)

Maybe fixed in e18c8c77aef6a5ac36b2a9c22daa8f3fb8efb7cb? Please try, you can use https://carbon.chat to find out. (You may need to press F5 to see the changes.)
Author

Checked out. Now it's working fine, empty room shows as channel name.

Checked out. Now it's working fine, empty room shows as channel name.
Author

This is strange, that room don't have this state values, but events happened.

image

This is strange, that room don't have this state values, but events happened. ![image](/attachments/eb688ddd-e721-41c2-a10d-a98ee26ee9fc)
Owner

If you see the events in the timeline, they're passed as timeline events, not state events. Probably nothing to worry about.

If you see the events in the timeline, they're passed as timeline events, not state events. Probably nothing to worry about.
Sign in to join this conversation.
No Milestone
No Assignees
2 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: cadence/Carbon#16
No description provided.