Impossible to access Mattermost from Android, but ok in Windows

Summary
When trying to access Mattermost from Android app it doesn’t connect.

Steps to reproduce
Mattermost Team 4.6. Centos 7. TLS on.
Works ok from Chrome in Windows.

Expected behavior
Working ok in Android app too

Observed behavior
We’re using https://mydomain.com:8065 to connect in Windows Chrome. It works.
This is our config:
“SiteURL”: “https://mydomain.com”,
“LicenseFileLocation”: “”,
“ListenAddress”: “:8065”,
“ConnectionSecurity”: “TLS”,
“TLSCertFile”: “cert.pem”,
“TLSKeyFile”: “privkey.pem”,
“UseLetsEncrypt”: false,
“LetsEncryptCertificateCacheFile”: “./config/letsencrypt.cache”,
“Forward80To443”: false,

Any ideas why it doesn’t connect from the Android App.
The error is:
"Can't connect, please verify the URL and your internet connection".

Thanks for your help

Hi @richilp,

Perhaps this mobile FAQ will be helpful?

Thanks Lindy.

The problem are not the nottifications, but the connection with the server.
It looks like a TLS problem, but it’s working with a windows navigator.

I don’t exactly what is it differente between the connection in a navigator and the conecttion with the app.

Thanks !!

@richilp,

Thanks for your feedback,

Perhaps the documentation for setting up TLS will be of assistance?

I think this is related to the broken certificates Let’secrypt with Mattermost.I’ll try with the new version

Ah, might very well be @richilp,

Let us know how it goes after the upgrade once released…

I’m using mattermost 5.4.0 and mattermost app 1.13.0 on android (latest releases) and i have exactly the same issue: when i activate TLS and i use a certificate released by let’s encrypt and manually added to configuration (setting use let’s encrypt:false) i can connect with a PC to mattermost server but app doesn’t work.

I have made several tries, with and without nginx server and using the APP the issue is present either on direct mattermost server and through the proxy.

Another interesting thing is that the app work well on first connection until i change android app. When i reopen mattermost app the issue happen and the “Can’t connect, please verify the URL and your internet connection” error appears. if i reboot the android phone nothing changes.

Another really strange thing is this:
if i make a logout on the app i can’t pass the first address and connection step but i have found a strange workaround: i have to close the app, i have to set https://demo.mattermost.com, click on connect reaching username and password windows, now i have to go back setting my mattermost server address where i put my (https) server address and magically i can pass over the connect issue, set username and password and access to public channel and it work and i can send a message.
When i’m in also push notification works.

My actual configuration is:
This is our config:
“SiteURL”: “https://mydomain.com”,
“LicenseFileLocation”: “”,
“ListenAddress”: “:8065”,
“ConnectionSecurity”: “none"
“TLSCertFile”: “”,
“TLSKeyFile”: “",
“UseLetsEncrypt”: false,
“LetsEncryptCertificateCacheFile”: “./config/letsencrypt.cache”,
“Forward80To443”: false,

Nginx active with “standard” configuration
let’s encrypt certificate manually generated and set (no automatic generation or renew)
both http and https active, with automatic redirect to https.
tls enabled
other parameters set as indicated on mattermost web user guide.

It seems that newer version of mattermost app and server doesn’t solve the issue.

any idea?

thankyou to all

Hi @Sabino,

Have you taken a look at our troubleshooting tips here: https://docs.mattermost.com/mobile/mobile-troubleshoot.html#i-keep-getting-a-message-cannot-connect-to-the-server-please-check-your-server-url-and-internet-connection?

Hello, i have tried that troubleshooting guide and tried on two different smartphones but the issue is persistent and the behaviour is the same across devices, connections, app (both Mattermost and mattermost classic).

I have installed three different machines on three different VM, without solving the issue.

I think it’s an app issue.

Bye

Sabino

Hi @Sabino,

Can you send over the results from the SSL certificate test and I can take a look if there’s any issues? You can email it to me at amy.blais@mattermost.com.

hello ladies and gentlemen,
i have the same problem here, in browser and ios app no Problems , but in android app always getting the error: Can't connect, please verify the URL and your internet connection

and in Server LOG:

{“level”:“info”,“ts”:1542197622.9709668,“caller”:“http/server.go:1763”,“msg”:“http: TLS handshake error from X:X:X:X:X:53997: remote error: tls: unknown certificate”,“source”:“httpserver”}

Setting up the System on Ubuntu 18.04

We had this working in Centos 7, Mattermost 5.4 and Let’sEncrypt
If you want I can paste the Mattermost config and Nginx.