Server not available on Android App but available

Dear Mattermost professionals,

I am a longtime user of the service and I decided to test it for my family and friends as a communication plattform since I really like it.

My mattermost 10.2 server is behind a NAT and I have a lets encrypt certificate in use.
I use debian bookworm 12.8. in combination with nginx which manages the certificate and the encryption also on debian.

I forwarded port 8065 to the server port 443 where nginx is listening and nginx communicated with mattermost on port 8065. That all works fine as far is I can say.
It became a bit tricky when it came to the websockets, which I solved be configuring websockets on the same port. (8065)
Now it works pretty fine from my laptop and other computers using wheater the app or the browser.

Now, my problem is, I can install the app on my mobile device (android 13 with the latest update) and the app works pretty fine I even get notifications pushed to my mobile. BUT my problem is the app always says that the server is not available. But it is. Everything works as mention pretty fine.

Does anyone know why this happens?
Thanks in advance!
Love and blessings to all of you
Johannes

Hi Johannes,

Welcome to the Mattermost forums, and thank you for sharing such detailed information about your setup. It’s great to see your enthusiasm for using Mattermost with family and friends! :tada: The issue you’re describing might be related to the mobile app’s server URL configuration or certificate validation. Could you double-check that the server URL in the mobile app matches the URL configured in nginx, including the https:// prefix? Also, ensure your Let’s Encrypt certificate is correctly set up for all devices. This guide on proxying with NGINX might help confirm everything is configured properly. Let us know if you’re still having trouble, and we’ll work through it together!

Love and blessings to you too! :blush:

Hi John,

Thanks for you fast response. I did for sure read the compendium about the installation of mattermost and I took a little more easier version for the nginx configuration than you provided on your homepage.

However I did use yours too now and I also tried, just not using the nginx at all for a short time just to check if the problem is in any way related to the nginx server or configuration itself.

The result was that even without encryption, so directly forwarding port 8065 to the local server where mattermost is running did produce the same result as it is with using nginx and encryption. So the problem does not seem to be related to the certificate or nginx itself.

It is not really that big of a problem since the app on the mobile works perfectly fine. I just wonder how the app works or how this error message is generated in the app. What protocols it uses to find out the the server might not be available. Since the server is available and the app can connect to it perfectly fine.

After login with the mobile it take about 3sec until this message shows up which does not interfere with any functionality at all.

I then tried to use WLAN and not my mobile network which also had the same result.
I also checked if my domain or the router which is managing all the connections is responding to icmp request which is also the case.

So I am really kind of hard stuck with that problem which is as mentioned not a big deal since it works all pretty fine. As mentioned this problem is only on my mobile. On my laptop both using browser and desktop app work fine and gives not error messages at all.

I will try installing it on a different mobile to see if it might be related to my mobile which is a fairphone FP3. But this will take some time. I will report back as soon as I know more. Thanks for making such a great app.

Best Regards
Johannes

Hi Johannes,

Thanks for the detailed update and for the thorough troubleshooting you’ve already done. It definitely sounds to me like you’re on the right track! It’s interesting that the issue is isolated to the mobile app, especially since everything works smoothly on your laptop. Since the error message appears a few seconds after login and doesn’t impact functionality, it might be related to the mobile app’s internal connection checks or timeouts.

One thing you could try is clearing the cache and data in the Mattermost Android app, as this can sometimes resolve lingering connection issues. If that doesn’t help, another potential cause could be the app’s websocket connection handling, especially when running on mobile networks with varying latency. Testing the app on a different mobile device is a great next step, as it’ll help narrow down whether it’s specific to your current device.

In the meantime, feel free to keep us posted with any new findings or updates, and thanks again for your patience and understanding!

Best regards,
~John