App icon indicating copy to clipboard operation
App copied to clipboard

[$1000] [MEDIUM] IOU - When paying for and sending an IOU at the same time, the error "Hmm.... it's not here"

Open izarutskaya opened this issue 1 year ago • 33 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.4.20-0 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:

  1. On the main device, open New Expensify app
  2. Log in under account A
  3. On the secondary device, open https://staging.new.expensify.com/
  4. Log in under account B
  5. Under account A, send a manual IOU to account B
  6. Under account A, start creating another manual IOU for account B and stop at the last step (sending).
  7. Under account B, pay for the IOU and at the same time send an incomplete IOU from user A
  8. Under account A, open the last sent IOU

Expected Result:

When user B pays for an IOU and a new IOU is sent to him at the same time, the sent IOU must be registered by the system as a new and unpaid IOU.

Actual Result:

When user B pays for an IOU and sends him a new IOU at the same time, the sent IOU gives the error "Hmm.... it's not here"

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [x] Android: Native
  • [x] Android: mWeb Chrome
  • [x] iOS: Native
  • [x] iOS: mWeb Safari
  • [x] MacOS: Chrome / Safari
  • [x] MacOS: Desktop

Screenshots/Videos

https://github.com/Expensify/App/assets/115492554/1b5fd513-36aa-4df7-8b25-332752bbc616

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017525474c707a5fe3
  • Upwork Job ID: 1741174465896226816
  • Last Price Increase: 2024-01-26

izarutskaya avatar Dec 30 '23 19:12 izarutskaya

Job added to Upwork: https://www.upwork.com/jobs/~017525474c707a5fe3

melvin-bot[bot] avatar Dec 30 '23 19:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 30 '23 19:12 melvin-bot[bot]

Bug0 Triage Checklist (Main S/O)

  • [x] This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • [x] 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
  • [x] 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.
  • [x] 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.
  • [x] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

melvin-bot[bot] avatar Dec 30 '23 19:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 30 '23 19:12 melvin-bot[bot]

yeah this is a good one - I can reproduce and I think this needs to be considered with Wave 6 - maybe high/medium priority

Christinadobrzyn avatar Jan 02 '24 22:01 Christinadobrzyn

Proposal

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

When user A pays for an IOU and user B sends him a new IOU at the same time, the sent IOU gives the error "Hmm.... it's not here"

What is the root cause of that problem?

When user B do the second request, we got an "Unique Constraints Violation" error response.

The code treats all "Unique Constraints Violation" errors as DUPLICATE_RECORD here: https://github.com/Expensify/App/blob/1b1eeb81cf1dd3b439b53b94abf4c476c792aa74/src/CONST.ts#L834

What changes do you think we should make in order to solve the problem?

Introduce a new error identifier like UNIQUE_CONSTRAINTS. This distinction will allow accurately handling "Unique Constraints Violation" separately from DUPLICATE_RECORD.

What alternative solutions did you explore? (Optional)

brunovjk avatar Jan 02 '24 23:01 brunovjk

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Jan 06 '24 16:01 melvin-bot[bot]

I'm going to be ooo this week so adding a buddy to monitor while I'm away.

Status- we're reviewing proposals.

Christinadobrzyn avatar Jan 08 '24 00:01 Christinadobrzyn

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

melvin-bot[bot] avatar Jan 08 '24 00:01 melvin-bot[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

melvin-bot[bot] avatar Jan 08 '24 00:01 melvin-bot[bot]

@kevinksullivan, @Christinadobrzyn, @thesahindia Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Jan 11 '24 17:01 melvin-bot[bot]

@thesahindia any update on reviewing proposals?

kevinksullivan avatar Jan 12 '24 19:01 kevinksullivan

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Jan 13 '24 16:01 melvin-bot[bot]

@kevinksullivan @Christinadobrzyn @thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Jan 13 '24 17:01 melvin-bot[bot]

Sorry for the delay. I won't be able to take this right now. Please reassign.

thesahindia avatar Jan 15 '24 20:01 thesahindia

I can take over

situchan avatar Jan 15 '24 21:01 situchan

❌ There was an error making the offer to @situchan for the Contributor role. The BZ member will need to manually hire the contributor.

melvin-bot[bot] avatar Jan 19 '24 00:01 melvin-bot[bot]

assigning @situchan

kevinksullivan avatar Jan 19 '24 00:01 kevinksullivan

@kevinksullivan @Christinadobrzyn @situchan this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

melvin-bot[bot] avatar Jan 20 '24 17:01 melvin-bot[bot]

Proposal

Updated

brunovjk avatar Jan 21 '24 12:01 brunovjk

@brunovjk thanks for the proposal. I think you just explain the symptom in your RCA.

The code treats all "Unique Constraints Violation" errors as DUPLICATE_RECORD, which prevents proper updating of Onyx with failure data.

I'd like to know why this happens

situchan avatar Jan 22 '24 22:01 situchan

@situchan thank you for the review. You are right, I will investigate more.

brunovjk avatar Jan 22 '24 22:01 brunovjk

I'm back, I think we are reviewing proposals? @situchan should we increase the bounty to get more proposals?

Christinadobrzyn avatar Jan 23 '24 20:01 Christinadobrzyn

yes we can, as no viable proposals yet

situchan avatar Jan 23 '24 20:01 situchan

Upwork job price has been updated to $1000

melvin-bot[bot] avatar Jan 26 '24 17:01 melvin-bot[bot]

Awaiting proposals

situchan avatar Jan 29 '24 14:01 situchan

~I can no longer reproduce in the last 'main'~

brunovjk avatar Jan 30 '24 02:01 brunovjk

I think this is still an issue in staging - I followed the steps in the original post with two test accounts and I can see that the drafted IOU (that was then submitted) and paid IOU are showing together in the chat as needing to be paid.

image

Christinadobrzyn avatar Jan 30 '24 20:01 Christinadobrzyn

I think we're still collecting proposals for this

Christinadobrzyn avatar Jan 31 '24 18:01 Christinadobrzyn

What's the best next steps with this, as we're not getting many new proposals? Should I reach out to Software Mansion to see if they can take this on or another suggestion?

Christinadobrzyn avatar Feb 02 '24 23:02 Christinadobrzyn