You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2025-02-05] [$250] Unable to receive New Magic Codes for Primary Contact #55405
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:
Create a new account.
Navigate to Settings > Profile > Contact Methods.
Click on the primary contact method to initiate the validation process:
- A magic code is correctly received
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 evidenceScreen.Recording.2025-01-16.at.8.31.17.PM.movIssue.2.mp4
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.
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
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:
@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]
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?
[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:
Create a new account.
Navigate to Settings > Profile > Contact Methods.
Click on the primary contact method to initiate the validation process:
Go back, and click on the primary contact method again.
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 😅
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?
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.
Activity
melvin-bot commentedon Jan 17, 2025
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.Shahidullah-Muffakir commentedon Jan 17, 2025
We can use the solution I proposed here https://expensify.slack.com/archives/C01GTK53T8Q/p1737052019921949?thread_ts=1737051983.903879&cid=C01GTK53T8Q
Shahidullah-Muffakir commentedon Jan 17, 2025
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 theonClosecallback of theValidateCodeActionModalin theContactMethodDetailsPage.App/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.tsx
Line 288 in a24a613
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
sakluger commentedon Jan 17, 2025
Asked about prioritization in Slack: https://expensify.slack.com/archives/C05LX9D6E07/p1737141519806509
melvin-bot commentedon Jan 18, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021880616053579900297
[-]Unable to receive New Magic Codes for Primary Contact[/-][+][$250] Unable to receive New Magic Codes for Primary Contact[/+]18 remaining items
melvin-bot commentedon Jan 29, 2025
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:
melvin-bot commentedon Jan 29, 2025
@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]
sakluger commentedon Feb 4, 2025
@ZhenjaHorbach please complete the BZ checklist before payment due date tomorrow.
sakluger commentedon Feb 4, 2025
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?
ZhenjaHorbach commentedon Feb 4, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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:
Do we agree 👍 or 👎
ZhenjaHorbach commentedon Feb 4, 2025
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 😅
cristipaval commentedon Feb 4, 2025
@sakluger, they only reported the issue 👍
Shahidullah-Muffakir commentedon Feb 4, 2025
Well, if Melvin says so…😜
sakluger commentedon Feb 5, 2025
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.
sakluger commentedon Feb 5, 2025
Summarizing payment on this issue:
Contributor: @nkdengineer $250, paid via Upwork
Contributor+: @ZhenjaHorbach $250, paid via Upwork