Skip to content

[$250] Login - "All caught up" and skeleton loading in Inbox after logging with magic link and 2FA #79389

Closed

Description

@vincdargento

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.2.99-5
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/13176924/test-cases/41237550
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: MacBook Air 15.7.3 Chrome
App Component: Other

Action Performed:

Preconditions: use an account with 2FA enabled

  1. Navigate to ND, on Sign in page enter an account from the preconditions, click continue
  2. Verify you're asked for the magic code
  3. Navigate to email and locate the magic link
  4. Change the link to staging, paste the link in the new tab
  5. Navigate to the link - the 2FA code is asked
  6. On the main page enter the correct 2FA code in the code field
  7. Navigate from Home to Inbox

Expected Result:

Inbox page loads successfully

Actual Result:

"All caught up" is displayed in LHN, skeleton loading is shown in the Inbox

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022011668237611239662
  • Upwork Job ID: 2011668237611239662
  • Last Price Increase: 2026-04-15
Issue OwnerCurrent Issue Owner: @ahmedGaber93

Activity

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

    @melvin-bot

    Triggered auto assignment to @kadiealexander (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. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 15, 2026
  4. changed the title [-]Login - "All caught up" and skeleton loading in Inbox after logging with magic link and 2FA[/-] [+][$250] Login - "All caught up" and skeleton loading in Inbox after logging with magic link and 2FA[/+] on Jan 15, 2026
  5. melvin-bot commented on Jan 15, 2026

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 15, 2026
  7. melvin-bot commented on Jan 15, 2026

    @melvin-bot

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

  8. cosmicvulpes commented on Jan 15, 2026

    @cosmicvulpes
    Contributor

    Proposal

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

    After 2FA login, LHN shows "All caught up" despite reports existing in Onyx. Refreshing fixes it.

    What is the root cause of that problem?

    reportAttributes.compute() returns {reports: {}} when areAllConnectionsSet is false.

    The NVP_PREFERRED_LOCALE dependency uses ARE_TRANSLATIONS_LOADING with initWithStoredValues: false. In multi-tab scenarios, translations may already be loaded before OnyxDerived.init() runs. Since initWithStoredValues: false only fires on changes, the callback never fires, the locale dependency never initializes, and areAllConnectionsSet stays false forever.

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

    In src/libs/actions/OnyxDerived/index.ts, dynamically set initWithStoredValues based on whether translations are already loaded:

    const areTranslationsAlreadyLoaded = !!IntlStore.getCurrentLocale();
    Onyx.connectWithoutView({
        key: ONYXKEYS.ARE_TRANSLATIONS_LOADING,
        initWithStoredValues: areTranslationsAlreadyLoaded,
        callback: (value) => { ... }
    });

    If translations are already loaded, initWithStoredValues: true ensures the callback fires immediately with the stored false value, initializing the dependency.

    What alternative solutions did you explore? (Optional)

    N/A

  9. ShridharGoel commented on Jan 15, 2026

    @ShridharGoel
    Contributor

    Able to repro even after trying the above proposal

  10. cosmicvulpes commented on Jan 16, 2026

    @cosmicvulpes
    Contributor

    @ShridharGoel Updated the proposal. The fix is working fine now, verified on my dev instance. Please take a look again.

  11. 131 remaining items

  12. mmsumer commented on Jul 4, 2026

    @mmsumer
    Contributor

    @ahmedGaber93 Based on my previous comment, the issue is not reproducible on InboxPage. It is reproducible on HomePage in ForYouSection/index.tsx. As I defined in the preconditions of the draft PR, we need a couple of reports to reproduce it on the HomePage.

    Previous debugging video is here but it is outdated. Because todos logic has been refactored recently in this PR and race condition appears to have been resolved as well. Proposal's Issue 3 is not valid anymore.

    Rendering Skeleton View logic was also refactored in the same PR. As a result, Proposal's Issue 2 is not valid anymore.

    In summary, Proposal's Issue 1, 2, and 3 are no longer valid. Proposal is outdated completely.

    There is nothing to solve from OP. However, ForYouSection still has a reproducible bug on latest main:

    bug.mov

    cc @mallenexpensify

  13. ahmedGaber93 commented on Jul 7, 2026

    @ahmedGaber93
    Contributor

    However, ForYouSection still has a reproducible bug on latest main:

    @mmsumer could you please share the full steps to reproduce this bug?

  14. mmsumer commented on Jul 9, 2026

    @mmsumer
    Contributor

    could you please share the full steps to reproduce this bug?

    @ahmedGaber93 here you go:

    Preconditions:

    • Account with 2FA enabled
    • Workspace with multiple reports
    1. [Client A] Navigate to ND, enter an account from the preconditions, click continue
    2. [Client A] Verify you're asked for the magic code
    3. Navigate to email and locate the magic link
    4. Change magic link to staging
    5. Paste the link in the new tab
    6. Navigate to magic link
    7. [Client B] Verify 2FA prompt screen is shown
    8. [Client B] Don't close 2FA prompt screen
    9. [Client A] Switch back to first tab, enter 2FA code, and click sign in
    10. [Client A] Wait 5-10 seconds for all operations done

    Expected Result:

    ForYouSection displays todos reports correctly

    Actual Result:

    ForYouSection displays empty state message

    Still able to reproduce on latest main:

    bug.mov
  15. melvin-bot commented on Jul 10, 2026

    @melvin-bot

    @ahmedGaber93 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  16. melvin-bot commented on Jul 14, 2026

    @melvin-bot

    @ahmedGaber93 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

  17. melvin-bot commented on Jul 16, 2026

    @melvin-bot

    @ahmedGaber93 Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!

  18. ahmedGaber93 commented on Jul 19, 2026

    @ahmedGaber93
    Contributor

    @mmsumer Ah, I am able to reporduce now.

    There is nothing to solve from OP. However, ForYouSection still has a reproducible bug on latest main:

    If you have a proposal for it, I think we can fix it here.

  19. mmsumer commented on Jul 22, 2026

    @mmsumer
    Contributor

    If you have a proposal for it, I think we can fix it here.

    @ahmedGaber93 I am not sure if we can fix it here because the bug is no longer reproducible exactly as before on the latest main. I think a recent PR affected it, but the behavior is still inconsistent (e.g., some reports are still not displaying correctly).

    Here is a video showing the current behavior:

    bug.mov
  20. ahmedGaber93 commented on Jul 22, 2026

    @ahmedGaber93
    Contributor

    Ah, thanks for retesting this, @mmsumer!

  21. ahmedGaber93 commented on Jul 22, 2026

    @ahmedGaber93
    Contributor

    @justinpersaud The original issue in the OP is completely fixed on the main branch.

    The remaining bug (#79389 (comment)) may be related to the test steps (logging in with a 2FA code using two tabs in the same browser), but it doesn't appear to have the same root cause.

    We don't have a clear root cause for this right now. While we could wait for proposals, I think we should consider closing the issue because:

    • It appears to be a very minor bug.

    • Not reproduced consistently.

    • It isn't a typical user flow:

      • Logging in with a 2FA code using two tabs in the same browser.
      • Clicking "Open Expensify" from the security code email, which opens a new tab with the 2FA form, and then going back to the first tab to enter the code instead of simply completing the login in the new tab.

    While it's still a valid bug, I'm leaning toward closing the issue. WDYT?

  22. melvin-bot commented on Jul 27, 2026

    @melvin-bot

    @ahmedGaber93 Huh... This is 4 days overdue. Who can take care of this?

  23. ahmedGaber93 commented on Jul 29, 2026

    @ahmedGaber93
    Contributor
  24. melvin-bot commented on Aug 3, 2026

    @melvin-bot

    @ahmedGaber93 Huh... This is 4 days overdue. Who can take care of this?

  25. ahmedGaber93 commented on Aug 4, 2026

    @ahmedGaber93
    Contributor
  26. justinpersaud commented on Aug 4, 2026

    @justinpersaud
    Contributor

    Yeah, lets close this then

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

Metadata

Metadata

Labels

BugSomething 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