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-02-07][$500] Page refresh causes manual request with a receipt to be stuck #30884
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
changed the title [-]Page refresh causes manual request with a receipt to be stuck[/-][+][$500] Page refresh causes manual request with a receipt to be stuck[/+]on Nov 4, 2023
With the big refactor on the request flow, navigateToStartStepIfScanFileCannotBeRead also be used in the participant page so this change also fix the bug on the participant page
This is result
sol.mp4
What alternative solutions did you explore? (Optional)
But this object URL is only valid for the current session and will be revoked once the page is refreshed. So when navigating to the confirmation page, file would be null and it'll be redirected to the manual request page or previous page.
I actually reported this one and worked on a solution that I shared on Slack. Not sure why @m-natarajan didn't include it :) could you double-check again please :), and please check the Reported GitHub ID. that's not me it should be @abdel-h66
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-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:
[@eVoloshchak / @DylanDylann] The PR that introduced the bug has been identified. Link to the PR:
[@eVoloshchak / @DylanDylann] 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:
[@eVoloshchak / @DylanDylann] 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:
[@eVoloshchak / @DylanDylann] 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.
[@lschurr] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
changed the title [-][HOLD for payment 2024-02-07] [HOLD for payment 2024-01-18] [$500] Page refresh causes manual request with a receipt to be stuck[/-][+][HOLD for payment 2024-02-07][$500] Page refresh causes manual request with a receipt to be stuck[/+]on Jan 31, 2024
The PR that introduced the bug has been identified. Link to the PR: there isn't a PR that has caused this, this is an edge case that was missed during the initial implementation
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: we already have the necessary item in the reviewer checklist: " I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)"
Determine if we should create a regression test for this bug.
Is it easy to test for this bug? Yes
Is the bug related to an important user flow? Yes
Is it an impactful bug? It's an edge case, but it's an edge case that completely crashes the app, I'd call that impactful
Regression Test Proposal
Open a chat
Create a manual request thought the chat plus icon (not the FAB)
Enter an amount and click Next
Click the three dots on the top, and attach a receipt
Refresh the page
The page should go back to the first step, autofilled with the previous amount.
Click next
Verify that you're able to continue to the request information page
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
[-]Page refresh causes manual request with a receipt to be stuck[/-][+][$500] Page refresh causes manual request with a receipt to be stuck[/+]melvin-bot commentedon Nov 4, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01b422f44a99747ac7
melvin-bot commentedon Nov 4, 2023
Triggered auto assignment to @lschurr (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 4, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 4, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)DylanDylann commentedon Nov 4, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Page refresh causes manual request with a receipt to be stuck
What is the root cause of that problem?
Firstly, Let's see this issue: #28347 (similar case with scan flow)
We discussed about this problem before with scan request. But we missed a case: the manual request by adding a receipt
Note that if we upload the receipt and back to the participant page and then reload, the same bug also happens. This bug is mentioned here
What changes do you think we should make in order to solve the problem?
In here
App/src/libs/IOUUtils.ts
Line 41 in e81ed8f
We should add a check if It is a manual request and the file is lost. The app will be on the confirmation page and the receipt thumbnail is removed
With the big refactor on the request flow,
navigateToStartStepIfScanFileCannotBeReadalso be used in the participant page so this change also fix the bug on the participant pageThis is result
sol.mp4
What alternative solutions did you explore? (Optional)
In here
App/src/libs/IOUUtils.ts
Line 41 in e81ed8f
We should add a check if It is a manual request and the file is lost. The app will redirect to the uploading screen
dummy-1111 commentedon Nov 4, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
After adding a receipt to the manual request, page refresh causes manual request to be stuck
What is the root cause of that problem?
When we adding a receipt to the manual request, we create blob URL and set it to the iou
App/src/pages/iou/ReceiptSelector/index.js
Lines 135 to 136 in 7bd51eb
App/src/pages/iou/ReceiptSelector/index.js
Lines 154 to 155 in 7bd51eb
But this object URL is only valid for the current session and will be revoked once the page is refreshed. So when navigating to the confirmation page, file would be null and it'll be redirected to the manual request page or previous page.
App/src/pages/iou/steps/MoneyRequestConfirmPage.js
Lines 106 to 109 in 7bd51eb
This is the root cause
What changes do you think we should make in order to solve the problem?
I don't think we need to go back to the manual request page when object URL is not valid.
I suggest to reset the receipt in this case
Update the above code to
Result
30884.mp4
What alternative solutions did you explore? (Optional)
DylanDylann commentedon Nov 4, 2023
@s-alves10 Your proposal is the same as my alternative solution 😄 (same interesting idea)
abdel-h66 commentedon Nov 4, 2023
I actually reported this one and worked on a solution that I shared on Slack. Not sure why @m-natarajan didn't include it :) could you double-check again please :), and please check the Reported GitHub ID. that's not me it should be
@abdel-h66101 remaining items
melvin-bot commentedon Jan 31, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 31, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.33-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-02-07. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 31, 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:
[-][HOLD for payment 2024-02-07] [HOLD for payment 2024-01-18] [$500] Page refresh causes manual request with a receipt to be stuck[/-][+][HOLD for payment 2024-02-07][$500] Page refresh causes manual request with a receipt to be stuck[/+]lschurr commentedon Feb 4, 2024
@eVoloshchak @DylanDylann - could you work through the new checklist for this one?
eVoloshchak commentedon Feb 6, 2024
Is it easy to test for this bug? Yes
Is the bug related to an important user flow? Yes
Is it an impactful bug? It's an edge case, but it's an edge case that completely crashes the app, I'd call that impactful
Regression Test Proposal
Do we agree 👍 or 👎
eVoloshchak commentedon Feb 7, 2024
This is ready for payment, @lschurr, could you post the payment summary please?
Noting this has caused a regression, the amount should be $250
lschurr commentedon Feb 7, 2024
Yep, I will review and post payment summary today.
lschurr commentedon Feb 7, 2024
Payment summary:
lschurr commentedon Feb 7, 2024
Added new QA test request: https://github.com/Expensify/Expensify/issues/367651
Closing out this issue.
JmillsExpensify commentedon Feb 9, 2024
$250 approved for @eVoloshchak based on summary above.