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

[$500] Connect bank account - User can't continue / receives error if returns to entering account page and tap Continue #30686

Closed
6 tasks done
izarutskaya opened this issue Nov 1, 2023 · 24 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Nov 1, 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!


Version Number: 1.3.94-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. Go to staging.new.expensify.com or open Expensify App and login with any account
  2. Go to existing workspace or create new one
  3. Go to Workspace > Connect bank account
  4. Tap 'Connect with Plaid' and select any bank (eq. Chase)
  5. Follow the flow until 'Personal Information' page
  6. Click 'Back' (<) button twice to return to the page for entering routing and account numbers
  7. Click/Tap 'Continue'

Expected Result:

User goes to the page 'Company Information'

Actual Result:

User receives an error message and cannot continue

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

Bug6258972_1698815006327.BA-Chase-error-after-return-account-numbers-page.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011f6c8b5dad4aad8a
  • Upwork Job ID: 1719693003927179264
  • Last Price Increase: 2023-11-08
  • Automatic offers:
    • dukenv0307 | Contributor | 27590431
@izarutskaya izarutskaya added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 1, 2023
@melvin-bot melvin-bot bot changed the title Connect bank account - User can't continue / receives error if returns to entering account page and tap Continue [$500] Connect bank account - User can't continue / receives error if returns to entering account page and tap Continue Nov 1, 2023
Copy link

melvin-bot bot commented Nov 1, 2023

Job added to Upwork: https://www.upwork.com/jobs/~011f6c8b5dad4aad8a

Copy link

melvin-bot bot commented Nov 1, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 1, 2023
Copy link

melvin-bot bot commented Nov 1, 2023

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

Copy link

melvin-bot bot commented Nov 1, 2023

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

@yh-0218
Copy link
Contributor

yh-0218 commented Nov 1, 2023

Proposal

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

Connect bank account - User can't continue / receives error if returns to entering account page and tap Continue

What is the root cause of that problem?

Because we got validation about masked accountNumber here.

if (
values.accountNumber &&
!CONST.BANK_ACCOUNT.REGEX.US_ACCOUNT_NUMBER.test(values.accountNumber.trim()) &&
!CONST.BANK_ACCOUNT.REGEX.MASKED_US_ACCOUNT_NUMBER.test(values.accountNumber.trim())
) {

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

We don't need to validate about masked accountNumber because that is saved after validation on step3.
so we need to change validation
We need to update like this.

if (
        values.accountNumber &&
        !shouldDisableInputs &&
        !CONST.BANK_ACCOUNT.REGEX.US_ACCOUNT_NUMBER.test(values.accountNumber.trim()) &&
        !CONST.BANK_ACCOUNT.REGEX.MASKED_US_ACCOUNT_NUMBER.test(values.accountNumber.trim())
) {

What alternative solutions did you explore? (Optional)

We can didn't mask about account number

Screen.Recording.2023-11-01.at.3.44.51.PM.mov

@dukenv0307
Copy link
Contributor

dukenv0307 commented Nov 1, 2023

Proposal

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

  1. User receives an error message and cannot continue if they enter a 16-digit account number, go all the way to the Personal information page and go back to edit.

  2. There's also another problem: When starting the Connecting bank account flow, if we enter a masked account number like XXXX1234, it will still let us through

What is the root cause of that problem?

  1. The back-end is always leaving 4 last digits and mask the rest, while the front-end is expecting account number longer than 13 digits to be masked differently here. So the front-end regex will throw error if a more-than-13-digits account number has 4 last digits unmasked and the rest masked.
  2. Even in the initial bank account flow, we're allowing masked number to go through here. Masked number should only be allowed when coming back the bank account page, where the account number was already replaced by back-end with masked number.

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

  1. Fix the front-end to match the masked account number rule of back-end, or fix back-end to align with front-end
  2. Allow masked bank account number only if shouldDisableInputs is true (that means the bank account number is already saved and is replaced by BE by masked one). To do this, we can update this line to:
!(shouldDisableInputs && CONST.BANK_ACCOUNT.REGEX.MASKED_US_ACCOUNT_NUMBER.test(values.accountNumber.trim()))

What alternative solutions did you explore? (Optional)

NA

Result

poc-resize.mov

@melvin-bot melvin-bot bot added the Overdue label Nov 3, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

@CortneyOfstad, @sobitneupane Huh... This is 4 days overdue. Who can take care of this?

@CortneyOfstad
Copy link
Contributor

@sobitneupane thoughts on the proposals above? TIA!

@melvin-bot melvin-bot bot removed the Overdue label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 8, 2023

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

@sobitneupane
Copy link
Contributor

Sorry for the delay. Will review the proposals shortly.

@sobitneupane
Copy link
Contributor

sobitneupane commented Nov 9, 2023

Thanks for the proposal everyone.

@dukenv0307 Thanks for the detailed explanation on root cause.

The back-end is always leaving 4 last digits and mask the rest, while the front-end is expecting account number longer than 13 digits to be masked differently here. So the front-end regex will throw error if a more-than-13-digits account number has 4 last digits unmasked and the rest masked.

As mentioned in the proposal, the format in which backend returns the account detail is different than expected in the frontend. So, to solve the issue we should either update frontend to expect only last 4 digits for masked account number. Or update backend to return account number with first 6 digit and last 4 digit if the length of account number is greater than 13.

Proposal from @dukenv0307 looks good to me.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Nov 9, 2023

Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 9, 2023
Copy link

melvin-bot bot commented Nov 9, 2023

📣 @sobitneupane Please request via NewDot manual requests for the Reviewer role ($500)

@lakchote
Copy link
Contributor

lakchote commented Nov 9, 2023

@dukenv0307 proposal LGTM 👍

Copy link

melvin-bot bot commented Nov 9, 2023

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@dukenv0307
Copy link
Contributor

@sobitneupane @lakchote I want to double-confirm here

  1. So, to solve the issue we should either update frontend to expect only last 4 digits for masked account number.
    Or
  2. update backend to return account number with first 6 digit and last 4 digit if the length of account number is greater than 13.

Which option that we gonna choose?

@lakchote
Copy link
Contributor

@dukenv0307 In my opinion, the backend is the source of truth. I would go with #1. @sobitneupane what's your opinion?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 10, 2023
@dukenv0307
Copy link
Contributor

@sobitneupane The PR is ready for review

@sobitneupane
Copy link
Contributor

Yeah. Good to go with first option.

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Dec 4, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

This issue has not been updated in over 15 days. @CortneyOfstad, @lakchote, @sobitneupane, @dukenv0307 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@sobitneupane
Copy link
Contributor

PR was deployed to production two weeks back. Ready for payment.

cc: @CortneyOfstad

@CortneyOfstad CortneyOfstad added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Dec 6, 2023
@CortneyOfstad
Copy link
Contributor

Payment Summary

@sobitneupane
Copy link
Contributor

Requested payment on newDot.

@JmillsExpensify
Copy link

$500 payment approved for @sobitneupane based on comment above.

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. External Added to denote the issue can be worked on by a contributor Monthly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants