element-ios icon indicating copy to clipboard operation
element-ios copied to clipboard

Network availability reports reachable when connected to a network with bad DNS.

Open ara4n opened this issue 3 years ago • 4 comments

Steps to reproduce

  1. Go on a network whose dns (and IP) is down - or manually set the DNS servers to some invalid value.
  2. Optionally send a message.

Outcome

What did you expect?

The network unavailable banner should be shown.

What happened instead?

The syncing banner shows forever an never goes away. Messages simply fail to send with the error "Failed to send message" and the option to retry.

Your phone model

13 pro max

Operating system version

15.4

Application version

1.8.19

Homeserver

m.org

Will you send logs?

Yes

ara4n avatar Jun 30 '22 07:06 ara4n

i would send logs if someone had fixed rageshake :((

ara4n avatar Jun 30 '22 07:06 ara4n

i would send logs if someone had fixed rageshake :((

They should be working again on the latest TF

pixlwave avatar Jun 30 '22 07:06 pixlwave

Will be improved by https://github.com/vector-im/element-ios/pull/6314

stefanceriu avatar Jul 01 '22 10:07 stefanceriu

Having looked into this, it affects the app as a whole. Some observations:

  • When DNS is incorrectly configured, requests all report as timing out but that the network is reachable.
  • We use AFNetworkReachabilityManager.shared for reachability which seems to report a reachable network in this instance.
  • Creating a custom instance for a specific domain such as AFNetworkReachabilityManager(forDomain: "matrix.org") initially shows with an unreachable network, but given a minute or 2 will also decide that the server is reachable.
  • AFNetworkReachabilityManager uses SCNetworkReachability under the hood.
  • Switching to NWPathMonitor, this also reports a path status of satisfied.

Note: I've downgraded this from a P1 as it definitely isn't a frequently occurring issue.

pixlwave avatar Jul 12 '22 11:07 pixlwave