No Push notifications on mobiles


#1

Hi
Trying Mattermost 4.2 server on a Centos 7, everything OK but no push notifications.
Followed the docs about enable push notifications on our mobiles but when we try to send notifications (via the @all mention) they only goes via e-mail and there’s nothing on the logs about the Push notifications.

Pleae let me know how we can try to debug that.
Thanks


#2

Hi @dartvader

Thanks for your feedback,

You mentioned you’ve followed the docs but just wanted to check that you’ve been through the troubleshooting push notifications section?

If you’ve already tried this, let us know and we can look further into your issue.


#3

Yes, already checked all, we have a channel with 6 persons and when we mention @all, nothing comes out in the logs (at DEBUG level) about push notifications (email notifications are disabled).

Please let me know, we are a cloud provider and this is an evaluation for a customer company that is interested in buy the EE, obviusly they want to test the app for a few weeks.

Thanks


#4

@dartvader What are your push notification settings set to in Account Settings > Notifications?

Also, are you using the apps from the App Store?


#5

Hi, all the settings are ok, like in your screenshot on all users prefs.
we are using the app from Android market.

Thanks


#6

@dartvader Sorry for the delay in responding,

One more question: What is Enable Push Notifications set to in System Console > Mobile Push?


#7

Hi

“Use IOS and Android apps on Itunes and google play with TPNS”

it is wrong ? If i try to change it to “Manually enter…” with
"http://push-test.mattermost.com" it will revert to “Use iOS…” when i
save …

Any clue ?


#8

@dartvader Three more questions and we’ll try to reproduce this on our end:

  1. Are you using the “Mattermost” or “Mattermost Classic” app?
  2. Which Android devices do you use?
  3. Have you set System Console > General > Logging > File Log Level to DEBUG, yet still don’t receive any errors in the logs?

Thanks for your patience here.


#9
  1. “mattermost”, latest version

  2. varies, 6 different terminals mixed android 6 and 7

  3. Yes


#10

I know there is a bug in 4.3 about saving the settings for push notifications, can you try and set them manually or check your config.json file to see if its actually set?

Have you tried only mentioning one person? does that person get the push notification?

What do you see if you go to the user’s Account Settings -> Security -> View and logout active sessions? does it have a Native app listed?

You may want to check if the devices are actually registering for your users, the above step should tell you but you can check the database under the Sessions table and see if you have the DeviceId column set


#11

Hi, elias.

I set EmailSettings.SendPushNotifications manually, but I saw cannot parse error. I think EmailSettings.SendPushNotifications as boolean, so I cannnot set string. I use mattermost 4.3.1.

“SendPushNotifications”: “tpns”

# cat config.json | grep Push
        "SendPushNotifications": "tpns",
        "PushNotificationServer": "",
        "PushNotificationContents": "generic",

# systemctl start mattermost

# systemctl status mattermost
● mattermost.service - Mattermost
   Loaded: loaded (/etc/systemd/system/mattermost.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2017-11-03 13:28:07 JST; 3s ago
  Process: 2726 ExecStart=/opt/mattermost/bin/platform (code=exited, status=1/FAILURE)
 Main PID: 2726 (code=exited, status=1/FAILURE)

Nov 03 13:28:07 172-020-000-165 systemd[1]: Started Mattermost.
Nov 03 13:28:07 172-020-000-165 systemd[1]: Starting Mattermost...
Nov 03 13:28:07 172-020-000-165 platform[2726]: Error decoding config file=config.json, err=1 error(s) decoding:
Nov 03 13:28:07 172-020-000-165 platform[2726]: * cannot parse 'EmailSettings.SendPushNotifications' as bool: strconv.ParseBool: parsi... syntax
Nov 03 13:28:07 172-020-000-165 systemd[1]: mattermost.service: main process exited, code=exited, status=1/FAILURE
Nov 03 13:28:07 172-020-000-165 systemd[1]: Unit mattermost.service entered failed state.
Nov 03 13:28:07 172-020-000-165 systemd[1]: mattermost.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

“SendPushNotifications”: “mtpns”

# cat config.json | grep Push
        "SendPushNotifications": "mtpns",
        "PushNotificationServer": "",
        "PushNotificationContents": "generic",

# systemctl start mattermost

# systemctl status mattermost
● mattermost.service - Mattermost
   Loaded: loaded (/etc/systemd/system/mattermost.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2017-11-03 12:58:26 JST; 1s ago
  Process: 1853 ExecStart=/opt/mattermost/bin/platform (code=exited, status=1/FAILURE)
 Main PID: 1853 (code=exited, status=1/FAILURE)

Nov 03 12:58:26 172-020-000-165 systemd[1]: Started Mattermost.
Nov 03 12:58:26 172-020-000-165 systemd[1]: Starting Mattermost...
Nov 03 12:58:26 172-020-000-165 platform[1853]: Error decoding config file=config.json, err=1 error(s) decoding:
Nov 03 12:58:26 172-020-000-165 platform[1853]: * cannot parse 'EmailSettings.SendPushNotifications' as bool: strconv.ParseBool: parsi... syntax
Nov 03 12:58:26 172-020-000-165 systemd[1]: mattermost.service: main process exited, code=exited, status=1/FAILURE
Nov 03 12:58:26 172-020-000-165 systemd[1]: Unit mattermost.service entered failed state.
Nov 03 12:58:26 172-020-000-165 systemd[1]: mattermost.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

How should I set up?

Regards,


#12

Hi @sig9

the configuration should be something like this

for TPNS

"SendPushNotifications": true,
"PushNotificationServer": "http://push-test.mattermost.com",
"PushNotificationContents": "generic",

or for MPNS

"SendPushNotifications": true,
"PushNotificationServer": "https://push.mattermost.com",
"PushNotificationContents": "generic",

the values for PushNotificationContents can be:

  • generic_no_channel
  • generic
  • full