-
Notifications
You must be signed in to change notification settings - Fork 17
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
Push notifications don't work #68
Comments
Thanks for the report. This was an ongoing issue with Tusky for some users (and not others). Medium term I plan to add support for Google's notification system (if the app is downloaded from the Play store), which will hopefully resolve these issues. I also want to show the notification fetching mechanism on the about screen (#36) which might help troubleshooting. In the meantime, some things to check (I know you've already mentioned some of these, I want to be able to point other people at this issue as well so they have some things to try). Confirm you haven't disabled Pachli notificationsOpen "Account preferences > Notifications". This should take you to the Android (not Pachli) notification settings for Pachli. The relevant switches should be set to the on position. If any of them show text like "About 1 notification per day" or similar that's a good sign -- it means that Pachli is sending notifications, even if your device is not displaying them to you. Other apps checking notifications?If you have other apps checking notifications, do they update the notifications marker with the newest notification they have seen? I know Tusky does, I'm not sure about Fedilab. If so, this is one explanation -- to avoid creating duplicate notifications if you have multiple apps installed Pachli won't create Android notifications below that marker. Suppose you have 10 Mastodon notifications, so the marker is "10". Two more notifications come in, the marker is now "12". Then Tusky checks notifications first, shows two, and sets the marker to 12. Pachli checks notifications some time later, sees that the marker is 12 and there are no newer notifications, so it won't create duplicate notifications. In this context "other apps" includes the Mastodon web app. So if you have that open in a browser tab somewhere it might be periodically checking for notifications and resetting the marker before Pachli sees the notification. If using ntfy...Is app.pachli in the ntfy subscribed topics?Open the ntfy app, and review the list of subscribed topics. You should see entries labelled "app.pachli (UnifiedPush)". If you don't, Pachli hasn't registered correctly with ntfy for some reason, and is using pull notifications, where it will check every ~ 15 minutes for new notifications. Is ntfy excluded from battery optimisation?If you do see one or more entries in ntfy for app.pachli, check that ntfy is excluded from battery optimisation. Follow the instructions below to open ntfy "App info", and make sure the battery usage setting is "Unrestricted". If not using ntfy...If ntfy is not installed Pachli will check every ~ 15 minutes for new notifications. For this to work reliably battery optimisation for Pachli must be disabled on the device. How you do this is probably different from device to device. On my Pixel 4a I
I appreciate it's not much comfort if it's not working for you, but I just did that on my Pixel 4a, with ntfy installed, and it shows that Pachli battery life is "optimised", but I still get timely notifications. |
Hi Nik, thanks for the link to the issue #68 after my initial inquiry via Mastodon this afternoon. Firstly I am running an Samsung with Android 10 - i don't know if you need that, but i have included it anyway. First I did have Megalodon installed but i had stopped the apps notifications and then force stopped the app. Next, I checked Settings > App notifications > Pachli All Notifications were marked as being in the ON position, I checked back in on App Notifications, and many of the items for selection have further sub menus - 'Background activity' was one that does. Alert was already checked, but Show as pop-up was OFF > I set this in the ON position. then came back out, rebooted the phone and there are still no notifications coming to the phone I am not using ntfy - However I have gone through the 'use details' for the Pachli app and disabled battery optimisation - fingers crossed. -- Ok, this seems to have made a difference, I still don't get a notification that stays on the screen, but i get an audible notification that tells me that an app on my phone has received a notification, (as I set pachli with a different audible tone to my messaging apps I know that it was the app that was notifying me - However, there was no notification on the home screen, in the notifications bar at the top of the screen, and no notification within the app to show that something had been received and was waiting. I hope this helps - I thought i was pretty good at getting stubborn apps working on android, but even this has me stumped. |
Thank you for your tips. I'm keeping on trying without any success. I also removed any other Mastodon app could interfere with the notifications but nothing seems to work. In my case the phone doesn't detect any notifications in Android settings for Pachli. |
You don't see something like this (except with your account listed, not @[email protected])? ![]() |
(I'm sorry if my english isn't clear but i'm not expert in this type of things) Yes! But, as you mentioned before ("If any of them show text like "About 1 notification per day" or similar that's a good sign -- it means that Pachli is sending notifications, even if your device is not displaying them to you."), my phone doesn't show anything at all. |
I'm having the same issue (not using ntfy, Pixel 3a, Android 12). If I had to guess, I'd say the main suspect is the way notifications are scheduled. I often had issues with periodic work requests and the workaround that seemed to improve things a bit was to replace them with one time work requests that reschedule themselves in the future when they finish. You could do that by having a chain of work where the last worker just reschedules the whole chain (with a delay), and making sure the chain itself is unique and uses the KEEP flag. I'd do a PR myself but the license doesn't allow me, I'm happy to test dev builds on branches though :) |
Any news on this issue? I'm still not receiving push notifications, could it be due to E.os on my samsung? |
I'm having the same issue with ntfy on a Realme 7 device. |
Thanks for the extra info folks, I appreciate this is frustrating if you encounter it. It's frustrating to debug too, because I can't reproduce notification problems on my physical devices or in emulators, with and without ntfy. I'm going to make some changes that surface additional information about the notification mechanism Pachli is using, how frequently it is checking for notifications, and what the results of those checks are to make this easier to track down. That should give more useful data about what's going on. |
FYI: those changes I mentioned will be in the next release of Pachli Current. https://mastodon.social/@pachli/111909302213877669 When that's done I'll be asking people to report back here with the results so we can fix this once and for all. |
@Antitoxic0 @fourlastor @rluetzner @RobinChapman The latest version of Pachli Current (this will be included in the next Pachli release as well) has a new "Notifications" tab on the "About" screen. Go there and you'll see many details about how Pachli has determined how to get notifications, and logs. You can also download the report and attach it to a bug report. https://pachli.app/pachli/2024/02/17/debugging-notifications.html has many more details about how to interpret the results and save the information. Please can you review that and try the steps that are suggested there. If none of those fix the issue for you please use the "Download" feature to download a report and attach it to this bug so I can investigate further. In the course of putting that together I discovered what seem to be a number of misfeatures in the original Tusky notifications code that I hope to fix, but getting those reports will help me determine the areas to focus on first. If you're not already using Pachli Current you can get it from https://pachli.app/download/#pachli-current. |
I figure this is a better place to discuss what you mentioned in tuskyapp/Tusky#3935 I notice the little pop-up that says Pachli-Current is re-registering with UP-FCM every once in a while when I start up the app. I haven't particularly noticed that Pachli delivers notifications any later than any other Mastodon client app. |
With Pachli Current, I'm receveing push notification, just like that! Without any problem (I use ntfy). Instead with Pachli stable, 2.2.0, none; but i understand this version doesn't get the fixes still. Do you need my report anyway? EDIT post Pachli 2.3.0 release: I confirm that notifications works for me, just like Tusky. With Pachli battery optimization off and NTFY i receive every notifications, with battery optimization on i receive them once in a while or when i enter the app. Thanks @nikclayton for your work! |
Holy cow. I also just got my first actual Notification from Pachli after installing 2.3.0. |
I wanted to report that I'm also receiving pull notifications succesfully since version 2.3.0. Just to clarify, on previous versions pull notifications didn't work for me. And on version 2.5.2 they still work. Thanks! |
Notifications using push provider (ntfy/conversations) worked until there was a hikup with the provider. Now Pachlii log shows all accounts have a unifiedpush URL but can't be subscribed. |
Yep. I've started properly looking at the notification code and I think there are a number of things to change to make the user experience more seamless. I won't have any of this ready for 2.7.0 (coming next week) but it's top-of-mind for 2.8.0. |
This should be a lot more reliable from 2.8.0 onwards. @ghtux that includes being able to re-register with the UP distributor, and fixes to the UnifiedPush libraries. https://pachli.app/pachli/2024/08/30/2.8.0-release.html describes situations where notifications might still be delayed. I'll keep this open for a week or so for reports of other problems, then close if there's nothing. |
I don't know if it's the right place to report my issue, cause probably it depends on my phone.
I can't get push notifications neither with NTFY (Tusky or Fedilab work correctly on my phone), nor without it.
I tried to switch ntfy servers and disable battery optimization without any success. I'm using a Samsung s8 with E os
The text was updated successfully, but these errors were encountered: