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 2024-12-16] [$250] Web - Expensify card - Error when wrong 4 digit is used persists for a few sec after a refresh #51396

Closed
1 of 8 tasks
IuliiaHerets opened this issue Oct 24, 2024 · 28 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 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 24, 2024

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: 9.0.53-0
Reproducible in staging?: Y
Reproducible in production?: Y
Issue was found when executing this PR: #50660
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

Pre-conditions:

  • Workspace is connected with a bank account
  • Workspace has a member invited
  • Workspace has enabled Expensify card
  • Admin has issued a physical card for employee
  • Employee is done adding shipping details to receive the card
  1. Sign in with the invited member's account
  2. Go to wallet > Open issued physical card RHP
  3. Use random 4 digit number to activate the card
  4. Refresh the page

Expected Result:

The error message disappears instantly after the refresh

Actual Result:

The error message persists for a few seconds before disappearing

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6643823_1729723834504.bandicam_2024-10-24_01-41-51-451.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021849456473737219382
  • Upwork Job ID: 1849456473737219382
  • Last Price Increase: 2024-11-07
  • Automatic offers:
    • nyomanjyotisa | Contributor | 104837703
Issue OwnerCurrent Issue Owner: @bfitzexpensify
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 24, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

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

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-collect - Release 2

@IuliiaHerets
Copy link
Author

@bfitzexpensify FYI 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

@nyomanjyotisa
Copy link
Contributor

Proposal

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

Web - Expensify card - Error when wrong 4 digit is used persists for a few sec after a refresh

What is the root cause of that problem?

On reload page the clearCardListErrors function not executed on useEffect cleanup

useEffect(
() => () => {
if (!inactiveCard?.cardID) {
return;
}
CardSettings.clearCardListErrors(inactiveCard?.cardID);
},
[inactiveCard?.cardID],
);

And the error cleared when OpenPaymentsPage API call done, which set the cardList onyx data with the card list data without error

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

Clear the card list error on mount using useEffect

    useEffect(() => {
        if (!inactiveCard?.cardID) {
            return;
        }
        CardSettings.clearCardListErrors(inactiveCard?.cardID);
    }, [inactiveCard?.cardID]);

Or clear both on mount and on unmount

    useEffect(() => {
        if (!inactiveCard?.cardID) {
            return;
        }
        CardSettings.clearCardListErrors(inactiveCard?.cardID);
    
        return () => {
            if (!inactiveCard?.cardID) {
                return;
            }
            CardSettings.clearCardListErrors(inactiveCard?.cardID);
        };
    }, [inactiveCard?.cardID]);

What alternative solutions did you explore? (Optional)

@bfitzexpensify bfitzexpensify added the External Added to denote the issue can be worked on by a contributor label Oct 24, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

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

@melvin-bot melvin-bot bot changed the title Web - Expensify card - Error when wrong 4 digit is used persists for a few sec after a refresh [$250] Web - Expensify card - Error when wrong 4 digit is used persists for a few sec after a refresh Oct 24, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 24, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

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

Copy link

melvin-bot bot commented Oct 29, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Oct 29, 2024
@bfitzexpensify
Copy link
Contributor

Proposal ready for review in #51396 (comment) @alitoshmatov

Copy link

melvin-bot bot commented Oct 31, 2024

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

Copy link

melvin-bot bot commented Oct 31, 2024

@bfitzexpensify, @alitoshmatov Still overdue 6 days?! Let's take care of this!

@alitoshmatov
Copy link
Contributor

I don't think I can reproduce this issue as it requires physical card being issued. @nyomanjyotisa Were you able to reproduce this issue or assumed the solution here

@melvin-bot melvin-bot bot removed the Overdue label Nov 3, 2024
@nyomanjyotisa
Copy link
Contributor

@alitoshmatov I still can reproduce this issue on staging

-1-New-Expensify.webm

Make sure you have done pre-conditions on the OP steps

Copy link

melvin-bot bot commented Nov 7, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Nov 7, 2024
@alitoshmatov
Copy link
Contributor

Okay I think we can go with @nyomanjyotisa 's proposal which cleans errors on mount and unmount

C+ reviewed 🎀 👀 🎀

@melvin-bot melvin-bot bot removed the Overdue label Nov 10, 2024
Copy link

melvin-bot bot commented Nov 10, 2024

Triggered auto assignment to @cristipaval, 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 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

📣 @nyomanjyotisa 🎉 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 📖

@melvin-bot melvin-bot bot added Overdue Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Nov 14, 2024
@bfitzexpensify
Copy link
Contributor

How is this one going @nyomanjyotisa?

@nyomanjyotisa
Copy link
Contributor

Still waiting for confirmation from @alitoshmatov based on my last comment on the PR #52303 (comment)

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

This issue has not been updated in over 15 days. @cristipaval, @bfitzexpensify, @alitoshmatov, @nyomanjyotisa 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!

@cristipaval cristipaval added Weekly KSv2 and removed Monthly KSv2 labels Dec 9, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 9, 2024
@melvin-bot melvin-bot bot changed the title [$250] Web - Expensify card - Error when wrong 4 digit is used persists for a few sec after a refresh [HOLD for payment 2024-12-16] [$250] Web - Expensify card - Error when wrong 4 digit is used persists for a few sec after a refresh Dec 9, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

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

Copy link

melvin-bot bot commented Dec 9, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.72-1 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 2024-12-16. 🎊

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

Copy link

melvin-bot bot commented Dec 9, 2024

@alitoshmatov @bfitzexpensify @alitoshmatov 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]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 16, 2024
@bfitzexpensify
Copy link
Contributor

Payment complete for @nyomanjyotisa

@alitoshmatov, please complete the BZ checklist and I'll post the payment summary for the C+ work

@alitoshmatov
Copy link
Contributor

alitoshmatov commented Dec 16, 2024

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: https://github.com/Expensify/App/pull/38998/files#r1887574014

  • [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: No discussion

  • [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.

I don't think regression test is needed

@alitoshmatov
Copy link
Contributor

@bfitzexpensify Done

@bfitzexpensify
Copy link
Contributor

Thanks!

Payment summary:

@alitoshmatov owed $250 for C+ work via NewDot manual request

@JmillsExpensify
Copy link

$250 approved for @alitoshmatov

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

No branches or pull requests

6 participants