[solved] No push notifications - device does not register to push proxy (?)

Hi,

I have been using Nextcloud (shared hosting) for a few years and I have kept the server and the clients up to date. I have never been abel to get the push notifications to the Android clients (Nextcloud and Talk) to work on my server, whereas they do flawlessly when I use the demo.nextcloud.com test server.
To me, this points to an issue with my server rather than with my device. I read a lot of similar threads here and on github, but I cannot get any push notification on the Android clients.

Nextcloud (server) version : 18.0.2
Nextcloud Talk (server) version : 8.0.7
Nextcloud Notification (server) : 2.6.0
Server IP address: 146.88.234.47

Device : Xiaomi Redmi Note 8 Pro, Android 10
Nextcloud (android) : 3.11.0, from Google Play Store
Nextcloud Talk (android) : 8.0.8, from Google Play Store

I have tried clearing cache and data on the Android device apps, uninstalling and reinstalling a few times the apps, unabling and disabling 2FA authentication, using admin and non-admin accounts, without success. Again, using demo.nextcloud.com I get push notifications on this device e.g. when I receive a federated-shared document, without having to tweak anything e.g. battery management or notification parameters.

I guess the culprit is the device registration process. When I start from scratch (i.e. after deleting the entries in oc_notifications_pushtokens table, I see some hints in the server logs indicating that my device has correctly registered to my server:
[07/Apr/2020:13:39:39 +0200] “POST /ocs/v2.php/apps/notifications/api/v2/push?format=json&pushTokenHash=ed36(…)2eff&devicePublicKey=-----BEGIN%20PUBLIC%20KEY-----%0AMIIBIjANB(…)0A0QIDAQAB%0A-----END%20PUBLIC%20KEY-----%0A&proxyServer=https%3A%2F%2Fpush-notifications.nextcloud.com HTTP/1.1” 201 1027 “-” “Mozilla/5.0 (Android) Nextcloud-android/3.11.0”

Neihter the logs in the administration nor nextcloud.log show entries in the timeframe of device registration and push notification triggering.

According to the documentation I found about the push notifications subsrcibing process (https://github.com/nextcloud/notifications/blob/5a2d3607952bad675e4057620a9c7de8a7f84f0b/docs/push-v3.md), it looks like the 201 response means that the Push token has been correctly created, and needs to be sent to the Proxy. Indeed, a new entry in oc_notifications_pushtokens has been created.

So it looks like the next step (subscribing at the Push Proxy) might be the one that fails, but due to my limited technical knowledge I cannot test whether it is the case or not. Is there a way to check somewhere if the device is able to correctly communicate with the Push Proxy? Is it possible that there is a kind of blacklist preventing my server and the Push proxy to properly communicate?

Finally, in the Nextcloud Android App, when I click on “Notifications”, a message is displayed at the bottom reading “Push notifications currently not available”

Thank you for reading this lengthy post, hopefully someone will be able to shed some light on my issue. I appreciate your input :slight_smile:

Cyril

So it does not seem that this thread got much attention, but since I have found a workaround and there are several other threads related to issues with push notifications for Nextcloud and Talk Android applications, here are a few more steps:

  • I installed another instance of Nextcloud on the same shared server, created two users -> notifications worked (!)
  • I created a new test user on my first instance, and once registered on my device, the push notifications are working perfectly on my smartphone (!!)

So, at least in my case, I have been able to rule out the smartphone and its battery saving options, the nextcloud / talk / android apps versions, and the server configuration. It looks like my account was the issue, maybe because it was too old, maybe because I have used it accross several years, versions and smartphones? I guess I’ll never know, but hopefully this can help if someone has a similar issue in the future.