Skip to content

[$500] IOU - User is brought to main chat and duplicate error in report when paying same request twice #33822

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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

  1. Log in as User A on two devices
  2. On the first device, go to IOU report page and disconnect network
  3. Pay the amount
  4. On the second device, without disconnecting network, pay the request
  5. On the first device, reconnect network
  6. 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?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6329854_1704114912943.20231229_091649.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b20888f83f6a41ed
  • Upwork Job ID: 1741889910953496576
  • Last Price Increase: 2024-01-22
  • Automatic offers:
    • akinwale | Reviewer | 28121718
    • dukenv0307 | Contributor | 28121719

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 1, 2024
  2. 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
  3. melvin-bot commented on Jan 1, 2024

    @melvin-bot
  4. melvin-bot commented on Jan 1, 2024

    @melvin-bot

    Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 1, 2024
  6. melvin-bot commented on Jan 1, 2024

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  7. melvin-bot commented on Jan 1, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav (External)

  8. dukenv0307 commented on Jan 2, 2024

    @dukenv0307
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    1. User is redirected to the main chat after reconnecting network: Can reproduce this bug on the latest main.

    2. 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 failureData and then when pay money request fails, BE returns another error.

    errors: ErrorUtils.getMicroSecondOnyxError('iou.error.other'),

    So we have two errors for this action.

    {uniqueMessages.map((message, i) =>

    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 using ErrorUtils.getLatestErrorField function.

    {uniqueMessages.map((message, i) =>

    What alternative solutions did you explore? (Optional)

    If we only want to display one error message for ReportActionItem, we can pass errors as ErrorUtils.getLatestErrorField(this.props.errors) here

    errors={props.action.errors}

  9. melvin-bot commented on Jan 5, 2024

    @melvin-bot

    @anmurali, @0xmiroslav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  10. jacobkim9881 commented on Jan 7, 2024

    @jacobkim9881
    Contributor

    To my endpoint, in step 5, a user(me) remains on the IOU report but the bug is reproducible on step 6.

  11. 39 remaining items

  12. rlinoz commented on Jan 24, 2024

    @rlinoz
    Contributor

    Oh I missed the part of needing 2 devices, thanks

  13. rlinoz commented on Jan 25, 2024

    @rlinoz
    Contributor

    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!

  14. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 25, 2024
  15. melvin-bot commented on Jan 25, 2024

    @melvin-bot

    📣 @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

  16. melvin-bot commented on Jan 25, 2024

    @melvin-bot

    📣 @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 📖

  17. dukenv0307 commented on Jan 28, 2024

    @dukenv0307
    Contributor

    @akinwale The PR is ready for review.

  18. akinwale commented on Feb 12, 2024

    @akinwale
    Contributor

    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

  19. akinwale commented on Feb 12, 2024

    @akinwale
    Contributor
    • [@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

    1. Login to Expensify as user A on two devices
    2. Send a money request from user B to user A
    3. On the first device, go offline
    4. Settle the request from user B on the offline device
    5. On the second device, settle the request from user B without going offline
    6. On the first device, go online
    7. Verify that the message is not duplicated when the error message appears on the request.

    Do we agree 👍 or 👎?

  20. rlinoz commented on Feb 15, 2024

    @rlinoz
    Contributor

    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.

  21. anmurali commented on Feb 16, 2024

    @anmurali

    Works for me. @akinwale and @dukenv0307 have been paid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions