You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-10-10] [$500] Dev - Request Money - Manual request money Infinity loading after login #28280
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: Dev 1.3.74-2 Reproducible in staging?: n Reproducible in production?: n 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
That's why before logging out shouldResetIOUAfterLogin = false. After logging out and logging back in, shouldResetIOUAfterLogin is still false, causing the phone to return and not reset the iou.
This leads to didInitCurrency = false so when we enter NewRequestAmountPage it results in show loading. until we reload the page to reset the shouldResetIOUAfterLogin = true variable
What changes do you think we should make in order to solve the problem?
Please re-state the problem that we are trying to solve in this issue
The issue is that the "Request Money" feature is stuck in an infinite loading state after login.
What is the root cause of that problem?
In the NewRequestAmountPage.js file, a condition checks if didInitCurrency is false; if so, it returns a FullScreenLoadingIndicator. This causes an infinite loading state if didInitCurrency is not set to true once the currency is initialized, and only set true when it's not a part of the condition on
What changes do you think we should make in order to solve the problem?
We need to ensure that didInitCurrency is set to true once the currency is initialized. This change should be made in the IOU.js file where the currency is being initialized.
Here is the proposed change in IOU.js:
Onyx.connect({
key: ONYXKEYS.IOU,
callback: (val) => {
didInitCurrency = lodashGet(val, 'didInitCurrency');
if (!didInitCurrency) {
// Initialize the currency here
// After initializing the currency
Onyx.merge(ONYXKEYS.IOU, {didInitCurrency: true});
}
},
});
Result
Apple Native App
output.mp4
Safari Desktop
output_dekstop.mp4
What alternative solutions did you explore? (Optional)
changed the title [-][$500] Dev - Request Money - Manual request money Infinity loading after login[/-][+][HOLD for payment 2023-10-10] [$500] Dev - Request Money - Manual request money Infinity loading after login[/+]on Oct 3, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.76-6 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-10. 🎊
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.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
For reference, here are some details about the assignees on this 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:
[@narefyev91] The PR that introduced the bug has been identified. Link to the PR:
[@narefyev91] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@narefyev91] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@narefyev91] Determine if we should create a regression test for this bug.
[@narefyev91] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
The PR that introduced the bug has been identified. Link to the PR - it was revering PR flow
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment - N/A
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion - N/A
Determine if we should create a regression test for this bug - N/A
The PR that introduced the bug has been identified. Link to the PR - it was revering PR flow
What does this mean? The PR that caused this bug has been identified and since reverted by its author, so it could have been linked here.
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment - N/A
I don't think this is "not applicable", this bug was a regression from somewhere, right? I think you're saying they are already aware of it because they authored the PR to revert it citing this bug.
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion - N/A
When answering "N/A" it would be good to expand just a little on why you think something is not applicable. I think that reason might be because the problem the original PR was solving is being prevented (deep linking to say the confirmation screen of a money request), so it's not something we need to "catch" going forward.
Determine if we should create a regression test for this bug - N/A
Same sentiment as above. I.e No need to add a regression test for a deep link flow that's not going to be possible anymore or something.
Activity
[-]Dev - Request Money - Manual request money Infinity loading after login[/-][+][$500] Dev - Request Money - Manual request money Infinity loading after login[/+]melvin-bot commentedon Sep 26, 2023
Triggered auto assignment to @trjExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 26, 2023
Job added to Upwork: https://www.upwork.com/jobs/~017e5ca352b532b8bd
melvin-bot commentedon Sep 26, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Sep 26, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @narefyev91 (
External)kbecciv commentedon Sep 26, 2023
Proposal by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695742872366339
Proposal
Please re-state the problem that we are trying to solve in this issue.
Manual request money shows Infinity loading after logout and login again
What is the root cause of that problem?
This issue was introduced by #25786
We currently have the condition checking
iou.didInitCurrencyto showFullScreenLoadingIndicator:App/src/pages/iou/steps/NewRequestAmountPage.js
Lines 164 to 166 in cfad43f
When the app is initialized, we initialize
didInitCurrencyhereApp/src/libs/actions/IOU.js
Line 78 in cfad43f
Here is the logic to reset the iou after login.
App/src/libs/actions/IOU.js
Lines 86 to 102 in cfad43f
That's why before logging out
shouldResetIOUAfterLogin = false. After logging out and logging back in,shouldResetIOUAfterLoginis still false, causing the phone to return and not reset the iou.This leads to
didInitCurrency = falseso when we enterNewRequestAmountPageit results in show loading. until we reload the page to reset theshouldResetIOUAfterLogin = truevariableWhat changes do you think we should make in order to solve the problem?
We should modify the conditions a bit
What alternative solutions did you explore? (Optional)
N/A
studentofcoding commentedon Sep 27, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue
The issue is that the "Request Money" feature is stuck in an infinite loading state after login.
What is the root cause of that problem?
In the
NewRequestAmountPage.jsfile, a condition checks ifdidInitCurrencyis false; if so, it returns aFullScreenLoadingIndicator. This causes an infinite loading state ifdidInitCurrencyis not set to true once the currency is initialized, and only set true when it's not a part of the condition onApp/src/libs/actions/IOU.js
Lines 78 to 102 in 295a8dc
What changes do you think we should make in order to solve the problem?
We need to ensure that
didInitCurrencyis set to true once the currency is initialized. This change should be made in theIOU.jsfile where the currency is being initialized.Here is the proposed change in IOU.js:
Result
Apple Native App
output.mp4
Safari Desktop
output_dekstop.mp4
What alternative solutions did you explore? (Optional)
None
@trjExpensify @narefyev91
narefyev91 commentedon Sep 27, 2023
Proposal from @namhihi237 looks good to me #28280 (comment)
🎀 👀 🎀 C+ reviewed
10 remaining items
[-][$500] Dev - Request Money - Manual request money Infinity loading after login[/-][+][HOLD for payment 2023-10-10] [$500] Dev - Request Money - Manual request money Infinity loading after login[/+]melvin-bot commentedon Oct 3, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Oct 3, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.76-6 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-10. 🎊
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:
melvin-bot commentedon Oct 3, 2023
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:
trjExpensify commentedon Oct 10, 2023
👋 Can we get this checklist filled out please to proceed with payments?
narefyev91 commentedon Oct 11, 2023
trjExpensify commentedon Oct 11, 2023
What does this mean? The PR that caused this bug has been identified and since reverted by its author, so it could have been linked here.
I don't think this is "not applicable", this bug was a regression from somewhere, right? I think you're saying they are already aware of it because they authored the PR to revert it citing this bug.
When answering "N/A" it would be good to expand just a little on why you think something is not applicable. I think that reason might be because the problem the original PR was solving is being prevented (deep linking to say the confirmation screen of a money request), so it's not something we need to "catch" going forward.
Same sentiment as above. I.e No need to add a regression test for a deep link flow that's not going to be possible anymore or something.
trjExpensify commentedon Oct 11, 2023
As for payments then, I think those are only as follows:
I've gone ahead and sent you an offer, @namhihi237!
namhihi237 commentedon Oct 11, 2023
@trjExpensify accepted thanks
trjExpensify commentedon Oct 11, 2023
Perfect, paid!