-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2023-10-02] [$500] IOS - Push notification is sent to the device even though the app is logged out. #26247
Comments
Triggered auto assignment to @sophiepintoraetz ( |
Bug0 Triage Checklist (Main S/O)
|
My Test/Reproduction note, hope it helps:
|
ProposalPlease re-state the problem that we are trying to solve in this issue.IOS - Push notification is sent to the device even though the app is logged out. What is the root cause of that problem?Let take a look at the App/src/libs/actions/Session/index.js Lines 41 to 56 in 6e17b64
When user signed out offline, the API request will be pushed to the queue and wait for internet connection, after online again this api will be trigged and logged user out (including the token for push notification), in the mean time while signOut was calling if another user sent a message and user still can receive it because user was still logging out. This is the RCA. That why if you turned on the internet connection for a while and sent another message, you wouldn't receive the notification.
What changes do you think we should make in order to solve the problem?I think the most simple way to resolve this issue is adding more condition to our // call this when signout
shouldShowPushNotification {
if (!isAuthenticated) {return false}
} What alternative solutions did you explore? (Optional)Add the following line to our Airship.push.setUserNotificationsEnabled(false);
Airship.push.iOS.setForegroundPresentationOptionsCallback(() => Promise.resolve([]));
Airship.push.android.setForegroundDisplayPredicate((pushPayload) => Promise.resolve(() => false)); |
Will test on Monday! |
Job added to Upwork: https://www.upwork.com/jobs/~0134d9932ee5c7e512 |
Current assignee @sophiepintoraetz is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia ( |
I'm able to reproduce this: RPReplay_Final1693785333.MOV |
@hungvu193's proposal looks good to me! 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @stitesExpensify, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @thesahindia Please request via NewDot manual requests for the Reviewer role ($500) |
📣 @hungvu193 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @tranvantoan-qn 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
Waiting for final review from @roryabraham |
I'm actually really confused by the RCA here... it seems like we're missing something:
|
I realized that So we will still receive the notification in the meantime api was calling.
When I checked the logs, I saw that we will call Logout after we reconnected to the network, that's also little weird to me because we already clear all the persisted request. Overall, the current solution is just to disable the notification when user is logged out. Another solution can be creating a variable inside |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.73-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-10-02. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@thesahindia, please request $500 once you have completed the checklist. |
It was an improvement. Not a regression. We just need to add a test case. Steps:-
|
$500 payment approved for @thesahindia based on this comment. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Push notification should not be sent if app is logged out
Actual Result:
Push notification is sent to the device even though the app is logged out.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.58.0 (tested on 1.3.62-3)
Reproducible in staging?: Yes
Reproducible in production?: n/a
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Push-notification-issue.1.MP4
Expensify/Expensify Issue URL:
Issue reported by: @tranvantoan-qn
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692691382974179
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: