mattermost / mattermost-mobile

Next generation iOS and Android apps for Mattermost in React Native
https://about.mattermost.com/
Apache License 2.0
2.25k stars 1.37k forks source link

Android app can't connect if server isn't listening on IPv6 #7576

Closed a-gerhard closed 1 year ago

a-gerhard commented 1 year ago

We recently had the same issue as @n-gao in https://github.com/mattermost/mattermost-mobile/issues/6643#issuecomment-1482755439_ – The only thing we saw was that the Android app was having trouble most of the time, while all other apps as well as web browsers (even on Android) did not have any issue, and the only message we got was "failed to connect". This made it pretty hard to debug.

Debian 11 currently has a docker version (20.10.5) which only publishes IPv4 addresses when publishing a port globally (the related GitHub issue can be found here). This means that this faulty configuration could easily be deployed by anyone using Mattermost's official docker-with-nginx installation guide on a Debian 11 server.

It appears that the iOS app, the Desktop app, as well as web browsers will retry the connection on IPv4 if IPv6 fails, but the Android app doesn't. Hence, the connection issue only in the Android app, and only when it's inside an IPv6-enabled network.

I suggest fixing this issue in the Android app, and until then, adding this to the debugging guideline

amyblais commented 1 year ago

Opened https://mattermost.atlassian.net/browse/MM-54703.

amyblais commented 1 year ago

Closing as a Help Wanted issue was opened for this.