element-hq / element-x-ios

Next generation Matrix client for iOS built with SwiftUI on top of matrix-rust-sdk.
https://element.io/labs/element-x
GNU Affero General Public License v3.0
410 stars 97 forks source link

Element X doesn't check that the proxy responses are 2xx #1701

Open thibaultamartin opened 1 year ago

thibaultamartin commented 1 year ago

Steps to reproduce

  1. Deploy a homeserver on matrix.example.com behind a reverse proxy
  2. Update the .well-known/matrix/client file so it responds the "org.matrix.msc3575.proxy": {"url": "https://matrix.example.com"}
  3. Log in with Element X to example.com. The sync screen beings
  4. The reverse proxy returns 404s for the sliding sync endpoints
  5. Element X keeps spinning on the initial sync, not detecting that the sliding sync proxy is not here/not working

Outcome

What did you expect?

I expected the client to tell me that something's wrong

What happened instead?

The client tells me to wait forever

Your phone model

iPhone 11 Pro

Operating system version

iOS 17

Application version

Element X TF 1.2.9 (3)

Homeserver

Synapse 1.91 + Sliding Sync Proxy 0.99.10

Will you send logs?

No

pixlwave commented 12 months ago

From #1866:

Steps to reproduce

  1. Set up synapse and a sliding sync server. Both available on :8448, synapse on :443 as well.
  2. Forget to expose the sliding sync server on :443
  3. Configure the .well-known to point to both servers (in my case: two subdomains, same apache)
  4. Log in to server in Element X

Outcome

What did you expect?

What happened instead?

Application version

1.3.1 (74)

Homeserver

Synapse 1.93.0 / Sliding Sync 0.99.10

teon commented 5 months ago

Same here. I forgot to add to my DNS the sync host domain and had Setting up your account, this may take a while indefinitely... Thanks to @pixlwave and this issue I got an idea how to fixed it ;-)

pixlwave commented 5 months ago

Linking this to https://github.com/matrix-org/matrix-rust-sdk/issues/2822 which is what we need to detect the failure.