Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to change power level in certain channels #19751

Closed
dom96 opened this issue Nov 14, 2021 · 9 comments
Closed

Failed to change power level in certain channels #19751

dom96 opened this issue Nov 14, 2021 · 9 comments
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Backend Z-Synapse

Comments

@dom96
Copy link

dom96 commented Nov 14, 2021

Steps to reproduce

  1. https://app.element.io/#/room/#nim-lang:matrix.org
  2. Trying to give a member moderator privileges, done via searching for their nick, clicking their account then using the dropdown.

Outcome

What did you expect?

User gets mod privs

What happened instead?

image

This works in other channels. For some reason in this channel specifically it fails :/

Operating system

Windows

Browser information

Firefox

URL for webapp

app.element.io

Application version

No response

Homeserver

No response

Will you send logs?

Yes

@dom96 dom96 added the T-Defect label Nov 14, 2021
@t3chguy
Copy link
Member

t3chguy commented Nov 15, 2021

This is the actual error:

2021-11-14T16:29:58.766Z E Failed to change power level M_BAD_JSON: "@freenode_yglukhov[i]:matrix.org": '0' is not of type 'integer'

@Palid Palid added O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist X-Needs-Investigation labels Nov 15, 2021
@ghost
Copy link

ghost commented Dec 31, 2021

Is there any workaround or fix for this issue? The channel in question is the main bridged Matrix channel of our Nim community (bridged to Discord and IRC). It's quite troublesome for us as we currently only have one active admin in this channel, and they don't always have time to remove spam. Maybe it's possible to promote admins some other way?

@PMunch
Copy link

PMunch commented Jan 1, 2022

Is the Nim channel the only one affected? Judging by that error it seems like all channels should have the same error..

@ghost
Copy link

ghost commented Jan 1, 2022

@PMunch I doubt all channels have the same exact user joined (@freenode_yglukhov[i]:matrix.org) :)

@PMunch
Copy link

PMunch commented Jan 1, 2022

Oh that's what it meant? To be honest that error message doesn't make much sense, it first shows their username, then complains that '0' is not an integer

@t3chguy
Copy link
Member

t3chguy commented Jan 5, 2022

Cannot reproduce

image

@dom96
Copy link
Author

dom96 commented Jan 18, 2022

Just tried again and still can't change power levels in that channel. Anything else that I can do to help repro? I'm not sure this is related to that specific username.

@t3chguy
Copy link
Member

t3chguy commented Jan 18, 2022

So that room has a broken power levels event

{
  "content": {
    "ban": 50,
    "events": {
      "im.vector.modular.widgets": 50,
      "m.room.avatar": 100,
      "m.room.canonical_alias": 100,
      "m.room.encryption": 100,
      "m.room.history_visibility": 100,
      "m.room.name": 100,
      "m.room.power_levels": 100,
      "m.room.server_acl": 50,
      "m.room.tombstone": 100,
      "m.room.topic": 100
    },
    "events_default": 0,
    "invite": 0,
    "kick": 50,
    "redact": 100,
    "state_default": 100,
    "users": {
      "@appservice-irc:matrix.org": 100,
      "@dom96:matrix.org": 100,
      "@freenode_yglukhov[i]:matrix.org": "0",
      "@uran:matrix.org": 100
    },
    "users_default": 0
  },
  "event_id": "$162405382075982TABhT:matrix.org",
  "origin_server_ts": 1624053820674,
  "room_id": "!EtGqjSRNQoJCbpCJSF:matrix.org",
  "sender": "@dom96:matrix.org",
  "state_key": "",
  "type": "m.room.power_levels",
  "unsigned": {
    "replaces_state": "$162405381975981bMSPl:matrix.org",
    "age": 18455146100
  },
  "user_id": "@dom96:matrix.org",
  "age": 18455146100,
  "replaces_state": "$162405381975981bMSPl:matrix.org"
}

"@freenode_yglukhov[i]:matrix.org": "0", should be 0 not "0"

Given that Synapse is happy to return these, it should also be happy to accept them. I'd suggest this be raised on the Synapse repo. Requiring that all clients repair all power levels events seems the wrong balance.

@t3chguy
Copy link
Member

t3chguy commented Apr 25, 2022

Closing in favour of matrix-org/synapse#12538

@t3chguy t3chguy closed this as completed Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Backend Z-Synapse
Projects
None yet
Development

No branches or pull requests

4 participants