Skip to content
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 received late #4393

Closed
TheSunCat opened this issue Nov 2, 2021 · 6 comments
Closed

Push notifications received late #4393

TheSunCat opened this issue Nov 2, 2021 · 6 comments
Labels
A-Notifications O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Needs-Info

Comments

@TheSunCat
Copy link

Steps to reproduce

  1. Receive a message from someone
  2. Wait for a few minutes
  3. Maybe receive a notification, or not at all

Intended result and actual result

What did you expect?

I expect to receive notificatons for messages on the Android app, just like I do on the desktop app.

What happened instead?

I rarely receive notifications on time, they are usually delayed by a few minutes or I don't receive them at all.
On a friend's device, they don't receive notifications at all until they open the app. Battery optimization is not set to "Restricted"

Your phone model

Google Pixel 3a

Operating system version

Android 12.0

Application version and app store

Element version 1.3.3 [30103032]; olm version 3.2.4 from Play Store

Homeserver

allpurposem.at

Will you send logs?

No

@TheSunCat TheSunCat added the T-Defect Something isn't working: bugs, crashes, hangs and other reported problems label Nov 2, 2021
@Penguin-Guru
Copy link

Penguin-Guru commented Nov 14, 2021

I'm having the same issue on Graphene. Pixel 5. Android version is also 12. I almost never get notifications, but one of the few I did get was on my phone when I woke up so they may just be very delayed. Darkmaster helped me trouble-shoot in the Element Android room but in the end we couldn't figure it out. The notification bubbles on rooms in the Element app do appear when the app is opened so that much is working.

System settings:

  • Apps -> Element -> Battery -> "Manage battery usage" is set to "Unrestricted".

  • "Battery saver" is disabled (system wide).

  • Developer settings should all be default. "Background check" does not list Element. Background process limit is standard. Element is listed as "Exempted" in "Standby apps". "Don't keep activities" is disabled.

  • I have not installed or otherwise used any backup/restore apps.

  • Typing that *#*Fix logging for callSelect #4636#*#* into my dialer and watching the usage statistics confirms that Element did not run for at least two
    minutes after I closed it, which I assume it should with 60 second polling set (see below).

In the app:

  • Notifications enabled for account and session.

  • Default notifications checked for direct messages and encrypted direct messages, then also groups and encrypted groups for testing.

  • Both noisy and silent notification settings should be default.

  • Background sync mode is real-time with 60 second delay and 6 second timeout.

  • Start on boot is enabled and I did try restarting at two points.

  • Troubleshoot notifications seems to work fine.

  • Legacy init sync did not help.

@ouchadam
Copy link
Contributor

for some context, whilst the app is open and in the foreground it continuously checks for new messages and they'll appear as notifications, which means it's possible to receive messages without push working correctly


@Penguin-Guru it sounds like you're encountering the fdroid background sync issue #4298 which will hopefully be fixed by 1.3.7


@RealTheSunCat could I ask for some extra information to help debug this?

The first thing to check is if the network pushes from Sygnal + Google Play services are coming through consistently, this can be checked by

  • Enabling developer mode and show debug info on screen and check if the push counter increments (top right) at a reasonable rate, for me it usually takes between 1 - 5 seconds for the push count to increment when receiving a message
SETTINGS ROOM LIST
Screenshot_20211116_104038 Screenshot_20211116_104051
  • If the count doesn't increment or increments but there's no notification, try going to the room/DM -> settings -> notifications and switching notify me for to none and back to all messages. This will override the cross client push rules, if this fixes the issue it suggests that we need to revisit this area

  • if the count goes up and works fine whilst the app is in the foreground, what happens when receiving a message whilst the app is in the background? (but the device is still active), when relaunching the app has the push counter incremented?

    • minimising the app (pressing home)
    • swiping the app away from the recents menu
    • force stopping via the application settings

@ouchadam ouchadam added A-Notifications O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround X-Needs-Info labels Nov 16, 2021
@ouchadam
Copy link
Contributor

ouchadam commented Dec 1, 2021

closing due to inactivity and being unable to reproduce locally

@ouchadam ouchadam closed this as completed Dec 1, 2021
@Penguin-Guru
Copy link

My issue (presumed different) was indeed resolved when the persistent notification was recently added. The notifications aren't visible until I unlock my phone and pull down the task bar to check for them, but I think this is due to encrypted rooms not supporting noisy notifications or something like that. There is a statement about it on the room level notification configuration page.

@ouchadam
Copy link
Contributor

ouchadam commented Dec 1, 2021

@Penguin-Guru I don't believe this is set within the app but instead by the system, it's possible to change the behaviour via the system app info then selection notifications and then the noisy/silent channels

The UI may look different as these screenshots come from a Android 10 device running MIUI

CHANNEL SETTINGS OPTIONS RESULT
Screenshot_20211201_122140 Screenshot_20211201_122738 Screenshot_20211201_122436

@Penguin-Guru
Copy link

@ouchadam I see system settings to configure notifications for Element, but options like "Pop on screen" are only available for noisy notifications.

In Element, after opening a room conversation, then settings for that room, then "Notifications", there is a message at the bottom of the screen that says "Please note that mentions & keyword notifications are not available in encrypted rooms on mobile." I'm not sure why this is the case but hopefully support will be added eventually. It really confused me at first because the message does not appear on the default (i.e. not room-specific) notifications settings page. My understanding is that mentions (including replies) and keywords are considered noisy and all other event notifications are silent. Hopefully they will be configurable some day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems X-Needs-Info
Projects
None yet
Development

No branches or pull requests

3 participants