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
[Ready for payment][$250] Account - Page not found when user re-added second contact after removal #75277
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Version Number: v9.2.59-1 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:https://test-management.browserstack.com/projects/2219752/folder/13176687/test-cases/41236654 Email or phone of affected tester (no customers): NA Issue reported by: Applause Internal Team Device used: iphone promax 13, IOS 26.1 App Component: Workspace Settings
Action Performed:
Launch hybrid app (IOS)
User logged in
Navigate to Profile >> Contact Methods
Tap "New Contact Method" >> Enter an email >> Tap "Add"
Enter magic code >> Tap "Verify"
Enter magic code >> Tap "Verify"
Tap on the just added 2nd contact method >> Select "Remove" >> Select "Yes, Continue" ( secondary contact method is removed from the list)
Repeat step 4 (enter the same email address)
Expected Result:
Magic code page is displayed and user able to continue verify email till complete the process of add 2nd contact
Actual Result:
After user tap "Add", the magic code page briefly displayed then "Hmm.. it's not here" appeared.
Note: the issue occurred on ios, not on Web and web
changed the title [-]Account - Page not found when user re-added second contact after removal[/-][+][$250] Account - Page not found when user re-added second contact after removal[/+]on Nov 26, 2025
Update: Unfortunately the alternative solution two is not working reliably across platforms like iOS App, but works on Web, and Android.
Why the fix should be in addPendingContactMethod, not clearUnvalidatedNewContactMethodAction
I tested both approaches with detailed logging. The logs show that Onyx.set(null) in clearUnvalidatedNewContactMethodAction doesn't fix the bug because the cache gets repopulated with stale data before addPendingContactMethod is called.
Evidence from logs
When addPendingContactMethod is called, the cache already contains stale data:
existingValue(fromcache): {"contactMethod": null,"validateCodeSent": null,"actionVerified": true,// ← STALE! Should not exist"errorFields": {"actionVerified": null}}
Why this happens
Onyx.set(null) clears the cache synchronously ✓
But the cache gets repopulated from a pending merge (the previous verification's successData that set actionVerified: true)
When Onyx.merge({contactMethod}) runs, it preserves the stale actionVerified: true
clearUnvalidatedNewContactMethodAction fix doesn't work
Both Onyx.set(null) and Onyx.merge(null) call the same internal OnyxUtils.remove() function:
// Both end up here:functionremove(key){OnyxCache.drop(key);// 1. Clear cache (sync)scheduleSubscriberUpdate(key,undefined);// 2. Notify subscribersreturnStorage.removeItem(key);// 3. DB removal (async)}
The cache is cleared, but pending Onyx operations in the merge queue can repopulate it before addPendingContactMethod is called. Changing clearUnvalidatedNewContactMethodAction to use Onyx.set(null) doesn't prevent this repopulation.
But Onyx.set in addPendingContactMethod fixes it
Using Onyx.set({contactMethod}) instead of Onyx.merge({contactMethod}) completely replaces the value, ignoring any stale data in cache. This ensures a clean state regardless of what's in cache or DB.
changed the title [-][$250] Account - Page not found when user re-added second contact after removal[/-][+][Ready for payment][$250] Account - Page not found when user re-added second contact after removal[/+]on Jan 14, 2026
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Activity
melvin-bot commentedon Nov 17, 2025
Triggered auto assignment to @strepanier03 (
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.strepanier03 commentedon Nov 17, 2025
Setting to Needs Repro because I can't test iOS: App.
MelvinBot commentedon Nov 18, 2025
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989
situchan commentedon Nov 18, 2025
I reproduced following step in OP.
Screen.Recording.2025-11-18.at.9.06.19.AM.mov
I can take this as C+
melvin-bot commentedon Nov 26, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021993522678012879486
[-]Account - Page not found when user re-added second contact after removal[/-][+][$250] Account - Page not found when user re-added second contact after removal[/+]42 remaining items
TaduJR commentedon Dec 13, 2025
Update: Unfortunately the alternative solution two is not working reliably across platforms like iOS App, but works on Web, and Android.
Why the fix should be in
addPendingContactMethod, notclearUnvalidatedNewContactMethodActionI tested both approaches with detailed logging. The logs show that
Onyx.set(null)inclearUnvalidatedNewContactMethodActiondoesn't fix the bug because the cache gets repopulated with stale data beforeaddPendingContactMethodis called.Evidence from logs
When
addPendingContactMethodis called, the cache already contains stale data:Why this happens
clearUnvalidatedNewContactMethodAction fix doesn't work
Both Onyx.set(null) and Onyx.merge(null) call the same internal OnyxUtils.remove() function:
The cache is cleared, but pending Onyx operations in the merge queue can repopulate it before addPendingContactMethod is called. Changing clearUnvalidatedNewContactMethodAction to use Onyx.set(null) doesn't prevent this repopulation.
But Onyx.set in addPendingContactMethod fixes it
Using Onyx.set({contactMethod}) instead of Onyx.merge({contactMethod}) completely replaces the value, ignoring any stale data in cache. This ensures a clean state regardless of what's in cache or DB.
TaduJR commentedon Dec 13, 2025
PR is ready!
Julesssss commentedon Dec 22, 2025
PR merged
TaduJR commentedon Jan 14, 2026
I think this is ready for payment.
Production deployed 3 weeks ago.
[-][$250] Account - Page not found when user re-added second contact after removal[/-][+][Ready for payment][$250] Account - Page not found when user re-added second contact after removal[/+]Julesssss commentedon Jan 14, 2026
Ah yes, not sure what happened here.
@strepanier03 could you please pay the contributors, the automation must have failed somehow.
strepanier03 commentedon Jan 27, 2026
Thanks for the bump @TaduJR - Ownership was still set to someone else so this wasn't appearing in my K2, I just switched it over. I'll handle today.
strepanier03 commentedon Jan 27, 2026
Payment summary
For: #77507
situchan commentedon Jan 27, 2026
@situchan I already accepted this automatic offer
strepanier03 commentedon Jan 27, 2026
Thanks @situchan - Upwork wasn't showing me an active contract so I created the new one. I paid the original and then withdrew the new offer.
@TaduJR - Upwork is on the fritz, it showed me two offers sent to you when I only sent you one. I paid one of the offers and canceled the other.