Skip to content

[HOLD for payment 2025-02-05] [$250] Unable to receive New Magic Codes for Primary Contact #55405

Closed

Description

@m-natarajan

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: 9.0.87-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @Shahidullah-Muffakir
Slack conversation (hyperlinked to channel name): open_source

Action Performed:

  1. Create a new account.
  2. Navigate to Settings > Profile > Contact Methods.
  3. Click on the primary contact method to initiate the validation process:
    - A magic code is correctly received
  4. Go back, and click on the primary contact method again.

Expected Result:

Magic code is sent

Actual Result:

No new magic code is sent. We don't reset validatedCodeSent to false after sending a magic code,
so when the validatedCodeSent is true, we don't send a magic code

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence
Screen.Recording.2025-01-16.at.8.31.17.PM.mov
Issue.2.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021880616053579900297
  • Upwork Job ID: 1880616053579900297
  • Last Price Increase: 2025-01-18
  • Automatic offers:
    • ZhenjaHorbach | Reviewer | 105772141
    • nkdengineer | Contributor | 105772145
Issue OwnerCurrent Issue Owner: @sakluger

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 17, 2025
  2. melvin-bot commented on Jan 17, 2025

    @melvin-bot

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

  3. Shahidullah-Muffakir commented on Jan 17, 2025

    @Shahidullah-Muffakir
    Contributor
  4. Shahidullah-Muffakir commented on Jan 17, 2025

    @Shahidullah-Muffakir
    Contributor

    Proposal

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

    When a user initiates the validation process for a primary contact method, a magic code is sent as expected. However, if the user attempts to resend a magic code by clicking on the primary contact method again, no new magic code is sent.

    What is the root cause of that problem?

    The root cause is that the validatedCodeSent state remains set to true after a magic code is sent. This prevents additional magic codes from being sent when the user attempts to resend them, as the condition to send a magic code depends on this state being false.

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

    To resolve this issue, we should reset the validatedCodeSent state to false after the Modal closes:

    Call the function User.resetContactMethodValidateCodeSentState(contactMethod) in the onClose callback of the ValidateCodeActionModal in the ContactMethodDetailsPage.

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

    NA

    What alternative solutions did you explore? (Optional)

    NA

  5. added
    InternalRequires API changes or must be handled by Expensify staff
    on Jan 17, 2025
  6. sakluger commented on Jan 17, 2025

    @sakluger
    Contributor
  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    and removed
    InternalRequires API changes or must be handled by Expensify staff
    on Jan 18, 2025
  8. melvin-bot commented on Jan 18, 2025

    @melvin-bot
  9. changed the title [-]Unable to receive New Magic Codes for Primary Contact[/-] [+][$250] Unable to receive New Magic Codes for Primary Contact[/+] on Jan 18, 2025
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 18, 2025
  11. 18 remaining items

  12. melvin-bot commented on Jan 29, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.90-6 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-02-05. 🎊

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

  13. melvin-bot commented on Jan 29, 2025

    @melvin-bot

    @ZhenjaHorbach @sakluger @ZhenjaHorbach 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]

  14. sakluger commented on Feb 4, 2025

    @sakluger
    Contributor

    @ZhenjaHorbach please complete the BZ checklist before payment due date tomorrow.

  15. sakluger commented on Feb 4, 2025

    @sakluger
    Contributor

    Also @ZhenjaHorbach @cristipaval - I see @Shahidullah-Muffakir on the comment above regarding who should be paid, but I think it's just because the original description shows that they reported the issue (which we no longer pay for). Did we use anything from @Shahidullah-Muffakir's proposal that would warrant a payment?

  16. ZhenjaHorbach commented on Feb 4, 2025

    @ZhenjaHorbach
    Contributor

    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: Refactor: reuse ValidateCodeActionModal #49445 (comment)

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

      NA

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

    Test:

    1. Create a new account.
    2. Navigate to Settings > Profile > Contact Methods.
    3. Click on the primary contact method to initiate the validation process:
    4. Go back, and click on the primary contact method again.
    5. Verify that: Magic code is sent

    Do we agree 👍 or 👎

  17. ZhenjaHorbach commented on Feb 4, 2025

    @ZhenjaHorbach
    Contributor

    Also @ZhenjaHorbach @cristipaval - I see @Shahidullah-Muffakir on the comment above regarding who should be paid, but I think it's just because the original description shows that they reported the issue (which we no longer pay for). Did we use anything from @Shahidullah-Muffakir's proposal that would warrant a payment?

    Yes
    They reported the issue
    And I think no payment is required here
    But if there are any arguments, we may take this into account 😅

  18. cristipaval commented on Feb 4, 2025

    @cristipaval
    Contributor

    @sakluger, they only reported the issue 👍

  19. Shahidullah-Muffakir commented on Feb 4, 2025

    @Shahidullah-Muffakir
    Contributor

    Also @ZhenjaHorbach @cristipaval - I see @Shahidullah-Muffakir on the comment above regarding who should be paid, but I think it's just because the original description shows that they reported the issue (which we no longer pay for). Did we use anything from @Shahidullah-Muffakir's proposal that would warrant a payment?

    Well, if Melvin says so…😜

  20. sakluger commented on Feb 5, 2025

    @sakluger
    Contributor

    Haha I confirmed that it was just from reporting the issue. I submitted a bug report elsewhere to stop adding the issue reporter to that GH comment, since it's kinda confusing.

  21. sakluger commented on Feb 5, 2025

    @sakluger
    Contributor

    Summarizing payment on this issue:

    Contributor: @nkdengineer $250, paid via Upwork
    Contributor+: @ZhenjaHorbach $250, paid via Upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions