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 2024-08-01] [$125] [HIGH] [API Reliability] Opening the Wallet page calls the OpenPaymentsPage twice #45754
Please re-state the problem that we are trying to solve in this issue.
Opening the Wallet page calls the OpenPaymentsPage twice
What is the root cause of that problem?
The root cause of this problem is the presence of two separate useEffect hooks in WalletPage.tsx that both trigger the PaymentMethods.openWalletPage() function, leading to the API being called twice during the page load process.
changed the title [-][HIGH] [API Requests] Opening the Wallet page calls the OpenPaymentsPage twice [/-][+][HIGH] [API Reliability] Opening the Wallet page calls the OpenPaymentsPage twice [/+]on Jul 19, 2024
changed the title [-][HIGH] [API Reliability] Opening the Wallet page calls the OpenPaymentsPage twice [/-][+][$250] [HIGH] [API Reliability] Opening the Wallet page calls the OpenPaymentsPage twice [/+]on Jul 19, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.11-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve 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:
[@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
[@thesahindia] 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:
[@thesahindia] 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:
[@thesahindia] Determine if we should create a regression test for this bug.
[@thesahindia] 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.
[@mallenexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@thesahindia] 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:
[@thesahindia] 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:
Not needed
[@thesahindia] Determine if we should create a regression test for this bug.
@thesahindia if you propose we don't want a regression test case, can you provide reasoning why you think we don't need one? For this, I'm assuming it's because The OpenPaymentsPage read call is made only once is more of a backend thing that just needed to be updated and checking for that each time isn't necessary.
@thesahindia if you propose we don't want a regression test case, can you provide reasoning why you think we don't need one? For this, I'm assuming it's because The OpenPaymentsPage read call is made only once is more of a backend thing that just needed to be updated and checking for that each time isn't necessary.
It was a very specific issue. We added the same code twice and because of that we were calling the api twice.
Activity
melvin-bot commentedon Jul 19, 2024
Triggered auto assignment to @mallenexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.nyomanjyotisa commentedon Jul 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Opening the Wallet page calls the OpenPaymentsPage twice
What is the root cause of that problem?
The root cause of this problem is the presence of two separate
useEffecthooks inWalletPage.tsxthat both trigger thePaymentMethods.openWalletPage()function, leading to the API being called twice during the page load process.App/src/pages/settings/Wallet/WalletPage/WalletPage.tsx
Lines 276 to 278 in c1881ed
App/src/pages/settings/Wallet/WalletPage/WalletPage.tsx
Lines 289 to 294 in c1881ed
What changes do you think we should make in order to solve the problem?
We can remove this one an only trigger the
openWalletPagehereWhat alternative solutions did you explore? (Optional)
[-][HIGH] [API Requests] Opening the Wallet page calls the OpenPaymentsPage twice [/-][+][HIGH] [API Reliability] Opening the Wallet page calls the OpenPaymentsPage twice [/+][-][HIGH] [API Reliability] Opening the Wallet page calls the OpenPaymentsPage twice [/-][+][$250] [HIGH] [API Reliability] Opening the Wallet page calls the OpenPaymentsPage twice [/+]melvin-bot commentedon Jul 19, 2024
Job added to Upwork: https://www.upwork.com/jobs/~015c4debdbfd2eca47
melvin-bot commentedon Jul 19, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)[-][$250] [HIGH] [API Reliability] Opening the Wallet page calls the OpenPaymentsPage twice [/-][+][$125] [HIGH] [API Reliability] Opening the Wallet page calls the OpenPaymentsPage twice [/+]16 remaining items
melvin-bot commentedon Jul 25, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 25, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.11-5 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 2024-08-01. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 25, 2024
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:
mallenexpensify commentedon Aug 1, 2024
Contributor: @nyomanjyotisa paid $125 via Upwork
Contributor+: @thesahindia owed $125 via NewDot
@thesahindia plz complete the BZ checklist above.
thesahindia commentedon Aug 2, 2024
#22412
https://github.com/Expensify/App/pull/22412/files#r1701365475
Not needed
Not needed
melvin-bot commentedon Aug 6, 2024
@mallenexpensify, @mountiny, @nyomanjyotisa, @thesahindia Huh... This is 4 days overdue. Who can take care of this?
mallenexpensify commentedon Aug 7, 2024
@thesahindia if you propose we don't want a regression test case, can you provide reasoning why you think we don't need one? For this, I'm assuming it's because
The OpenPaymentsPage read call is made only onceis more of a backend thing that just needed to be updated and checking for that each time isn't necessary.thesahindia commentedon Aug 8, 2024
It was a very specific issue. We added the same code twice and because of that we were calling the api twice.
JmillsExpensify commentedon Aug 20, 2024
$125 approved for @thesahindia