Unable to connect to Mattermost server using Android phone

Hi @kongyc870320,

Thanks for your feedback,

Can you try upgrading to the latest server version of Mattermost to see whether your issue still exists?

I’m having the same issue as well. When I upgrfaded to 4.9.1 I lost the ability to connect with the Android app.

I’ve upgraded to 4.9.2 and I’m still having the same issue(s). The web interface works fine, but the Android app simply refuses to connect. No error message, and nothing in the mattermost logs that I can see.

Hi Lindy

Thanks for the reply. I’ve tried the latest version of Mattermost server v4.9.

I found that in my Android Mattermost client, I can connect to the Mattermost server using http but didn’t work with https ssl.

Can you advise?

Hi,

In my testing environment, I have mattermost v4.9 installed, configured SSL using this method (NGINX not installed):

https://docs.mattermost.com/install/install-rhel-71.html#configuring-tls-on-mattermost-server

Configure TLS on the Mattermost Server:

  1. In the System Console > General > Configuration.
  1. Change the Listen Address setting to :443.
  2. Change the Connection Security setting to TLS.
  3. Change the Forward port 80 to 443 setting to true.
  1. Activate the CAP_NET_BIND_SERVICE capability to allow Mattermost to bind to low ports.
  1. Open a terminal window and change to the Mattermost bin directory.

cd /opt/mattermost/bin

  1. Run the following command:

sudo setcap cap_net_bind_service=+ep ./platform

  1. Install the security certificate. You can use Let’s Encrypt to automatically install and setup the certificate, or you can specify your own certificate.

To use a Let’s Encrypt certificate:

The certificate is retrieved the first time that a client tries to connect to the Mattermost server. Certificates are retrieved for any hostname a client tries to reach the server at.

  1. Change the Use Let’s Encrypt setting to true.
  2. Restart the Mattermost server for these changes to take effect.

Now the SSL is working, I can login to mattermost using Android app, but I’ve no idea on how to renew the SSL now. Hereby attached the config.json of my mattermost setup.

Please advise, thank you.

Best regards,

kong

@kongyc870320 @Urge4Vert Are you using the latest Mattermost Android version (v1.8)? We have heard other reports of Mattermost not working on Android on 1.8 in the past few days, so I just wanted to confirm.

I’m using the Android app version 1.8 and can confirm it is NOT working

Hi,

I tried android Mattermost app 1.8 and Mattermost classic, all didn’t work.

Throughout my finding , I believe the ssl cert and key info are stored under /opt/mattermost/config/letsencrypt.cache/. By removing the file, it will regenerate or renew the certificate.

I’ll let our engineers know, I just have one more question - are you able to access the Mattermost server from the mobile web browser? @kongyc870320 @Urge4Vert

I can confirm that on the same mobile device I’m able to connect to the server using Chrome, and log in successfully. The app just keeps say ‘cannot connect’

Also, I see on the app reviews in Google Play store it seems many people are having this same issue.

@kongyc870320 @Urge4Vert Can you also help verify the ssl chain using ssllabs.com?

I did not see any issues in the report, and all Android versions reported back successfully

Hi

Browser in android phone is able to connect to mattermost, just the android app is unable to connect.

Hi @kongyc870320
Could you see this post and try if the solution there will work for you?

I just noticed that in your original post, you’ve stated your server URL as https://chat.3lc.my:8065/. However, when I tried that link, it’s not reachable. I’m able to connect at https://chat.3lc.my/ that is without port 8065. Could you confirm if you’re able to connect on Android to https://chat.3lc.my/?

UPDATE: Add link to post mentioned - Mattermost Android App (1.8.0) not starting up

There’s still no update on this? Are you reading your Google reviews about the app? There are three reviews in the last 15 days saying its not working after updating the server.

Hi @Urge4Vert,

Thank you for the question - I asked our engineers last week to take a look and Saturnino suggested above to check the server URL ^.

@kongyc870320 have you tried Saturnino’s suggestion above and have you seen any changes? If not, I’ll have our engineers take a further look on this.

@amy.blais thanks for the update. I’m using nginx as a front end as suggested in the docs, so there is no port issue.
The suggestion by @saturnino does not apply to my situation.

my two cents:

Have you checked and confirmed that the ssl cert has a complete chain? you can use the tools from http://ssllabs.com to test it.

The Android app is very picky when it comes to that, so an incomplete SSL chain would cause the app not to connect.

It was the certificate chain issue. This took awhile to troubleshoot because everything had been working before, including the Android app until the most recent upgrade. Also, running it behind nginx as recommended and the cert chain is a bit different on nginx

Once I merged the chain and the cert the app is working again.

Glad to hear that!

@kongyc870320 Has this been resolved for you or have you still been experiencing connection issues? Let me know if you need any assistance!

  1. Check https://www.ssllabs.com/ssltest/index.html first for the SSL cert issue and it should comment that its incomplete/wrong ordering chain.
  2. Check https://ssldecoder.org/ for a suggested correct ordering of SSL cert chain and save the recommended ordering as an .pem file
  3. Load into your mattermost server and perform sudo service nginx restart