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

If default_server_name is set and that server is down, Riot spins forever on startup #9112

Closed
jryans opened this issue Mar 11, 2019 · 7 comments
Assignees
Labels
A-Authentication A-Login A-Registration P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@jryans
Copy link
Collaborator

jryans commented Mar 11, 2019

  1. Set default_server_name to some server in Riot's config.json
  2. Ensure that the named server is down and not responding
  3. Reload Riot
  4. Riot will hang forever / a long time trying to query .well-known from that server, even if you are already logged in

Local build of https://riot.im/develop

@lampholder lampholder added T-Defect P2 S-Major Severely degrades major functionality or product features, with no satisfactory workaround A-Registration A-Login labels Mar 15, 2019
@jryans
Copy link
Collaborator Author

jryans commented Mar 25, 2019

This is currently blocking Modular's usage of default_server_name.

@jryans jryans added P1 and removed P2 labels Mar 25, 2019
@lampholder
Copy link
Member

What actually causes the problem? Is it:

  • the matrix server is down, or
  • the .well-known is not being served?

Or is it both?

What behaviour do we want here? What error messages do we want to report to the user?

default_server_name == cooldomain.horse

  • if https://cooldomain.horse/.well-known/matrix/client 404s then
    • we could try and log in to https://cooldomain.horse/_matrix/
    • if that works, 👍
    • if that doesn't work, report to the user "cooldomain.horse (https://cooldomain.horse/) is not responding, please contact the homeserver administrator or choose a different homeserver
  • if https://cooldomain.horse/.well-known/matrix/client resolves to a valid json file
    • try and log in to https://domain-from-well-known/path-from-well-known/_matrix
    • if that doesn't work, report to the user "cooldomain.horse (https://domain-from-well-known/path-from-well-known/) is not responding, please contact the homeserver administrator or choose a different homeserver"

And, we can actually do better with our error messages, too, depending on whether the server that is not responding == default_server_name. There should be a stronger emphasis on contacting the HS admin if default_server_name isn't working - if a random user-entered thing isn't working we should be encouraging the user to check their input.

@jryans
Copy link
Collaborator Author

jryans commented Mar 26, 2019

What actually causes the problem? Is it:

  • the matrix server is down, or
  • the .well-known is not being served?

This specific issue only happens if the server at default_server_name is down / non-responsive. Riot will wait until the request times out before showing any UI at all (beyond a spinner). We could potentially change behaviour to show the overall auth UI but incorporate a spinner into the auth flow instead of blocking the whole app. It's notable that this current issue blocks you from using Riot even if you are already logged in.

If default_server_name is up but .well-known/matrix/client 404s, we don't hit this issue, but instead a more subtle thing currently happens: Riot will say "Sign in to your Matrix account on <default_server_name>", but it's actually using default_hs_url, which may not be what you want. (For Modular, it would probably be okay, since they plan to define both default_server_name and default_hs_url.)

@jryans
Copy link
Collaborator Author

jryans commented Mar 26, 2019

If default_server_name is up but .well-known/matrix/client 404s, we don't hit this issue, but instead a more subtle thing currently happens: Riot will say "Sign in to your Matrix account on <default_server_name>", but it's actually using default_hs_url, which may not be what you want.

Isn't this #8818?

Yes, that seems to match the 404 case.

@jryans
Copy link
Collaborator Author

jryans commented Mar 27, 2019

We're hoping to rework default_server_name a bit so that more of the config can be available locally and there are less traps. Removing the fire status for now.

@turt2live
Copy link
Member

As per @jryans' comment, this is blocked on #9290

@turt2live
Copy link
Member

Fixed by matrix-org/matrix-react-sdk#3001 - it won't make it into 1.2.0, but should be in the next regularly scheduled release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Authentication A-Login A-Registration 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