Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.33k stars 2.76k forks source link

Expense - Duplicate expense created when two accounts submit expenses simultaneously #48405

Closed lanitochka17 closed 1 week ago

lanitochka17 commented 1 week ago

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: 9.0.27-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: N/A Email or phone of affected tester (no customers): biruknew45+540@gmail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. As User A, go to the chat with User B
  3. As User A, click on the plus sign > Submit Expense > Enter the amount > Click "Next," but do not click "Submit." Wait for User B to reach the same submission modal
  4. As User B, navigate to the chat with User A
  5. As User B, follow the same steps: click on the plus sign > Submit Expense > Enter the amount > Proceed to the final submit confirmation
  6. Instantly click the submit button for both User A and User B (User B submits first, then User A). [Submitting in this order causes the duplicate preview to appear in User A’s interface. Reversing the order results the duplicate appearing in User B’s interface.]

Expected Result:

No duplicate expense previews should be created

Actual Result:

Both expenses are created successfully, but a duplicate expense preview appears on User A's side. When trying to click on the duplicate, a "Not Here" page appears. when returning, the duplicate preview persists

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/8db97cb5-1f6f-4cdb-9b00-92f7841500fe

https://github.com/user-attachments/assets/362bd90e-cbdf-4e67-91c5-33e828133c71

Bug6590323_1725270815386!2

View all open jobs on GitHub

melvin-bot[bot] commented 1 week ago

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.

lanitochka17 commented 1 week ago

@mallenexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

mallenexpensify commented 1 week ago

Checking on in #vip-split https://expensify.slack.com/archives/C05RECHFBEW/p1725321739398449

MelvinBot commented 1 week ago

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

mallenexpensify commented 1 week ago

Closing for now, it's not likely to happen to real world users. Also, these should be part of #wave-collect cuz they're part of the bottom-up flow where an employee submits to a manager via a DM