Trying to login with riot-web via https://riot.im/app/#/login using a alternative home server generates an error message "Cannot find homeserver"
Till last week the server was recognized, and users could login with credentials. Since 13 ... 14 december (or maybe earlier) it worked correctly: user could login.
Last week I did a server upgrade, mostly on tooling (I guess) using:
pip install --upgrade pip (didn't log the version update number)
pip install --upgrade setuptools (didn't log the version update number)
pip install https://github.com/matrix-org/synapse/tarball/master (was already 0.33.9)
For the web app:
Used synapse server:
This is almost certainly the new .well-known (auto discovery) interfering with your login. You could set up a .well-known file, although instructions are relatively limited here.
Instead, it may be easier to use your localpart (the bit between the @ and :, so @alice:example.org's localpart would be alice) and ensure the custom server option points to the right place.
When I fill in only the localpart (test.user2), then I get the error "Failed to perform homeserver discovery". Still with correct server name and protocol "https://matrix4me.nl".
Well that's not supposed to happen :(
Does refreshing and trying from scratch help?
You mean the server? I've rebooted it. Didn't help. And the tarball does not have memory of previous versions...
I meant riot-web. It shouldn't be complaining about homeserver discovery if you're using your localpart.
I don't own https://riot.im/app/#/login so I cannot do much. Currently I've not my own server running for the riot-web, only for synapse.
@peter-scholtens I suspect you'd be able to log in if you:
This is almost certainly the new .well-known (auto discovery) interfering with your login. You could set up a .well-known file, although instructions are relatively limited here.
@turt2live I'm going to rename this bug to reflect this likely cause
I think the stuck error problem is https://github.com/vector-im/riot-web/issues/7845. The lack of documentation is more or less https://github.com/vector-im/riot-web/issues/7760. The interference is something that we might not be able to solve without design.
@lampholder I tried from several networks, with and without "@" and ":matrix4me.nl". All fail with "Cannot find homeserver".
https://github.com/vector-im/riot-web/issues/7977 is another report of the same thing with some potentially-useful discussion
I've got the same issue. The "only use localpart" workaround did not help for me either. I'm still using matrix-synapse 0.24.0+dfsg-1, that's what comes with Ubuntu 18.04 LTS.
@schildbach I have the same issue. It especially breaks when the browser auto inputs fields with non user data :/ It seems like to try to use it as mxid but than locks up in a wrong state. I had to disable browser auto input, prevent to focus the localpart field and first type the new custom server ip and after that my localpart and password to get it to login at all
The stuck error is https://github.com/vector-im/riot-web/issues/7845 and a different issue
We started using the .well-known/matrix/server file for our server recently and one user reported the same problem with our riot-web setup (however, somehow just on Windows, regardless of the used browser).
I think there are two problems here:
.well-known/matrix/client file (unless riot-web is running on the exact same domain), which means that the server has to send a Access-Control-Allow-Origin: * or similar header, as a CORS request requires to make a HEAD request first and check if access is allowed. This should be documented (see #7760).add_header Access-Control-Allow-Origin *; in the nginx config, it might still not work. In our case the problem was that .well-known/matrix/client did not exist (while .well-known/matrix/server DID exist), thus causing a 404 error which then does not send the required header. One can fix that either by using add_header Access-Control-Allow-Origin * always; or by creating the missing file. It would however probably be a good idea to catch failed requests for .well-known/matrix/client (which then have the status code 0) in riot-web and treat them like the file does not exist.@turt2live so it seems like the problem is
if (response.statusCode === 404) {
action = "IGNORE";
reason = "No .well-known JSON file found";
}
If I comment out the if statement then it won't display an error message if the homeserver has no .well-known/matrix/client file. The reason it can't see the 404 is because of CORS.
With the check for 404:

Error message to user: Invalid homeserver discovery response
Without the check for 404:

No error message to user
The downside of commenting this out is no user facing error message will appear if the file does exist but it can't be accessed due to CORS. Maybe that's an OK compromise?
Most helpful comment
This is almost certainly the new .well-known (auto discovery) interfering with your login. You could set up a .well-known file, although instructions are relatively limited here.
Instead, it may be easier to use your localpart (the bit between the
@and:, so@alice:example.org's localpart would bealice) and ensure the custom server option points to the right place.