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

Community invite appears briefly, then shows error "failed to load" #7727

Closed
jryans opened this issue Nov 20, 2018 · 3 comments
Closed

Community invite appears briefly, then shows error "failed to load" #7727

jryans opened this issue Nov 20, 2018 · 3 comments
Assignees
Labels
A-Spaces Spaces, groups, communities P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@jryans
Copy link
Collaborator

jryans commented Nov 20, 2018

Description

I received a community invite to +polynomial-supporters:matrix.org. When I click on it in the Riot's room list, the invite appears for ~2 secs, but it is then replaced with the error "Failed to load +polynomial-supporters:matrix.org".

In the console, I see:

Failed to get resource GroupMembers for +polynomial-supporters:matrix.org 
Object { errcode: "M_UNKNOWN", name: "M_UNKNOWN", message: "More than one row matched", data: {…}, httpStatus: 500, stack: "" }
GroupStore encountered error whilst fetching data for +polynomial-supporters:matrix.org 
Object { errcode: "M_UNKNOWN", name: "M_UNKNOWN", message: "More than one row matched", data: {…}, httpStatus: 500, stack: "" }

The failing requests seem to be:

GET https://matrix.org/_matrix/client/r0/groups/%2Bpolynomial-supporters%3Amatrix.org/users
[HTTP/2.0 500 Internal Server Error 942ms]
GET https://matrix.org/_matrix/client/r0/groups/%2Bpolynomial-supporters%3Amatrix.org/invited_users
[HTTP/2.0 403 Forbidden 131ms]

Most likely, this is related to matrix-org/synapse#2633. @benparsons suggested it could be possible for Riot ignore these errors and continue displaying the invite. I will investigate this approach.

I have sent debug logs for this issue as well.

Steps to reproduce

I expect to be able to view and accept the invite.

Version information

  • Platform: web
  • Browser: Firefox 65
  • OS: macOS 10.13.6
  • URL: riot.im/app
@turt2live
Copy link
Member

This is because Riot is treating the 500 from /users request as a fatal error for the component (as it should - it can't reliably display the group otherwise). There was recently a patch to have the error returned from /invited_users work correctly, so that should not interfere with the page's ability to load.

@lampholder lampholder added T-Defect A-Spaces Spaces, groups, communities P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels Nov 23, 2018
@jryans
Copy link
Collaborator Author

jryans commented Nov 23, 2018

There was recently a patch to have the error returned from /invited_users work correctly, so that should not interfere with the page's ability to load.

Assuming you mean the error handler in GroupStore, it did catch the 403 from /invited_users, but the 500 from /users is uncaught and triggers the "failed to load" message for the group. I'll experiment with also ignoring the extra error.

jryans added a commit to jryans/matrix-react-sdk that referenced this issue Nov 23, 2018
Synapse is currently known (matrix-org/synapse#2633) to return 500 errors for
requests to `/groups/$groupId/users` when a user has multiple invites to the
group.

If you are affected by this issue, Riot will display a community invite when you
select it for a few seconds until it receives this 500 error, but then it will
replace the invite view with a "Failed to load <group>" message.

By ignoring this error response in Riot for now, it is possible to view and
accept the invite.

Fixes element-hq/element-web#7727.

Signed-off-by: J. Ryan Stinnett <jryans@gmail.com>
@jryans jryans self-assigned this Dec 5, 2018
@jryans jryans added this to In Test in Web App Team Dec 5, 2018
@jryans
Copy link
Collaborator Author

jryans commented Dec 10, 2018

Fixed by matrix-org/matrix-react-sdk#2326.

@jryans jryans closed this as completed Dec 10, 2018
@jryans jryans moved this from In Test to Done in Web App Team Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Spaces Spaces, groups, communities P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants