Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2023-03-31] After adding a Personal Bank Account as part of paying an IOU or sending money, the Plaid flow is re-triggered unnecessarily #15202

Closed
1 of 6 tasks
MariaHCD opened this issue Feb 16, 2023 · 25 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff

Comments

@MariaHCD
Copy link
Contributor

MariaHCD commented Feb 16, 2023

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


Noticed when working on #14477

Action Performed:

  1. Have a user account under the wallet beta and with no PBA set up
  2. Attempt to pay a money request
  3. Select Pay with Expensify > Bank Account
  4. Add a PBA via Plaid
  5. On the PBA success page click Continue
  6. Observe that the Plaid flow is re-triggered

Expected Result:

Plaid should not have been triggered again

Actual Result:

The Plaid flow is re-triggered even when the PBA has already been added

Workaround:

You can exit the Plaid flow.

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number:
Reproducible in staging?:
Reproducible in production?:
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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-02-15.at.1.07.58.PM.mov

Expensify/Expensify Issue URL: NA
Issue reported by: NA
Slack conversation: NA

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012e988d7ff14e6541
  • Upwork Job ID: 1626151929343234048
  • Last Price Increase: 2023-02-16
@MariaHCD MariaHCD added Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Bug Something is broken. Auto assigns a BugZero manager. labels Feb 16, 2023
@MariaHCD MariaHCD self-assigned this Feb 16, 2023
@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 16, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~012e988d7ff14e6541

@MelvinBot
Copy link

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

@MelvinBot
Copy link

Triggered auto assignment to Contributor Plus for review of internal employee PR - @Santhosh-Sellavel (Internal)

@MariaHCD MariaHCD changed the title After adding a Personal Bank Account as part of Wallet KYC the Plaid flow is re-triggered After adding a Personal Bank Account as part of paying an IOU or sending money, the Plaid flow is re-triggered unnecessarily Feb 16, 2023
@melvin-bot melvin-bot bot added the Overdue label Feb 20, 2023
@melvin-bot melvin-bot bot unlocked this conversation Feb 20, 2023
@MariaHCD
Copy link
Contributor Author

Looking into this!

@MariaHCD
Copy link
Contributor Author

This issue is also likely related to this one: #15197

Continuing to investigate.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Feb 23, 2023
@puneetlath
Copy link
Contributor

@MariaHCD how is this going?

@melvin-bot melvin-bot bot removed the Overdue label Feb 27, 2023
@MariaHCD
Copy link
Contributor Author

Haven't found the bug yet but I'm still looking!

@MelvinBot
Copy link

@puneetlath @MariaHCD @Santhosh-Sellavel this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Mar 2, 2023
@MariaHCD
Copy link
Contributor Author

MariaHCD commented Mar 3, 2023

Confirmed adding a personal bank account via Payments > Add payment method > Bank account does not re-trigger Plaid:

Screen.Recording.2023-03-03.at.3.35.08.PM.mov

But adding a bank account when sending money results in Plaid being re-triggered (the OpenPlaidBankLogin command was called again):

Screen.Recording.2023-03-03.at.3.40.58.PM.mov

@melvin-bot melvin-bot bot removed the Overdue label Mar 3, 2023
@MariaHCD
Copy link
Contributor Author

MariaHCD commented Mar 3, 2023

It looks like this is happening because componentDidMount() in AddPlaidBankAccount executes again once the PBA is added.

I think what happens is:

  1. On the PBA success page, after clicking Continue, we clear the Plaid data via BankAccounts.clearPersonalBankAccount()
  2. But this results in this condition evaluating to true
  3. So we call BankAccounts.openPlaidBankLogin again

Commented out BankAccounts.clearPersonalBankAccount() here and that prevented the Plaid flow from being re-triggered again.

Next step for me is to see what's a better way either:

  1. Clear the PBA Onyx keys in the payments page instead OR
  2. Improve this condition so it does not re-trigger Plaid

@MelvinBot
Copy link

@puneetlath, @MariaHCD, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@MariaHCD
Copy link
Contributor Author

The PR is being reviewed: #15679

@MelvinBot
Copy link

@puneetlath, @MariaHCD, @Santhosh-Sellavel Whoops! This issue is 2 days overdue. Let's get this updated quick!

@puneetlath
Copy link
Contributor

PR has been merged.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 24, 2023
@melvin-bot melvin-bot bot changed the title After adding a Personal Bank Account as part of paying an IOU or sending money, the Plaid flow is re-triggered unnecessarily [HOLD for payment 2023-03-31] After adding a Personal Bank Account as part of paying an IOU or sending money, the Plaid flow is re-triggered unnecessarily Mar 24, 2023
@MelvinBot
Copy link

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 24, 2023
@MelvinBot
Copy link

MelvinBot commented Mar 24, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.88-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-03-31. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@MelvinBot
Copy link

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@Santhosh-Sellavel / @puneetlath / @MariaHCD] The PR that introduced the bug has been identified. Link to the PR:
  • [@Santhosh-Sellavel / @puneetlath / @MariaHCD] 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:
  • [@Santhosh-Sellavel / @puneetlath / @MariaHCD] 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:
  • [@puneetlath] Determine if we should create a regression test for this bug.
  • [@Santhosh-Sellavel] 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.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@Santhosh-Sellavel
Copy link
Collaborator

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

@Santhosh-Sellavel
Copy link
Collaborator

@puneetlath @MariaHCD

I've completed the checklist above, if you disagree with the above please let me know, thanks!

@MariaHCD
Copy link
Contributor Author

LGTM, thanks @Santhosh-Sellavel!

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 31, 2023
@MariaHCD
Copy link
Contributor Author

MariaHCD commented Apr 3, 2023

I believe we're ready for the payment to C+ to be issue here, @puneetlath

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 3, 2023
@MariaHCD MariaHCD removed the Overdue label Apr 3, 2023
@puneetlath
Copy link
Contributor

Thanks for the bump @MariaHCD.

@Santhosh-Sellavel sent you a contract: https://www.upwork.com/nx/wm/pre-hire/c/8577561/offer/23964544

@Santhosh-Sellavel
Copy link
Collaborator

Thanks @puneetlath

@puneetlath
Copy link
Contributor

Paid! Looks like we're all done here. Thanks everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

4 participants