element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
Apache License 2.0
3.32k stars 706 forks source link

Can't send messages on local network without internet connectivity. #2178

Open lampholder opened 3 years ago

lampholder commented 3 years ago

Even if it can reach the homeserver, Element Android can't send messages without connectivity to the public internet.

After discussing with @BillCarsonFr we think that the WorkManager for sending messages might not be triggering because the networking constraint CONNECTED is not being met (if the device can't reach google.com, perhaps).

There are plans under discussion for moving message-sending out of a backgroundable work manager (related to performance rather than this issue).

noonetry commented 3 years ago

Similar behavior in my system: can't send messages if system doesn't "see" internet connection, message sending takes forever. All my other apps and Element's other functions are working fine independently from system internet connection status.

Element's message sending: not_working working

My system configuration: AospExtended v6.7 (Android 9) + microG + AFWall+. Problem always occurs with Element app version: 1.0.3 - 1.0.8 (versions before 1.0.3 not tested). Problem never occurred with latest Riot app versions (past two years).

bahur142 commented 3 years ago

Last days I made some experiments in a closed Wi-Fi network (no Internet connection at all). A raspberry pi with synapse server connected to the Wi-Fi router and some android clients (Element 1.1.5) connected to the same Wi-Fi. Everything is working as expected - messages and calls was fine. No issues at all despite the lack of Internet.

bahur142 commented 3 years ago

offline