Skip to content

Onboarding - User redirected to first modal after page reload #80852

Closed

Description

@jponikarchuk

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: v9.3.11-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176677/test-cases/41237662
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: Windows 11, Chrome
App Component: Other

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Sign up with a Gmail address
  3. In 'What’s your work email?' page, click Skip
  4. Select Manage my team's expenses > 1-10 employees
  5. At 'Do you use any accounting software?' screen, refresh the page.

Expected Result:

After reloading the page during onboarding, the user should remain on 'Do you use any accounting software?' page.

Actual Result:

After reloading the page, the user is redirected back to the first modal page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 29, 2026
  2. melvin-bot commented on Jan 29, 2026

    @melvin-bot

    Triggered auto assignment to @stitesExpensify (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on Jan 29, 2026

    @melvin-bot

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

  4. melvin-bot commented on Jan 29, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jan 29, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. OSBotify commented on Jan 29, 2026

    @OSBotify
    Contributor

    Investigation Summary

    Classification: Frontend bug
    Causing PR: Unable to determine with high confidence - appears to be a pre-existing issue or race condition
    Related Issues: None found

    Recommendation: NEEDS INVESTIGATION

    The issue requires deeper investigation by the onboarding flow experts to identify the root cause.

    Labels: Keeping DeployBlockerCash (App deploy is blocked)

    Detailed Analysis

    Evidence

    The bug occurs when a user refreshes the page during onboarding at the "Do you use any accounting software?" step. After refresh, they are redirected to the first onboarding page instead of staying on the current page.

    Code Analysis

    The onboarding flow uses ONBOARDING_LAST_VISITED_PATH (stored in Onyx) to track the user's current position in the onboarding flow. On page refresh:

    1. NavigationRoot.tsx initialState logic (line 141) checks if onboarding is incomplete
    2. Calls getOnboardingInitialPath() with the stored path and onboarding state
    3. getOnboardingInitialPath() validates the stored path and returns where to navigate

    The issue appears to be that on page refresh, one of these scenarios occurs:

    • ONBOARDING_LAST_VISITED_PATH is not persisted or loaded correctly
    • Onboarding state values (currentOnboardingCompanySize, currentOnboardingPurposeSelected) are not available when getOnboardingInitialPath() runs
    • The validation logic in getOnboardingInitialPath() (line 151-164) incorrectly determines the path is invalid

    Investigation Attempts

    Root Cause Hypothesis

    This appears to be either:

    1. A race condition where Onyx state isn't fully loaded when getOnboardingInitialPath() executes on page refresh
    2. A pre-existing bug that was previously undetected
    3. A subtle change in navigation or state management that affects onboarding persistence

    Why This is a Frontend Bug

    • The issue is in the App codebase (onboarding navigation and state management)
    • Fix requires changes to NavigationRoot.tsx, OnboardingFlow.ts, or Onyx state persistence
    • No backend API changes needed

    Next Steps:

    • Need help from @adamgrzybowski @luacmartins or other navigation/onboarding experts to identify the root cause
    • Should investigate if this reproduces consistently or is a race condition
    • May need to add additional logging to understand state at time of refresh
  7. TMisiukiewicz commented on Jan 29, 2026

    @TMisiukiewicz
    Contributor

    I already described the root cause here: #79898 (comment)
    It was introduced in #79073

    cc @szymonzalarski98 as you are an author of the PR that caused it, could you please take action on that? To avoid reverting the PR I'd suggest getting rid of Log

  8. szymonzalarski98 commented on Jan 29, 2026

    @szymonzalarski98
    Contributor

    @TMisiukiewicz sure, on it

  9. szymonzalarski98 commented on Jan 29, 2026

    @szymonzalarski98
    Contributor

    Here is the PR with fix: #80870

  10. mountiny commented on Jan 30, 2026

    @mountiny
    Contributor

    #79073 was reverted

  11. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jan 30, 2026
  12. mountiny commented on Jan 30, 2026

    @mountiny
    Contributor
  13. m-natarajan commented on Jan 30, 2026

    @m-natarajan

    Issue no longer reproducible , Retested on Windows 11 / Chrome. Build 9.3.11-12

    Accounting.mp4
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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions