element-x-android
element-x-android copied to clipboard
No notifications when background data disabled
Steps to reproduce
- Disable background data
- Lock device (not sure if this is a required step)
- Wait for push notification
- No notification pops up
Outcome
What did you expect?
I expected a notification
What happened instead?
I did not get a notification, but Push history shows the following:
Unable to resolve event: msg=error sending request for url (...), details=SdkError(Http(Reqwest(reqwest::Error { kind: Request, url: "...", source: hyper_util::client::legacy::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: No address associated with hostname" })) })))
- Idle: false
- Power Saving Mode: false
- Ignoring Battery Optimizations: false
- Device Light Idle Mode: false
- Low Power Standy Enabled: false
- Exempt from Low Power Standby: true
Your phone model
No response
Operating system version
No response
Application version and app store
25.04.3 Play Store
Homeserver
No response
Will you send logs?
No
Are you willing to provide a PR?
No
Do not disable background data? On some device, it's also possible to add exception for applications allowed to use data when in the background.
For privacy reason, the Push data received from Firebase / UnifiedPush provider does not contain the message content, but only ids. The application needs to retrieve the content from the homeserver to be able to render the notification, and to do so perform a network request.
Sure, but Element could still notify me that it got an incomplete push instead of failing/ignoring pushes silently? I suppose the same happens if the application can't reach the matrix server for another reason (upstream dns or network issues or whatever), in which case the user is also missing notifications.
I've been wondering for some time now, why I'm getting unreliable Notifications with Element X but not with Element, until I saw in the push history that there are DNS Errors. I checked my Background Data Settings after reading this, and it was turned off on my Pixel, even though I've never changed that setting.
I'd say for a non-technical User that's something pretty hard to find in a case where it's not enabled by default.