Messages/Notifications only populate when app is in the foreground
See original GitHub issueSteps to reproduce
- Open the app.
- Navigate away from the app and/or close it in recent apps.
- Receive messages at some point while it’s in the background.
Outcome
What did you expect?
Notifications and messages should load up while the app is in the background.
What happened instead?
When opening up the app after having it in the background for a while and viewing a DM/chat, a loading bar will appear at the top and the chat will update and notifications will be sent at the same time.
Notably, I will always receive instant notifications and not see loading bars in chats while I keep the app open in the foreground, but as soon as it’s in the background the app essentially shuts off until I bring it back to the front and then it loads and catches back up again.
Notes:
-
This bugged behavior began on a fresh install of element on a brand new phone, and notably did not occur on the old one. I have not changed any notification related settings from their defaults on this new installation, and I successfully validated this new device using cross-signing.
-
I ran the notification troubleshooter and the result included the following issues:
- Firebase Token (!)
Failed to retrieved FCM token: java.util.concurrent.ExecutionException: java.io.IOException: SERVICE_NOT_AVAILABLE
- Token Registration (!) (probably a cascade from previous failure)
- Text Push (!) (probably a cascade from previous failure)
- Notification Display step does work
- Firebase Token (!)
-
Possibly relevant? In Advanced -> Notification Targets there are “No registered push gateways”
-
Data/Battery saver features in Android are at their defaults (off)
Your phone model
Pixel 6
Operating system version
Android 12
Application version and app store
1.3.7 [40103072] (G-b4267) Installed fresh off the Play Store, olm 3.2.4
Homeserver
matrix.org
Will you send logs?
No
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
I was able to get notifications working!
I performed a whole flurry of steps and I’m not exactly sure which one did it, but I’ll list them all here in case others run into something like this:
After that I checked and saw the push gateway in the list and from then on notifications worked both in and out of Wi-Fi.
I just thumbed through the app manager and Google Play Services is indeed installed and the version number is the same as yours. In an attempt to debug at the services level I cleared the cache on it and restarted the phone, then started up element and ran the troubleshooter again and the result hasn’t changed. Notably the google play services step in the troubleshooter has passed without issue every time I’ve run it, with the failures being only the token cascade I originally marked.