Not receiving new messages in 1:1 chat while on mobile data
Steps to reproduce
- Stop Element X by swiping it upward in the task switcher.
- Use another device to send a message in a 1:1 chat with the account that Element X is using.
Outcome
What did you expect?
Element X should display a notification.
What happened instead?
No notification is shown. Element X appears to not receive the message until I manually launch it, at which point it performs a manual sync and I can see the message show up.
Your phone model
Google Pixel 7a
Operating system version
Android 15, Build BP1A.250305.019
Application version and app store
Element X version 25.03.0 (202503000), Google Play Store
Homeserver
Synapse 1.126.0
Will you send logs?
Yes
Are you willing to provide a PR?
Yes
I'm able to repro this easily. At 2025-03-21 18:43 UTC, a message was sent to me in a 1:1 chat. No notification was displayed. At 16:44, I unlocked the phone and launched Element X. At this point, I could see the message appear in the conversation after Element X synced.
Here are logs from the Synapse server (I probably erred on the side of redacting too much, so please let me know if there's anything that would help here):
synapse-1 | 2025-03-21 18:43:50,524 - synapse.access.http.8008 - 508 - INFO - PUT-87008 - XXX.XXX.XXX.XXX - 8008 - {@REDACTED} Processed request: 0.117sec/0.001sec (0.011sec, 0.003sec) (0.007sec/0.013sec/9) 59B 200 "PUT /_matrix/client/v3/rooms/!REDACTED/send/m.room.encrypted/m1742582631293.33 HTTP/1.1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36" [0 dbevts]
synapse-1 | 2025-03-21 18:43:50,529 - synapse.federation.sender - 594 - INFO - process_event_queue_for_federation-1209 - Unexpectedly did not have cached prev group for $REDACTED
synapse-1 | 2025-03-21 18:43:50,533 - synapse.push.httppusher - 241 - INFO - httppush.process-402 - Processing 1 unprocessed push actions for @REDACTED starting at stream_ordering 2352
...
synapse-1 | 2025-03-21 18:43:50,851 - synapse.http.client - 442 - INFO - httppush.process-402 - Received response to POST https://matrix.org/_matrix/push/v1/notify: 200
...
synapse-1 | 2025-03-21 18:44:49,161 - synapse.access.http.8008 - 508 - INFO - GET-87025 - YYY.YYY.YYY.YYY - 8008 - {None} Processed request: 0.005sec/0.001sec (0.002sec, 0.000sec) (0.001sec/0.002sec/1) 23B 200 "GET /_matrix/client/v3/profile/@REDACTED HTTP/1.1" "Element X/25.03.0 (Google Pixel 7a; Android 15; BP1A.250305.019; Sdk 19df94515)" [0 dbevts]
...
synapse-1 | 2025-03-21 18:44:49,184 - synapse.push.pusherpool - 424 - INFO - POST-87026 - Starting pusher @REDACTED / im.vector.app.android:REDACTED:REDACTED
synapse-1 | 2025-03-21 18:44:49,188 - synapse.access.http.8008 - 508 - INFO - POST-87026 - YYY.YYY.YYY.YYY - 8008 - {@REDACTED} Processed request: 0.029sec/0.000sec (0.007sec, 0.001sec) (0.003sec/0.016sec/8) 2B 200 "POST /_matrix/client/v3/pushers/set HTTP/1.1" "Element X/25.03.0 (Google Pixel 7a; Android 15; BP1A.250305.019; Sdk 19df94515)" [0 dbevts]
synapse-1 | 2025-03-21 18:44:49,539 - synapse.access.http.8008 - 508 - INFO - GET-87027 - YYY.YYY.YYY.YYY - 8008 - {None} Processed request: 0.000sec/0.001sec (0.000sec, 0.000sec) (0.000sec/0.000sec/0) 1036B 200 "GET /_matrix/client/versions HTTP/1.1" "Element X/25.03.0 (Google Pixel 7a; Android 15; BP1A.250305.019; Sdk 19df94515)" [0 dbevts]
synapse-1 | 2025-03-21 18:44:49,768 - synapse.access.http.8008 - 508 - INFO - POST-87029 - YYY.YYY.YYY.YYY - 8008 - {@REDACTED} Processed request: 0.002sec/0.007sec (0.001sec, 0.002sec) (0.000sec/0.000sec/0) 244B 200 "POST /_matrix/client/unstable/org.matrix.simplified_msc3575/sync?timeout=30000 HTTP/1.1" "Element X/25.03.0 (Google Pixel 7a; Android 15; BP1A.250305.019; Sdk 19df94515)" [0 dbevts]
It looks to me like Synapse is successfully passing the notification request to matrix.org, but Element X doesn't sync the new message until I manually launch it.
I also sent a bug report with logs from Element X soon after observing the issue. I included @dan:erat.org in the description.
I have "Enable notifications on this device" checked in Element X, and "Notify me for ... Direct chats" is set to "All messages". When I launch "Troubleshoot notifications", all of the tests pass successfully.
Please let me know if there's any more information that I can provide.
Here are the Element X logs corresponding to the above interval:
...
2025-03-21T18:43:01.962785Z WARN elementx: [MainActivity] onPause |
2025-03-21T18:43:01.996979Z WARN elementx: [MainActivity] onDestroy |
2025-03-21T18:44:05.636502Z WARN elementx: Restoring a session with a passphrase |
2025-03-21T18:44:07.290394Z INFO elementx: Found 0 additional user-provided certificates. |
2025-03-21T18:44:07.338477Z DEBUG matrix_sdk::client::builder: Starting to build the Client | crates/matrix-sdk/src/client/builder/mod.rs:456 | spans: build
2025-03-21T18:44:46.556384Z INFO matrix_sdk::client::builder: selected sliding sync version version=None | crates/matrix-sdk/src/client/builder/mod.rs:506 | spans: build{homeserver=HomeserverUrl("REDACTED")}
...
2025-03-21T18:44:46.782409Z INFO elementx: Start sync |
...
I would've expected the client to receive a push notification via FCM and perform a sync shortly after the homeserver's push request was accepted at 18:43:50, but that doesn't appear to have happened.
I did a bit more testing, sending direct messages from another account on the same homeserver:
- Wifi, Element X running in background → notification
- Wifi, Element X not running → notification
- Mobile (T-Mobile 5G, US), Element X running in background → no notification
- Mobile, Element X not running → no notification
I see this behavior consistently. I waited several minutes in the mobile scenarios but never received notifications. While I'm on mobile, I only receive new messages after opening Element X to trigger a sync manually.
Edit: Just to mention it, Element X's notification troubleshooter still reports no problems while I'm using mobile data. The "Test Push loop back" step reports "Push loop back took 1333 ms." (The duration appears to be dependent on how soon I tap the notification; if I do it quickly I see e.g. 405 ms.)
I have the same issue with Element X from FDroid version 25.03.1 (202503012). However, in my case, this behavior happens both on Wi-Fi and mobile data connections. I use matrix.org as my home server. To be specific, the notification troubleshooter reports no issues, but I only receive notifications after I have opened the app. Only then, Element X does a sync. If I do not open the app, the messages are never displayed, however much I wait. I have already disabled any battery optimizations on the app.
As a quick update, it looks like I'm now receiving notifications via FCM while on mobile data after enabling "Unrestricted mobile data usage" (long-press on Element X → "App info" → "Mobile data usage").
Here are the defaults that Element X started out with on my phone:
This makes no sense to me since per Android's UI and Google's documentation the "unrestricted" setting only applies when Data Saver is enabled, and I never use Data Saver (and confirmed that it wasn't enabled).
I'm able to reproduce the no-notifications behavior I was initially seeing by turning "Background data" off. Maybe there was a bug in Android such that it was treating Element X as if "Background data" was disabled even though the setting was enabled.
In any case, I'm not yet sure if this is permanently fixed for me now, but toggling Element X's "Background data" and "Unrestricted mobile data usage" settings off and back on may be worth a try if you're not receiving notifications over mobile data.
I have the same issue with Element X from FDroid version 25.03.1 (202503012).
This is certainly not the same issue, as the fdroid builds cannot use the Google Push (FCM) system. Instead, they rely on UnifiedPush, which requires another app as a UnifiedPush distributor on your phone.
I have the same issue with Element X from FDroid version 25.03.1 (202503012).
This is certainly not the same issue, as the fdroid builds cannot use the Google Push (FCM) system. Instead, they rely on UnifiedPush, which requires another app as a UnifiedPush distributor on your phone.
Indeed, I am using ntfy as the distributor. However, as far as I understand, this is not an issue with the notification provider (also since the troubleshooting notification tests pass). The issue I am experiencing is that Element X only displays messages when I open the app, and it does a manual sync.
I'm not receiving notifications either.
I have microg lineageOs 22.1 on Oneplus 8T. Using latest Element X from F-Droid + ntfy for notifications. Some previous Element X worked, but recent versions do not.
Notification troubleshooting reports no problems.
Unrestricted background data mentioned previously doesn't help.
Standard tests would be:
- Is ntfy excepted from battery optimizations?
- Is EXA excepted from battery optimizations?
- Does using a different UP server such as https://ntfy.schildi.chat fix things (the standard server is often rate limited, it seems)
- Deleting the subscription in ntfy so that it is created freshly could also help.
1. Is ntfy excepted from battery optimizations?Yes.
2. Is EXA excepted from battery optimizations?Yes.
3. Does using a different UP server such as https://ntfy.schildi.chat fix things (the standard server is often rate limited, it seems)i tried schildi.chat, but push loop back fails with that server
4. Deleting the subscription in ntfy so that it is created freshly could also help.
I have deleted it several times. Also tried to reinstall Element X.
Issue persists.
Standard tests would be:
- Is ntfy excepted from battery optimizations?
- Is EXA excepted from battery optimizations?
- Does using a different UP server such as https://ntfy.schildi.chat fix things (the standard server is often rate limited, it seems)
- Deleting the subscription in ntfy so that it is created freshly could also help.
I have tried all of these. I have also installed the Google Play Store version, and i used firebase instead of ntfy and notifications seem to work fine. I do not know if this is a ntfy issue or an integration issue between ntfy and element.
Element (without X) suffers from the same issue.
When I noticed the problem, I switched from Element to Element X on two devices (Pixel6 and Pixel 8a). I am quite sure that the first day or so, Element X would work on mobile network. Now it has the same issue. Other messenger notifications work as expected, e.g. signal.
i switched NTFY to Conversations and notifications now work most of the time. Sometimes, after switching off airplane mode for example, i need to open EX to see if there are new messages.
My comment refers to the Google play store versions. No ntfy involved.