Skip to content

[Due for payment 2025-04-23] [$250] Hybrid - Verification required for an Expensifail account when connect bank in WS #59815

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

Closed
2 of 8 tasks
IuliiaHerets opened this issue Apr 8, 2025 · 22 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 Reviewing Has a PR in review Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Apr 8, 2025

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: v9.1.24-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5892175&group_by=cases:section_id&group_id=306205&group_order=asc
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: iPhone 12 / iOS 17.7.2
App Component: Workspace Settings

Action Performed:

  1. Log in with a new Expensifail account (that does not have any bank account already added)
  2. Create a new Workspace
  3. Navigate to the Connect bank account modal in Workflow
  4. Select the Log in to your bank

Expected Result:

The app starts the connect bank Plaid flow normally

Actual Result:

The app asks for account verification before continuing the connect bank flow.
In Web/mWeb no need to enter a magic code for Expensifail account during adding BA.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/4f09958b-326f-46f1-9f1b-9be5342276f6
https://github.com/user-attachments/assets/592ec574-5dfd-4d0e-81eb-e4db90e27a2c

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021909908843010016302
  • Upwork Job ID: 1909908843010016302
  • Last Price Increase: 2025-04-09
  • Automatic offers:
    • ikevin127 | Reviewer | 106849315
Issue OwnerCurrent Issue Owner: @miljakljajic
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Apr 8, 2025
Copy link

melvin-bot bot commented Apr 8, 2025

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

@dukenv0307
Copy link
Contributor

@MariaHCD Are we planing to remove user data in Onyx now and return all necessary data into account data? Look like this bug has the same RCA with #58682. We're using account?.validated data and it doesn't exist in HybridApp. All places in the app are using user?.validated, we can create a hook useIsValidatedUser for all, and then after the migration from user to account is complete, we only need to change this hook.

if (!account?.validated) {
optionPressed.current = CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID;
toggleValidateCodeActionModal?.(true);

@MariaHCD
Copy link
Contributor

MariaHCD commented Apr 8, 2025

@dukenv0307 Yes, we are planning to merge the User onyx data into the Account model as part of this issue: #59277

Regarding your proposal for a hook - would that mean that we'd look in the User data first for validated and if it's not there, we'd look in the Account data?

cc: @inimaga

@dukenv0307
Copy link
Contributor

Regarding your proposal for a hook - would that mean that we'd look in the User data first for validated and if it's not there, we'd look in the Account data?

@MariaHCD Yes.

@MariaHCD
Copy link
Contributor

MariaHCD commented Apr 9, 2025

@dukenv0307 nice - yeah, that makes sense to me as a temporary solution for this 👍🏼

@inimaga as a heads up - we'd need to update/remove the hook once the migration is complete

@dukenv0307
Copy link
Contributor

@MariaHCD Got it, please assign me here then I can start with the PR

@MariaHCD MariaHCD added the External Added to denote the issue can be worked on by a contributor label Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

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

@melvin-bot melvin-bot bot changed the title Hybrid - Verification required for an Expensifail account when connect bank in WS [$250] Hybrid - Verification required for an Expensifail account when connect bank in WS Apr 9, 2025
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 9, 2025
@MariaHCD MariaHCD self-assigned this Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

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

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

melvin-bot bot commented Apr 9, 2025

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

Offer link
Upwork job

@MariaHCD
Copy link
Contributor

MariaHCD commented Apr 9, 2025

@dukenv0307 assigned you here but please post your full proposal here anyway - that would help to get a full picture of the RCA and your proposed solution

@dukenv0307
Copy link
Contributor

Proposal

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

The app asks for account verification before continuing the connect bank flow.
In Web/mWeb no need to enter a magic code for Expensifail account during adding BA.

What is the root cause of that problem?

account?.validated isn't available in the HybridApp.

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

We plan to remove the user data and migrate to account data here. Before that, we can create a hook to check whether the user is validated based on user data. After the migration, we can change to use the account data in this hook.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

NA

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@ikevin127
Copy link
Contributor

ikevin127 commented Apr 10, 2025

In Web/mWeb no need to enter a magic code for Expensifail account during adding BA.

Note: This statement is only true when logging-in with a private domain email, which I assume Expensifail (from step 1.) is.

I reproduced the issue and tested the solution, and given that we're already started on plans to remove the user data and migrate to account data in #59277, I think there's no point in writing a hook since the only issue with !account?.validated not being available on HybridApp seems to be in the VerifiedBankAccountFlowEntryPoint component.

I'd suggest doing something like this instead:

if (!user?.validated || !!account?.validated) { 
  • using !! operator for !!account?.validated since undefined on HybridApp means !undefined -> returns true.

and adding a note to remove !user?.validated and change back to !account?.validatedonce the migration to account is completed.

@dukenv0307 A hook can work too, whatever you think is best 👍 I guess you can move forward with the PR 🟢

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Apr 10, 2025
Copy link

melvin-bot bot commented Apr 15, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@ikevin127
Copy link
Contributor

👆Well...my fear came true, because we went with the hook and replaced all instances within the app instead of targeting the fix for VerifiedBankAccountFlowEntryPoint.tsx only. Lesson learned, next time I'll be more firm.

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Apr 16, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Apr 16, 2025
@melvin-bot melvin-bot bot changed the title [$250] Hybrid - Verification required for an Expensifail account when connect bank in WS [Due for payment 2025-04-23] [$250] Hybrid - Verification required for an Expensifail account when connect bank in WS Apr 16, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 16, 2025
Copy link

melvin-bot bot commented Apr 16, 2025

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

Copy link

melvin-bot bot commented Apr 16, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.28-15-staging 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 2025-04-23. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Apr 16, 2025

@ikevin127 / @dukenv0307 @miljakljajic @ikevin127 / @dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@ikevin127
Copy link
Contributor

ikevin127 commented Apr 23, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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: N/A: The HybridApp implementation did not account for the fact that the account object property (account?.validated) was not present, leading to this issue.

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

  1. Log in with a new private domain account (e.g Expensifail account) that does not have a bank account already added.
  2. Create a new Workspace.
  3. Navigate to the Connect bank account modal in Workflow.
  4. Select the Log in to your bank.
  5. Verify that the app starts the connect bank Plaid flow normally without asking for account verification.

Do we agree 👍 or 👎.

@miljakljajic Note that the PR had 1 regression which means -50% bounty penalty for contributor and reviewer.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 23, 2025
@ikevin127
Copy link
Contributor

cc @miljakljajic for payments visibility

@miljakljajic
Copy link
Contributor

Apologies, paying this now - thank you!

@miljakljajic
Copy link
Contributor

@dukenv0307 is owed 125 USD for their work on this issue.

@ikevin127 has been paid via UW

@miljakljajic
Copy link
Contributor

Thank you!

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 Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants