HPNS Push Notification Issue using mattermost-mobile app built by myself (iOS only)

Hello, developers.

Summary
I have the problem with HPNS Push Notification on version 2.7.0 of mattermost-mobile app. However, the Android app version 2.7.0 does receive notifications, only the iOS version 2.7.0 gives the error message “Notifications cannot be received from this server”.

The mobile app version 1.55.0 receives notifications without problems on both Android and iOS, so it does not appear to be a problem with the Mattermost server or the push server.

This suggests that the problem is limited to Mattermost server 7.8+ and mobile app 2.7.0 for iOS notifications.

For TPNS, this error does not seem to occur.

After some research, I believe that the verification process performed by the v4 REST API of the Mattermost server, such as “ping”, is not working properly with mobile app ver 2.7.0 for iOS.

Please let me know if you know how to solve this problem.

Environment

Thank you.
Kengo Watanabe

This post may have a similar problem.

PS: I ran nginx on the mattermost-push-proxy server and proxied to https. In the system console > push notification, I specified “https:///” and mattermost-mobile 1.55.0 for iOS received the notification. However, mattermost-mobile 2.7.0 for iOS does not seem to receive it.

Hello Kengo,

Thank you for providing a detailed description of your issue with HPNS Push Notifications on the iOS version of the mattermost-mobile app.

From your description, it’s clear that you’ve done a great job troubleshooting the issue. It seems you’ve narrowed down the problem to the v4 REST API’s interactions with the mobile app version 2.7.0 on iOS and specifically with the Mattermost server 7.8+.

Given the details you provided, this issue might be a bug in the iOS app. It’s not unusual for different operating systems to handle APIs slightly differently, and it seems in this case that the iOS app isn’t properly handling the ‘ping’ from the server side.

Here are a few steps to help us move forward:

  1. Update the Mattermost Server: Although you’re experiencing this issue with Mattermost server 7.8.9, we have made a lot of fixes and updates in our later versions. Upgrading to the latest server (currently 7.8.12) might resolve the issue you’re experiencing.
  2. Update the Push Notification Server: As you’re using version 5.24.0, please consider updating to the latest version.
  3. Raise a GitHub Issue: If the problem continues after these updates, please create a new issue in our GitHub repository. When creating the issue, please provide all the details you’ve posted here to help our developers understand the problem.

I’m sorry for the inconvenience this issue has caused, and we appreciate your patience while we work to resolve this. The Mattermost community is important to us, and we’ll use your feedback to make improvements.

Best regards,
~Mattermost AI Assistant :robot:

[Disclaimer: This was an AI assisted response powered by Mattermost AI. Were any of the above suggestions inaccurate? Let us know by replying to this comment!]

Thank you for reply.

We have updated various servers to new versions.
The Github docker repository configuration (env.sample) was version 7.8 of mattermost, but I changed the target to the latest 9.1.

Environment #2

  • Mattermost Mobile App
    • Use mobile repository (GitHub - mattermost/mattermost-push-proxy)
      • ver 2.9.0
  • Mattermost Server
    • Using docker repository (GitHub - mattermost/docker: Install Mattermost server via Docker 1)
      • Mattermost Version: 9.1.0
      • Database Schema Version: 113
      • Database: postgres
      • with nginx
  • Push Notification Server
    • Using HPNS (GitHub - mattermost/mattermost-push-proxy)
      • version 5.26.0
      • using https

However, no push notifications were received to the mattermobile App version 2.9.0 on iOS.

I would like to message the Github issue at a later date.
If any of you developers have any insights, please let me know. Thank you in advance.

This issue has been resolved. The reason.
It was due to a BadToken error caused by the difference between the development/production version of the device token for push-proxy.

Until mattermost-mobile ver 1.55.x, notifications were sent to the development version of the App even with the production version of the push-proxy token, but since ver 2.7.x, notifications are no longer sent to the development version of the App.

Thank you very much.