Skip to content

[PAUSED][$250] Web - Unable to create a split expense with a large number of room members #42562

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.75-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
Issue reported by: Applause - Internal Team

Issue found when executing PR #41077

Action Performed:

  1. Log in with a new expensifail account
  2. Create a workspace
  3. Create a room
  4. Invite 30 expensifail users
  5. Navigate to the room
  6. Create a manual split expense with a large number
  7. Set the priority to "Most recent"
  8. Open any of the created chats from the LHN

Expected Result:

I should be able to create the split expense without any errors

Actual Result:

Unable to create a split expense with a large number of room members with a new account. For the new chats I get "Unexpected error creating this chat, please try again later." error. For the split in the room, I get "Unexpected error submitting this expense. Please try again later." error
I also get a "Failed to load resource: the server responded with a status of 403 ()" console error

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

Bug6489845_1716495220190.bandicam_2024-05-23_22-06-06-473.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cb679b7ebce4149e
  • Upwork Job ID: 1798422926054946284
  • Last Price Increase: 2024-07-31
Issue OwnerCurrent Issue Owner: @sobitneupane

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 23, 2024
  2. melvin-bot commented on May 23, 2024

    @melvin-bot

    Triggered auto assignment to @slafortune (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.

  3. lanitochka17 commented on May 23, 2024

    @lanitochka17
    Author

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

  4. lanitochka17 commented on May 23, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-split

  5. slafortune commented on May 23, 2024

    @slafortune
    Contributor

    on vacation until June 4th - reassigning this.

  6. removed
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 23, 2024
  7. removed their assignment
    on May 23, 2024
  8. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on May 23, 2024
  9. melvin-bot commented on May 23, 2024

    @melvin-bot

    Triggered auto assignment to @zanyrenney (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.

  10. slafortune commented on May 23, 2024

    @slafortune
    Contributor

    Sounds like I'll readd myself to this as well and take it back on the 4th. I didn't add myself back to any that have been assigned where I was unable to look at them at all.

    Hey @slafortune , as an fyi for OOO re-assignments, you're supposed to add an additional assignee, but stay assigned so you can take the issue back over once you're back from OOO (assuming it's still open). Here's the relevant SO where the process is outlined.

    I'm going to re-add you to the issue, but happy to tackle it while you're OOO!

  11. self-assigned this
    on May 23, 2024
  12. nkdengineer commented on May 24, 2024

    @nkdengineer
    Contributor

    Proposal

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

    Unable to create a split expense with a large number of room members with a new account. For the new chats I get "Unexpected error creating this chat, please try again later." error. For the split in the room, I get "Unexpected error submitting this expense. Please try again later." error
    I also get a "Failed to load resource: the server responded with a status of 403 ()" console error

    What is the root cause of that problem?

    When we invite new user to the room, report?. participants still contains optimistic accountID and then when we create a split expense, we set the participants incorrectly here which makes SplitBill API fails

    App/src/libs/actions/IOU.ts

    Lines 6511 to 6514 in 8375abe

    const chatReportOtherParticipants = Object.keys(chatReport?.participants ?? {})
    .map(Number)
    .filter((accountID) => accountID !== currentUserAccountID);
    participants = chatReportOtherParticipants.map((accountID) => ({accountID, selected: true}));

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

    We should use the same way as we do to get the member in RoomMembersPage here to get the correct participants of the report

    const chatReportOtherParticipants = ReportUtils.getVisibleChatMemberAccountIDs(report?.reportID ?? '0').flatMap((accountID) => {
        const pendingMember = report?.pendingChatMembers?.findLast((member) => member.accountID === accountID.toString());
        return !pendingMember || pendingMember.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? accountID : [];
    });
    

    App/src/libs/actions/IOU.ts

    Lines 6511 to 6514 in 8375abe

    const chatReportOtherParticipants = Object.keys(chatReport?.participants ?? {})
    .map(Number)
    .filter((accountID) => accountID !== currentUserAccountID);
    participants = chatReportOtherParticipants.map((accountID) => ({accountID, selected: true}));

    What alternative solutions did you explore? (Optional)

    NA

  13. 25 remaining items

  14. changed the title [-][$250] Web - Unable to create a split expense with a large number of room members[/-] [+][PAUSED][$250] Web - Unable to create a split expense with a large number of room members[/+] on Jun 19, 2024
  15. melvin-bot commented on Jun 20, 2024

    @melvin-bot

    @slafortune @sobitneupane this issue is now 4 weeks old, please consider:

    • Finding a contributor to fix the bug
    • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
    • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

    Thanks!

  16. melvin-bot commented on Jun 26, 2024

    @melvin-bot

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

  17. melvin-bot commented on Jul 3, 2024

    @melvin-bot

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

  18. melvin-bot commented on Jul 10, 2024

    @melvin-bot

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

  19. slafortune commented on Jul 11, 2024

    @slafortune
    Contributor

    still paused

  20. sobitneupane commented on Jul 12, 2024

    @sobitneupane
    Contributor
  21. melvin-bot commented on Jul 17, 2024

    @melvin-bot

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

  22. mvtglobally commented on Jul 19, 2024

    @mvtglobally

    Issue not reproducible during KI retests. (First week)

  23. melvin-bot commented on Jul 24, 2024

    @melvin-bot

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

  24. melvin-bot commented on Jul 31, 2024

    @melvin-bot

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

  25. slafortune commented on Jul 31, 2024

    @slafortune
    Contributor

    Paused and not recreated in the last test - let's close this!

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.ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsMonthlyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions