element-hq / element-hq/element-android
Unable to connect to LAN IP addresses
- Dominant language
- Kotlin
- Stars
- 3.7k
- Forks
- 917
- PR merge metrics
- No merged PRs in 30d
Description
I have a local Synapse server running at http://192.168.0.109:8008 on my local network. Every other client and device I have can successfully connect to it, including the old Riot.im Android client (0.9.12) and the desktop version of Element, but RiotX/Element cannot. If I try to enter a 192.168.0.0/24 address as a custom server, the client will immediately throw an error message saying "No network. Please check your internet connection." whether or not there's a server running on that socket.

A few other strange observations:
- The server only has an HTTP port enabled, no HTTPS - but the Element client CAN connect to an insecure HTTP server if it's running on the phone itself, under http://127.0.0.1:8008
- If I explicitly bind the server to the LAN address of the phone (i.e., put `['::1', '127.0.0.1', '192.168.0.103']` in the config file), it will still only be able to connect using the localhost address, not the LAN one
- If I enter https://192.168.0.109 (HTTPS, without the port), the client DOES find the server and even displays a fingerprint, asking me if I want to trust it - if I click trust, I get an error saying "This is not a valid Matrix server address"
- Trying to enter https://192.168.0.109:8008 (or any other IP/port) causes the client to hang for about 10 seconds while it's waiting for a timeout
Contributor guide
Assessment
This issue has not been assessed yet.