Mobile deployment troubleshooting#
I keep getting a message “Cannot connect to the server. Please check your server URL and internet connection.”#
First, confirm that your server URL has no typos and that it includes http://
or https://
according to the server deployment configuration.
If the server URL is correct, there could be an issue with the SSL certificate configuration.
To check your SSL certificate set up, test it by visiting a site such as SSL Labs. If there’s an error about the missing chain or certificate path, there is likely an intermediate certificate missing that needs to be included.
Please note that the apps cannot connect to servers with self-signed certificates, consider using Let’s Encrypt instead.
Login with ADFS/Office365 is not working#
In line with Microsoft guidance we recommend configuring intranet forms-based authentication for devices that do not support WIA.
I see a “Connecting…” bar that does not go away#
If your app is working properly, you should see a grey “Connecting…” bar that clears or says “Connected” after the app reconnects.
If you are seeing this message all the time, and your internet connection seems fine, ask your server administrator if the server uses NGINX or another webserver as a reverse proxy. If so, they should check that it is configured correctly for supporting the websocket connection for APIv4 endpoints.
I’m not receiving push notifications on my device#
Please see our documentation on troubleshooting push notifications.
All my outbound connections need to go through a proxy. How can I connect to the Mattermost Hosted Push Notification Service?#
You can set up an internal server to proxy the connection out of their network to the Mattermost Hosted Push Notification Service (HPNS) by following the steps below:
Make sure your proxy server is properly configured to support SSL. Confirm it works by checking the URL at https://www.digicert.com/help/.
Setup a proxy to forward requests to
https://push.mattermost.com
.In Mattermost set System Console > Notification Settings > Mobile Push > Enable Push Notifications in prior versions or System Console > Environment > Push Notification Server > Enable Push Notifications in versions after 5.12 to “Manually enter Push Notification Service location”
Enter the URL of your proxy in the Push Notification Server field.
Note
Depending on how your proxy is configured you may need to add a port number and create a URL like https://push.internalproxy.com:8000
mapped to https://push.mattermost.com
Build gets stuck at bundleReleaseJsAndAssets
#
As a workaround, you can bundle the js
manually first with
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
and then ignore the gradle task with
./gradlew assembleRelease -x bundleReleaseJsAndAssets
No image previews available in the mobile app#
This can happen if the server running Mattermost has its mime types not set up correctly.
A server running Linux has this file located in /etc/mime.types
. This might vary depending on your specific OS and distribution.
Some distributions also ship without mailcap
which can result in missing or incorrectly configured mime types.
Messages with emojis aren’t being sent from the Mobile App#
This can occur if the server running Mattermost is configured with an incorrect character set. To resolve this issue, in the config.json
file under SqlSettings
, ensure that the DataSource
key is configured correctly, then restart the Mattermost server.
For example:
"SqlSettings": {
"DataSource": "<user:pass>@<servername>/mattermost?charset=utf8mb4,utf8",
[...]
}
See our Configuration Settings documentation for details on configuring the connection string to the master database.
Testing mobile push notifications#
Make sure to configure push notifications for your pre-built mobile apps, or for your custom built mobile apps.
Then use the following instructions to confirm push notifications are working properly.
Log in to your mobile app with an account on your Mattermost Server, which we’ll refer to as “Account A”.
(iOS) When the app asks whether you wish to receive notifications, confirm you want to receive notifications.
Confirm push notifications are enabled for “Account A”.
Have “Account A” put the app to background or close the app.
Using a browser, log in to “Account B” on the same Mattermost Server.
Open a direct message with “Account A”, and send a message.
A push notification with the message should appear on the mobile device of “Account A”. If the push notification does not appear, follow troubleshooting steps to look for issues.
Troubleshooting push notifications#
If you did not receive a push notification when testing push notifications, use the following procedure to troubleshoot:
In System Console > Environment > Logging > File Log Level, select DEBUG in order to watch for push notifications in the server log.
Delete your mobile application, and reinstall it.
Log in with “Account A” and confirm you want to receive push notifications when prompted by the mobile app.
Go to Profile > Security > View and Logout of Active Sessions to confirm that there is a session for the native mobile app matching your login time.
Repeat the procedure for testing push notifications.
If no push notification displays, go to System Console > Server Logs, then select Reload. Look at the bottom of the logs for a message similar to:
[2016/04/21 03:16:44 UTC] [DEBG] Sending push notification to 608xyz0... wi msg of '@accountb: Hello'
If the log message displays, it means a message was sent to the HPNS server and was not received by your mobile app. Please create a support ticket with the subject “HPNS issue” for help from Mattermost’s Support team.
If the log message does not display, it means no mobile push notification was sent to “Account A”. Please repeat the process starting at step 2 and double-check each step.
Important
To conserve disk space, once your push notification issue is resolved, go to System Console > Environment > Logging > File Log Level, then select ERROR to switch your logging detail level from DEBUG to Errors Only.
If push notifications are not being delivered on the mobile device, confirm that you’re logged in to the Native mobile app session through Profile > Security > View and Log Out of Active Sessions. Otherwise, the DeviceId won’t get registered in the Sessions table and notifications won’t be delivered.