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
[$500] IOU - User is brought to main chat and duplicate error in report when paying same request twice #33822
Version Number: 1.4.20-2 Reproducible in staging?: Y Reproducible in production?: Y 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 Expensify/Expensify Issue URL:
**Issue reported by:**Applause - Internal Team Slack conversation:
Action Performed:
Precondition: User A owes User B money
Log in as User A on two devices
On the first device, go to IOU report page and disconnect network
Pay the amount
On the second device, without disconnecting network, pay the request
On the first device, reconnect network
Click on the IOU preview
Expected Result:
In Step 5, user will remain on the IOU report
In Step 6, the error message will not appear twice
Actual Result:
In Step 5, user is redirected to the main chat after reconnecting network
In Step 6, the error message is duplicated -
"'Unexpected error, please try again later. An unexpected error occurred. Please try again.'
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-] IOU - User is brought to main chat and duplicate error in report when paying same request twice[/-][+][$500] IOU - User is brought to main chat and duplicate error in report when paying same request twice[/+]on Jan 1, 2024
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
[@akinwale] The PR that introduced the bug has been identified. Link to the PR:
[@akinwale] 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:
[@akinwale] 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 a regression.
[@akinwale] Determine if we should create a regression test for this bug.
[@akinwale] 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.
Regression Test Steps
Login to Expensify as user A on two devices
Send a money request from user B to user A
On the first device, go offline
Settle the request from user B on the offline device
On the second device, settle the request from user B without going offline
On the first device, go online
Verify that the message is not duplicated when the error message appears on the request.
Honestly I think this is not an impactful bug, and needing "two" devices with the same account makes it tricky to test, so I think we can skip adding regression tests.
Activity
[-] IOU - User is brought to main chat and duplicate error in report when paying same request twice[/-][+][$500] IOU - User is brought to main chat and duplicate error in report when paying same request twice[/+]melvin-bot commentedon Jan 1, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01b20888f83f6a41ed
melvin-bot commentedon Jan 1, 2024
Triggered auto assignment to @anmurali (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 1, 2024
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Jan 1, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav (
External)dukenv0307 commentedon Jan 2, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
User is redirected to the main chat after reconnecting network: Can reproduce this bug on the latest main.
The error message is duplicated
"'Unexpected error, please try again later. An unexpected error occurred. Please try again.'
What is the root cause of that problem?
In FE, we generate an error in
failureDataand then when pay money request fails, BE returns another error.App/src/libs/actions/IOU.js
Line 2858 in 320ff54
So we have two errors for this action.
App/src/components/DotIndicatorMessage.tsx
Line 73 in 320ff54
What changes do you think we should make in order to solve the problem?
In
DotIndicatorMessage, we can only display the latest error message by usingErrorUtils.getLatestErrorFieldfunction.App/src/components/DotIndicatorMessage.tsx
Line 73 in 320ff54
What alternative solutions did you explore? (Optional)
If we only want to display one error message for
ReportActionItem, we can passerrorsasErrorUtils.getLatestErrorField(this.props.errors)hereApp/src/pages/home/report/ReportActionItem.js
Line 693 in 320ff54
melvin-bot commentedon Jan 5, 2024
@anmurali, @0xmiroslav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
jacobkim9881 commentedon Jan 7, 2024
To my endpoint, in step 5, a user(me) remains on the IOU report but the bug is reproducible on step 6.
39 remaining items
rlinoz commentedon Jan 24, 2024
Oh I missed the part of needing 2 devices, thanks
rlinoz commentedon Jan 25, 2024
Since this looks like a problem of how we are displaying error messages and not really about requiring 2 devices I think this one is worth fixing.
I am assigning @dukenv0307 then, thanks!
melvin-bot commentedon Jan 25, 2024
📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
melvin-bot commentedon Jan 25, 2024
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖
dukenv0307 commentedon Jan 28, 2024
@akinwale The PR is ready for review.
akinwale commentedon Feb 12, 2024
Looks like automation missed this one. It was deployed to production on 2024-02-05, so the payment due date is 2024-02-12.
cc @anmurali
akinwale commentedon Feb 12, 2024
Not a regression.
Regression Test Steps
Do we agree 👍 or 👎?
rlinoz commentedon Feb 15, 2024
Honestly I think this is not an impactful bug, and needing "two" devices with the same account makes it tricky to test, so I think we can skip adding regression tests.
anmurali commentedon Feb 16, 2024
Works for me. @akinwale and @dukenv0307 have been paid.