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.36k forks source link

Mobile app - Android app does not connect to self hosted server. #6643

Open itsharis opened 2 years ago

itsharis commented 2 years ago

Summary

Android app does not connect to self hosted server.

Environment Information

Steps to reproduce

Download the beta app from playstore or the regular app. Enter the URL of the self hosted server. (using HTTP) Type in the display name. Press connect

Public server community.mattermost.com works as expected.

Expected behavior

App should connect to the server and go to login screen with username/password

Observed behavior (that appears unintentional)

What did you see happen? Please include relevant error messages, screenshots and/or video recordings.

Screenshot_20220914_011801

Screenshot_20220914_012101

amyblais commented 2 years ago

@itsharis Have you had a chance to take a look at the troubleshooting docs if they help https://docs.mattermost.com/deploy/mobile-troubleshoot.html#i-keep-getting-a-message-cannot-connect-to-the-server-please-check-your-server-url-and-internet-connection?

itsharis commented 2 years ago

I just had a look at it. I dont see anything similar to the issue i am having. There is no proxy in my case and i am trying to get the android app to connect directly to the mattermost docker container.

amyblais commented 2 years ago

Were there any errors with the SSL certificate configuration?

itsharis commented 2 years ago

I dont have SSL configured. Trying this over HTTP currently.

amyblais commented 2 years ago

Would you be open to raising this issue at https://community.mattermost.com/core/channels/peer-to-peer-help? One of our community or staff members may be able to help troubleshoot this.

larkox commented 1 year ago

@itsharis Has this issue been resolved?

itsharis commented 1 year ago

I haven't had the chance to try it again using the self hosted setup. Please close if needed.

karliwalti commented 1 year ago

This issue escalated for us to the production app that has just been released on the android store. On the already existing server, messages are no longer received. Interestingly push notifications arrive.

Screenshot_20230131-084758

larkox commented 1 year ago

Closing (completely, not sending to the background) and opening the app does show the new messages? Do you see a banner saying "Server unreachable" or something similar?

ssc85 commented 1 year ago

Same error occurs in my scenario. App cannot connect to my self hosted server. I also upgraded to the latest server version to be sure it is not sever related...... :(

Handy: Samsung Galaxy S10E App Version: 2.0.1 Mattermost Server: 7.7.1 SSL: Yes, Lets Encrypt certificate

c0deright commented 1 year ago

try connecting with the https protocol and not the http protocol

ssc85 commented 1 year ago

I have just tested it with a new Samsung Galaxy S22 - same problem. Probably this has something to do with the Lets Encrypt certificate?

n-gao commented 1 year ago

Is there any update on this issue? Several users in our team cannot use the app anymore. We use a let's encrypt certificate which is correctly setup according to the linked test site.

larkox commented 1 year ago

@n-gao You can reach me on Mattermost community and send me the link of your instance. That way I can debug what exactly is impeding the connection. Same for anyone else in the thread :smile:

n-gao commented 1 year ago

Our issues were related to ipv6, if you're on an ipv6 network and your server is only listening to ipv4, the app doesn't work. We fixed the issue by listening to ipv6 as well.

ssc85 commented 1 year ago

We also get managed to find the issue. I had a trailing / at the hostname which was not working. Unfortunately every URL change was useless unless I removed and reinstalled the app. After that it worked. Thanks to @enahum for your assistance!