App icon indicating copy to clipboard operation
App copied to clipboard

[LOW] [Splits] [$500] Request – Unable to Request money twice to the same user you have no conversation with.

Open izarutskaya opened this issue 1 year ago • 42 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: v1.4.16-1 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: @

Prerequisite: The new account you're requesting money from must have an updated user name in NewDot, ie. first name = Matt, last = test, as seen in Matt A's vid below.

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in
  3. Click the FAB menu in LHN
  4. Click on "Request money" Manual.
  5. Enter an amount into the BNP and click Next
  6. Enter an email of the user you have no conversation with and click on the “Request …”
  7. Go back to the LHN and create one more request with the same user (repeat steps 3-6)

Expected Result:

Two requests are in DM with the user you just sent a request to.

Actual Result:

Error appears when create the second request.

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

https://github.com/Expensify/App/assets/115492554/a7f9f83a-06d9-4058-920a-da5ec4caae97

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01497816ffe49c0bd0
  • Upwork Job ID: 1738134853342339072
  • Last Price Increase: 2024-04-13

izarutskaya avatar Dec 22 '23 09:12 izarutskaya

Job added to Upwork: https://www.upwork.com/jobs/~01497816ffe49c0bd0

melvin-bot[bot] avatar Dec 22 '23 09:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 22 '23 09:12 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 Dec 22 '23 09:12 melvin-bot[bot]

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

melvin-bot[bot] avatar Dec 22 '23 09:12 melvin-bot[bot]

This error is still exist? I can't find this error. It works well.

danieleverest avatar Dec 22 '23 11:12 danieleverest

📣 @handaniel214! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details. Screen Shot 2022-11-16 at 4 42 54 PM Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

melvin-bot[bot] avatar Dec 22 '23 11:12 melvin-bot[bot]

Proposal

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

Requesting money twice to the same user that we haven't chatted with before will give an error.

What is the root cause of that problem?

This has the same root cause as https://github.com/Expensify/App/issues/22031#issuecomment-1645159927.

In summary, when we create a money request with a user that we haven't chatted with before, we don't have their login yet. If we try to search for that same user when selecting the money request participant, we won't be able to find it and it will create a new optimistic account (with a different accountID) because we filter out any user that doesn't have a login. https://github.com/Expensify/App/blob/862b0eac87e969e3c15d2ccde165600a6e40e8fb/src/libs/OptionsListUtils.js#L1213-L1217

Because the accountID is different, we created a new chat report and it will throw an error because we already have an existing chat with that user.

In https://github.com/Expensify/App/issues/22031, we are holding for https://github.com/Expensify/App/issues/22480, but https://github.com/Expensify/App/issues/22480 actually doesn't fix https://github.com/Expensify/App/issues/22031. In https://github.com/Expensify/App/issues/22480, we only fix an issue where the user is unable to create a money request from within the chat by allowing the request to accept an account ID, so if the login is missing, the request will still succeed.

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

I tested doing money request, split, and send money and all of them can work even though the email/login is missing. We also have this PR to allow the user to do a split bill from within the chat with a user without login.

So, I believe it makes sense to show a user even without a login on the money request participant list as the BE can already handle it. We can have a new flag called includePersonalDetailsWithoutLogin and only set it to true for the money request participant list. Basically, we will have the same behavior between making a money request from FAB and from within the chat.

_.pick(personalDetails, (detail) => !includePersonalDetailsWithoutLogin && Boolean(detail.login) && !detail.isOptimisticPersonalDetail)

(or just remove the login logic for all cases)

bernhardoj avatar Dec 22 '23 12:12 bernhardoj

@mallenexpensify, @abdulrahuman5196 Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Dec 25 '23 12:12 melvin-bot[bot]

~Seems the issue was created near weekend. Will work on closing out review sooner.~

abdulrahuman5196 avatar Dec 25 '23 12:12 abdulrahuman5196

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

melvin-bot[bot] avatar Dec 29 '23 11:12 melvin-bot[bot]

📣 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 Dec 29 '23 16:12 melvin-bot[bot]

@mallenexpensify, @abdulrahuman5196 Still overdue 6 days?! Let's take care of this!

melvin-bot[bot] avatar Jan 01 '24 18:01 melvin-bot[bot]

@mallenexpensify Can we retest? I don't see this issue now

abdulrahuman5196 avatar Jan 01 '24 18:01 abdulrahuman5196

I don't either, going to close. Thanks @abdulrahuman5196 image

image

mallenexpensify avatar Jan 03 '24 01:01 mallenexpensify

Issue is still reproducible on the latest build 1.4.28-0

https://github.com/Expensify/App/assets/78819774/d47b8d00-c70a-47d6-a8eb-6a6b31f04bcb

lanitochka17 avatar Jan 19 '24 14:01 lanitochka17

📣 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 19 '24 16:01 melvin-bot[bot]

@mallenexpensify @abdulrahuman5196 this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

  • Decide whether any proposals currently meet our guidelines and can be approved as-is today
  • If no proposals meet that standard, please take this issue internal and treat it as one of your highest priorities
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

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

Current assignee @abdulrahuman5196 is eligible for the Internal assigner, not assigning anyone new.

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

Current assignee @abdulrahuman5196 is eligible for the External assigner, not assigning anyone new.

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

Ah... snap, I figured it out (and updated the OP)

Prerequisite: The new account you're requesting money from must have an updated user name in NewDot, ie. first name = Matt, last = test, as seen in Matt A's vid below.

https://github.com/Expensify/App/assets/22508304/a7ab37d8-6fd6-4606-a7ed-6456a0b768f9

@abdulrahuman5196 please review @bernhardoj 's proposal above, thx

mallenexpensify avatar Jan 19 '24 22:01 mallenexpensify

Let me check with the new updated OP

abdulrahuman5196 avatar Jan 22 '24 11:01 abdulrahuman5196

Please review the proposal above @abdulrahuman5196

mallenexpensify avatar Jan 26 '24 00:01 mallenexpensify

📣 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 26 '24 16:01 melvin-bot[bot]

Will close out review today.

abdulrahuman5196 avatar Jan 29 '24 10:01 abdulrahuman5196

Issue not reproducible during KI retests. (First week)

mvtglobally avatar Jan 30 '24 04:01 mvtglobally

Reviewing now

abdulrahuman5196 avatar Jan 30 '24 15:01 abdulrahuman5196

I don't see the same issue. But for me it shows infinite loader and there is some issue with the second request.

https://github.com/Expensify/App/assets/46707890/d80c1368-79c9-45ed-b5e5-4ee69c81670d

Anyways we only have one proposal from @bernhardoj https://github.com/Expensify/App/issues/33487#issuecomment-1867641550

@bernhardoj All the issues linked in the proposal has been closed. Could you kindly check and let me know if the proposal is still valid to solve this issue? Maybe the infinite loader issue I am facing as well? If not could you update if possible?

abdulrahuman5196 avatar Jan 30 '24 15:01 abdulrahuman5196

We have an open issue for the infinite loader here and the root cause is explained here. I think it should be fixed on the BE though to not set the report to null.

bernhardoj avatar Jan 31 '24 12:01 bernhardoj

Should I put this on hold pending the below?

  • https://github.com/Expensify/App/issues/34577

mallenexpensify avatar Feb 02 '24 01:02 mallenexpensify

Yes, I think it's better to hold for it.

bernhardoj avatar Feb 02 '24 03:02 bernhardoj