element-hq / element-meta

Shared/meta documentation and project artefacts for Element clients
70 stars 12 forks source link

Error "We couldn't reach this homeserver." #2156

Open l3ennji opened 10 months ago

l3ennji commented 10 months ago

Hi,

I've been trying to upgrade my matrix-synapse homeserver to be able to use element x instead of element in the future. I've installed sliding-sync and the matrix-authentication-service, which both seem to run fine. When I try to connect with element, the homeserver is reachable, I get redirected to the Login or User-Creation-Page, everything is fine. I can also access the sliding-sync directly inside my browser. The .well-known/matrix/client-json gets hosted and contains all the necessary information. Now, I would suspect the element x client should work as well, but all I can see is the "We couldn't reach this homeserver."-Error. I've encountered the error which took me to the sliding sync landing page at the very beginning, but after installing sliding sync and mas, it hasn't appeared again. I can see in the nginx logs that element x accesses the client-json (but with http 2.0 instead of http 1.1 as the "regular" element client), but it doesn't go any further. None of the other logs show any hints what I'm missing. I'll gladly provide logs, if this is of any help. I feel like I'm somehow missing the link to the sliding-sync proxy, but it exists in the client-json, and gets properly hosted.

I know, this is all still in development, nevertheless I feel like there's already a large documentation gap. Parts, which are necessary to run together, are documented separately, and no one really cares to explain where the connections are or which connections and interfaces are really necessary. While the documentation for the mas is actually fairly comprehensive, the sliding sync documentation is missing a few steps, and the element x documentation basically only consists of "You need this and that. Go figure. Or buy our own server suite which defeats the purpose of open source software." (No offense, I know documentation has the lowest priority, but it saves time for the user, which makes open source projects more popular, and you can avoid stupid questions and issues, opened by knobheads like myself, who fail at running a service, not because the service itself is flawed, but because they're missing a little information to run it properly.)

Best regards

Ben

zqad commented 4 months ago

Hi, For what it's worth, I spent a few hours debugging this and finally narrowed it down to a missing / at the end of my issuer URL in the .well-known/matrix/client file, https://mas.mydomain -> https://mas.mydomain/.

It is of course not certain that you have the same issue, but to debug I looked at all the requests the client did and compared them to the same URLs on https://areweoidcyet.com/client-implementation-guide/ , and finally found this mismatch.

Best of luck in your debugging.