-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not receiving notifications on the F-Droid version with unified push #3031
Comments
Hello @K4LCIFER , thanks for reporting. For some reason, sometimes an error occurs when registering the pusher. I am investigating it. To unblock you, can you navigate to Setting/Notifications then scroll to the bottom. If the current push provider is displayed and in Error, you can click on it and select again "Ntfy". It should help. Also note that if your a matrix.org user, push may be rate limited by the ntfy server. It's also possible to run the notification troubleshoot tests to see what could go wrong. |
I don't appear to have any push provider information on that page.
I don't think that's the case here. I've received notifications from other services at higher rates through Ntfy than through Element.
It appears that there is no issue and it is able to find the UnifiedPush provider. The issue is still persisting. |
Same issue, GrapheneOS with self-hosted ntfy.sh instance that has other notifications working but not from Element X. Also same results from the troubleshoot tests. |
My issue has been resolved. Essentially, my push server was behind a VPN which my server could not access. I would consider it a bug that the notification troubleshooter reports the "test push loop back" as being completed, when the server could not do this. |
The This is discussed at matrix-org/matrix-spec-proposals#4078 |
I'm also facing this. Element receives the notification, but element x does not. All the notification troubleshooting tests pass. I'm running calyox os on a fair phone, and the latest version of element x from the playstore |
same problem here, using F-Droid version |
I hope that the severity of this issue is labelled rather high — it severely impacts the usability of the app. |
I've tried both the Play Store version of ntfy and the F-Droid version, both are not giving me notifications, except for when I use the troubleshoot notifications button in Element X, or when I use Firebase. Where is the issue? Subscribing to a new topic on ntfy and posting to that with curl does give me notifications for that topic. Using the Fedilab Mastodon client with ntfy also does work. |
Can confirm that unifiedpush with ntfy is not working with the version on f-droid. ntfy correctly shows the topic, but nothing comes through. I'm using the default server for ntfy.sh. |
I've tried switching to FluffyChat after noticing this issue but that client has the same issue. No notifications at all... so I guess it's related to ntfy (or it's default instance) and not Element X? |
If so, it would probably be the actual service and/or app and not the default instance as @alnmy mentioned that they have the problem (they self-host a ntfy instance). |
Nope, alnmy said 'Essentially, my push server was behind a VPN which my server could not access.'. So, they had a completely different problem. I am pretty sure the 'problem' is on the ntfy.sh side. Try a different ntfy server (eg https://ntfy.envs.net/ ) and see if that one works any better. |
In my case, we can rule out the ntfy server since the notifications come through for element, but not element x Edit to clarify that the messages come through on element x, but I get no notification for it. When I open the app, I can see a green dot indicating that there is a new message in a conversation, but there was not system notification about it |
Are you sure that the notifications come through ntfy? I've never had to use UnifiedPush with the "old" Element app because it had a timer-based notification system under the hood. Edit: I'd actually really like to get the timer-based notification system in Element X too. Would save me the hassle from having to use UnifiedPush/ntfy at all since no other app I use requires those. |
Definitely coming through ntfy. The battery drain from constant polling lead me to add ntfy to my stack. That said, it's been a few days since I've had any dropped notifications at this point |
You're receiving notifications for Element X through Ntfy? I haven't received a single notification with Unified Push and Ntfy since I opened this issue. It also seems that I'm not receiving notifications on element-android with Ntfy. |
This exact issue is more related to matrix-org/matrix-spec-proposals#2821 (which has to be recreated) |
You should put Element X as This is because:
TLDR, you need BOTH the push provider AND Element X to be unrestricted regarding battery optimisation. |
@bmarty: it may be useful to warn the user of that and propose to the user to open the optimisation battery screen directly, when an UP provider is used instead of FCM. |
I'm not sure that's the issue. I have "Allow background usage" enabled for both Element X and Ntfy, yet I am receiving no notifications. |
Yeah battery optimizations has nothing to do with it, it's the first thing I tried. |
It can help to change the setting for battery optimisation when the application is in background, or even not running, but sometimes the Push are not received even when the application is in foreground, so screen on, with charger plugged in, fast Wi-Fi, etc. |
I experience this issue ( Here a portion of the log I gathered fom ntfy (the subscription is added by Element X on device boot if removed) while I run the self tests for notification in
It looks like the address can't be resolved. Let me know if additional info are needed. |
How did you end with ntfy trying to connect to "io.heckel.ntfy"? Wipe ntfy data and try again ? |
Even if I manually delete the subscription from |
Can you try to wipe ntfy data and try again ? |
Cleared the |
Great. If you are sure you haven't touch anything regarding the server setup on ntfy android, can you open an issue on their repo to follow this issue ? To give more detail the issue is "ntfy tries to connect to https://io.heckel.ntfy/" and give the stacktrace you printed earlier. |
I'm not sure what the deal is with my app, but I can't get any notifications to appear in my Element X app when using ntfy (default server) + UnifiedPush. Even with the app in the foreground. I haven't received a single notification from Element X outside of the notification troubleshooter. Things I've done:
Would love to see this improved and am happy to help provide anything needed to contribute toward that. |
One more thing to try: Use another ntfy server, such as ntfy.schildi.chat to make sure you don't run into rate limitations on the ntfy.sh server side. |
I tried that server as well as https://ntfy.envs.net as suggested above, each for a full day with dozens of messages coming in direct chats and 1000+ messages coming in public group rooms (all settings for both group chats and direct chats set to "all messages" with no custom notification settings on any room). Still no notifications. |
This seems to be the answer! During doze, the notification is properly received through UnifiedPush (ntfy-sh) and passed to Element X, but Element seems to be unable to retrieve the actual notification from the server (
Android Developers: Power management restrictions states that an app's network is restricted to a window at a specific interval during doze. On the other hand, Firebase Cloud Messaging has no restrictions for high priority notifications during doze. I am not sure if this is what @MatMaul meant by "when an app is wake up by FCM, it is given special treatment by the OS and can access the network and do stuff in the background for a certain period of time". I may be misunderstanding @MatMaul and/or the Android Developers docs. Regardless, if I enable unrestricted background usage for Element X, everything works: This feels wrong, but if FCM has special permissions in Android (even AOSP!?), I guess there isn't much we can do as long as the message content is fetched and decrypted separately from the notification (as it should). |
Sadly this doesn't solve the problem for me. As mentioned above I already tried this: both apps are set to unrestricted and I still don't get notifications. One thing to note is that even though I've set this and opened Element X multiple times, it still doesn't appear in the "Active apps" list in the bottom circular tile in the Android drop-down menu, which is suspicious to me. |
Element X also does not appear in the "Active apps" list for me - but ntfy does. I would encourage you to check if ntfy correctly receives and dispatches the notification through |
@seankhl after changing the default ntfy server, did you delete the active subscription for Element X then launch Element X again so that it creates a new subscription to the new ntfy server? |
See-also: #3571 |
The error raised by EAX when it tries to go to the foreground when it can't (so we need to unrestrict it) will be fixed when EAX will be using the next version of UnifiedPush library, and users will use a distributor following the recent spec updates The library has a release candidate for the new version: 3.0.0-rc2, and the changes can be reviewed here: https://codeberg.org/UnifiedPush/android-connector/pulls/2 Technical details
|
It would be a good solution to also:
This is also useful for FCM since they downgrade the high priority messages to normal priority if the app is not surfacing time sensitive content to the user (see https://developer.android.com/develop/background-work/services/foreground-services#bg-access-restrictions) |
My notifications appear to all of a sudden be working now with 0.7.2 (maybe even 0.7.1, but I'm not completely sure on that). I haven't changed any config with Ntfy, or Element X. They're just working. |
Same for me, a few hours ago I suddenly got a bunch of messages. This was approximately 17:00 UTC on Sunday (2024-11-03T17:00:00). At that time, I was on 0.7.1, so this happened without any modification to the software stack on my end. |
This does not seem universal. When I run Settings > Notifications > Troubleshoot, I still get "https://fcm.distributor.unifiedpush.org/_matrix/push/v1/notify is not a Matrix gateway". |
I hesitantly want to say the same. I got all the notifications while it seemed that I was on 0.7.1, but I was in the process of updating to 0.7.2 when I got them, so I'm not 100% sure if the same is the case for me or if something had been changed in the update process. |
This error sounds unique to what this issue is reporting. I could be wrong, but that seems like something different. |
I'd like to clarify that I use the default ntfy back-end. So just install the ntfy app and set it as the push provider, no further config. |
You have this issue: #3571 |
* I suspect a bug where rejected keys are not renewed, they are removed by synapse but I'm not sure EAX re-register the key: https://github.com/element-hq/synapse/blob/c705beebf7e95f25624ec38280192d96bc207626/synapse/push/httppusher.py#L368 |
Should this issue be closed since notifications are now being received via unified push? However, I feel that some official explanation for why it's working all of a sudden should be first stated before this issue is closed. |
I was not receiving notifications even though the unified push topic was being added to ntfy and the troubleshooter was passing. I was previously running Fluffy chat, kept it installed in case I decided to switch back, but disabled its notifications within the app. This had the unfortunate side-effect of disabling all unified push channels, including the one added by Element X. Re-enabling notification within Fluffy chat resolved it. If you need to disable notifications for Fluffy chat, you can do it from the native android app notification settings without disabling unified push entirely. This is an edge case, but posting here just in case it helps anyone. |
Steps to reproduce
Outcome
What did you expect?
I would expect to receive a notification.
What happened instead?
I didn't receive a notification
Your phone model
Google Pixel 6
Operating system version
Android 14
Application version and app store
0.4.14
Homeserver
matrix.org
Will you send logs?
No
Are you willing to provide a PR?
No
The text was updated successfully, but these errors were encountered: