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

Cannot join room from matrix.to link, "No known servers" #11756

Open
Bubu opened this issue Jan 2, 2020 · 20 comments
Open

Cannot join room from matrix.to link, "No known servers" #11756

Bubu opened this issue Jan 2, 2020 · 20 comments

Comments

@Bubu
Copy link

Bubu commented Jan 2, 2020

Description

I tried to click on the link in this message and could not join the room this was pointing to:

https://matrix.to/#/!xYvNcQPhnkrdUmYczI:matrix.org/$DJYCtRsqEio-s577yqTZya4EfSnfenU_QIJZ6LYFzK4?via=matrix.org&via=feneas.org&via=maunium.net

This was the link I couldn't follow: https://matrix.to/#/!yjVgJUsMLYLAONsoii:jki.re/$ABrOfGufg7k0jRLV0MnVLUnD28BYWMFy51hai0SZunU?via=jki.re&via=matrix.org&via=kde.org

Version information

  • Platform: desktop
  • OS: Ubuntu 18.04
  • Version: riot-web version: 1.5.6
@Bubu Bubu added the T-Defect label Jan 2, 2020
@turt2live turt2live self-assigned this Feb 18, 2020
@anoadragon453
Copy link
Member

I've been recently seeing these links not working when you click them (leading to No Known Servers), however if you then add the via parameters manually to the URL and then try to join again it works.

Seems like Riot regressed at some point in extracting them from the URL when clicked?

@jmcph4
Copy link

jmcph4 commented Jul 3, 2020

Any progress on this? Experiencing the same issues currently with various matrix.to links (up-to-date Debian riot-desktop package).

@anoadragon453
Copy link
Member

Any progress on this? Experiencing the same issues currently with various matrix.to links (up-to-date Debian riot-desktop package).

Can you confirm that when clicking the link, your browser is making a POST /_matrix/client/r0/join/{roomIdOrAlias} request without any server_name query parameters included?

If they are there and you're getting No known servers, then this is a server issue.

@deliciouslytyped
Copy link

If you find this issue because you can't figure out how to open a room link in element-desktop, look at #12879 .

@alexrollin

This comment has been minimized.

@Bubu
Copy link
Author

Bubu commented Nov 6, 2021

@alexrollin: this is the repository for element-web, android issues aren't tracked here.

@cdauth
Copy link

cdauth commented Mar 25, 2022

Is there any progress or any more info on this? I'm experiencing this when I'm trying to open a room from another server.

@aaronraimist
Copy link
Collaborator

@Bubu Can you respond to #11756 (comment) please?

@Bubu
Copy link
Author

Bubu commented Jul 3, 2022

@aaronraimist I tried (re-) joining the TWIM room I linked in my original issue. This is going via matrix.to to element-desktop. At that point clicking the re-join button indeed still produces the "No known servers error message" and element-desktop indeed didn't include any server _names in the query.

Now pasting the second link into a room and clicking on it does allow me to join that room. I'm not sure if it maybe was formatted differently in the original message I can't reach anymore though.

(Edit: I also just opened element-hq/element-meta#986 for a related issue.)

@aaronraimist aaronraimist removed the X-Needs-Info This issue is blocked awaiting information from the reporter label Jul 3, 2022
@aaronraimist
Copy link
Collaborator

Interesting. I thought the first part might be caused by matrix-org/matrix.to#235 but it looks like that got fixed recently.

@aaronraimist
Copy link
Collaborator

aaronraimist commented Jul 3, 2022

I did a test using a test using a fake room ID (so I didn't have to keep joining and leaving a real room) and I did see the server_names being included in the join request. I opened https://matrix.to/#/!fake:example.com?via=example.com&via=example2.com&via=example3.com in my browser and then clicked on the continue button in matrix.to to open that link in Element Desktop.

Element sent /_matrix/client/r0/join/!fake%3Aexample.com?server_name=example.com&server_name=example2.com&server_name=example3.com to the server.

@Bubu
Copy link
Author

Bubu commented Jul 4, 2022

I can confirm that your !fake:example.com link works correctly for me as well.

I would imaging that the different with the (old) TWIM room if from above is that I get dumped to this screen before I have a chance to click join. And then the via parameters are missing.

@JeanPaulLucien

This comment was marked as off-topic.

@Bubu

This comment was marked as off-topic.

@JeanPaulLucien

This comment was marked as off-topic.

@JeanPaulLucien

This comment was marked as off-topic.

@Bubu

This comment was marked as off-topic.

@JeanPaulLucien

This comment was marked as off-topic.

@anoadragon453
Copy link
Member

anoadragon453 commented Feb 10, 2023

If your homeserver is already in a room (i.e. another user on your homeserver already joined it), then you will be able to join that room through a room ID without via pointers. Otherwise, they are necessary as your homeserver needs to pull events from another server that's in the room already.

You can join a room via a room alias (#some-room:example.org) without via pointers, as the homeserver domain from the alias will be used to join the room via.

I can't reproduce the issue by clicking on the link mentioned in the issue description. Is anyone still able to?

To thoroughly test using Element Web (or Desktop):

  1. Open developer tools (Ctrl/Cmd+Shift+i) in and navigate to the Network tab.
  2. Paste the matrix.to link into a chatroom somewhere, send it, and then click the link.
  3. If you fail to join the room, find the request for https://<your_server>/_matrix/client/v3/rooms/<roomId>/join under the Network tab. Right click that request and select "Copy as cURL" or similar.
  4. Paste the results into an issue here. That will allow us to see what Element sent to your homeserver, and whether it was enough information to join the room with.
  5. Type /rageshake into the message bar and submit a rageshake reference the URL of this GitHub issue, to give us an idea of why the client may have failed to give all necessary information.

@Bubu
Copy link
Author

Bubu commented Feb 10, 2023

@anoadragon453 I can still reproduce the original issue, i.e. going via https://matrix.to/#/!yjVgJUsMLYLAONsoii:jki.re/$ABrOfGufg7k0jRLV0MnVLUnD28BYWMFy51hai0SZunU?via=jki.re&via=matrix.org&via=kde.org I eventually end up with the following error message from element-desktop:

MatrixError: [404] Can't join remote room because no servers that are in the room have been provided. (https://matrix.bubu1.eu/_matrix/client/r0/join/!yjVgJUsMLYLAONsoii%3Ajki.re)

The network request sent is:

curl $'https://matrix.bubu1.eu/_matrix/client/r0/join/\u0021yjVgJUsMLYLAONsoii%3Ajki.re' \
  -H 'authority: matrix.bubu1.eu' \
  -H 'accept: application/json' \
  -H 'accept-language: en-US' \
  -H 'authorization: Bearer XXXXXXXXXXXX' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'origin: vector://vector' \
  -H 'pragma: no-cache' \
  -H 'sec-ch-ua: "Not?A_Brand";v="8", "Chromium";v="108"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: cross-site' \
  -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Element/1.11.17 Chrome/108.0.5359.179 Electron/22.0.2 Safari/537.36' \
  --data-raw '{}' \
  --compressed

I think the issue here is that element interposes the "can't load timeline position" popup for me (as noted above) and at that point has lost the via parameters.

I'll send a rageshake. (Edit: sent)

Edit 2: No change with Element version: 1.11.20 btw. (the latest I currently get from my distro)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests