-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 Notification not received if app is backgrounded #3542
Comments
Triggered auto assignment to @strepanier03 ( |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
|
Triggered auto assignment to @MariaHCD ( |
@sketchydroide and @Julesssss would be better equipped to tackle this one quickly 🙌🏼 |
I can take a look, but my availability today is a bit sketchy, so I might need to push it to someone else later if I don't figure it out quickly. |
This is also reproducible in iOS app. Editing title. |
The UA React Native module 11.0.0 release contains breaking changes apparently. Surely that's what we're seeing here?
|
@roryabraham do you have any ideas about this? |
There is some extra context about the breaking changes here ... they were made at our request, so that push notifications can wake a closed Android app and execute JS. |
@roryabraham so do you think that is responsible for this issue |
Not sure if it's still needed but triaging this now. Unique: Not finding any other reports of this. I cannot test this in the app to recreate, I do not have E-chat on my phone at the moment because I was struggling with working late hours when I would get chats after I'd logged for the day. This is already with Eng so removing my assignment and leaving it with the current labels. |
between trying to reproduce it myself (and failing) and trying to understand what was broken, I haven't been able to do much about this, if someone else has any ideas please feel to take it, otherwise I'll get back at this on Monday. |
I haven't really been able to figure much out about this, I'm not being able to test it on Android (it fails now installing/building) I think I need some help/new eyes |
I'll be able to take a look tomorrow. I also wonder if @roryabraham might be able to provide some insight too? |
I built the prod env to test this. Can confirm that notifications aren't displayed when the app is in the background. The first issue is that the app thinks we are still viewing the last read chat: If we navigate to an alternate chat, background the app, and send the message again we see a different message, but the notification still fails to display: I'm going to try reverting the Airship library update to compare results. @Jag96 reported that this issue occurs, but the solution to that might be simpler than the Urban Airship fix. |
Reverting UrbanAirship to
|
In fact, I'm now wondering if local notifications ever worked on mobile? Because the native function is noop... Yep, they were never implemented! This PR seems to be introducing them, but is WIP. |
I am now convinced that this is the case. I even took part in the discussion about how to introduce background notifications discussion (notice the 'When are we displaying notifications now?' table)🤦 . To confirm that this has never worked, I built an old prod signed build If we were creating the notification from background, it would should displayed instantly (unlike server notifications). This comment proves that we are logging the request to display a background notification, and this link proves that the function which is responsible for creating the notification is empty. android-background-notifications.mp4I removed DeployBlocker label and assigned @roryabraham as it seems to be associated with this issue that he is currently working on. Feel free to close this. |
I can confirm that local notifications never worked on mobile, but it seems that pusher connections are being maintained while the app is backgrounded. I'm not sure if something specific changed here (because this wasn't always the case when I was first implementing push notifications on E.cash), or if it's just something that works inconsistently. In any event, I can hopefully address this by making local notifications work when the app is backgrounded, so that we display a notification regardless of whether we are connected via pusher while the app is backgrounded. It's also worth noting that if you have a web or desktop client open and logged into the same account, we won't send a push notification because that other client will have an active pusher connection. |
Likely caused by #3508 (QA comment was here). I tried changing the
urbanairship-react-native
version to 10.2 (was originally at 10.0) but doing so causes #3503 to happen again. Not sure what the issue is here, ideally somebody who can build to a physical Android device to test would look at this one.Expected Result:
User receives push notification
Actual Result:
No push notification received
Actions Performed:
Platform:
Android ✔️
iOS ✔️
Build:
1.0.67-0
Notes/Images/Video:
Bug5107452_screen-20210610-194541.mp4
The text was updated successfully, but these errors were encountered: