Thread here.
Problem
There are two related problems during the onboarding flow:
1. Navigation loop on onboarding modals
When signing up with a "Manage Team" path (10+ employees), the onboarding modal can get stuck in a loop, cycling between steps (e.g., repeatedly showing the accounting software selection screen) instead of progressing to completion. The loop prevents the user from reaching the Test Drive step. Refreshing the page breaks the loop and allows onboarding to continue.
This has been observed by multiple users and appears to be intermittent -- subsequent signups with the same flow may work fine.
2. "Unexpected error" on onboarding tasks after refresh
After refreshing to escape the loop, the onboarding tasks (Guided Setup) display "Unexpected error posting the comment. Please try again later." This happens because the OPEN_REPORT request carrying guidedSetupData either fails or is interrupted by the refresh, causing the failure data to be applied to each task's report action.
Likely Root Cause
The loop is most likely caused by a race condition in getOnboardingInitialPath() in src/libs/actions/Welcome/OnboardingFlow.ts:
- When the
OnboardingGuard runs on navigation, it calls getOnboardingInitialPath() to determine where to redirect.
- The guard checks whether
onboardingPurposeSelected and onboardingCompanySize match the current path. If onboardingInitialPath points to /onboarding/employees or /onboarding/accounting but the purpose/company-size Onyx values are stale or not yet persisted, the guard redirects back to /onboarding/purpose.
- On the next navigation event, the guard runs again with the same stale state, creating a redirect loop.
- The
ONBOARDING_LAST_VISITED_PATH key (updated in src/libs/Navigation/NavigationRoot.tsx) may also contribute by persisting a path that triggers the redirect cycle.
The task errors come from failure handling in prepareOnboardingOnyxData() in src/libs/ReportUtils.ts, which applies report.genericAddCommentFailureMessage to each task report action when the OPEN_REPORT request fails.
Key Files
Steps to Reproduce
- Create a new account on web
- Choose "Manage a team" purpose
- Select "10+" employees (or possibly other sizes)
- Progress through onboarding modals
- Observe the modal may loop (cycling back to accounting or earlier steps) instead of progressing to Test Drive
- Refresh the page to break the loop
- Observe onboarding tasks now show "Unexpected error posting the comment"
Note: This is intermittent and may not reproduce on every attempt.
Expected Behavior
- Onboarding modals should progress linearly without looping
- If a refresh is needed, onboarding tasks should not show errors (the guided setup request should be retried or errors should be cleared)
Platforms
Issue Owner
Current Issue Owner: @linhvovan29546
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022033637307162175700
- Upwork Job ID: 2033637307162175700
- Last Price Increase: 2026-03-16
Thread here.
Problem
There are two related problems during the onboarding flow:
1. Navigation loop on onboarding modals
When signing up with a "Manage Team" path (10+ employees), the onboarding modal can get stuck in a loop, cycling between steps (e.g., repeatedly showing the accounting software selection screen) instead of progressing to completion. The loop prevents the user from reaching the Test Drive step. Refreshing the page breaks the loop and allows onboarding to continue.
This has been observed by multiple users and appears to be intermittent -- subsequent signups with the same flow may work fine.
2. "Unexpected error" on onboarding tasks after refresh
After refreshing to escape the loop, the onboarding tasks (Guided Setup) display "Unexpected error posting the comment. Please try again later." This happens because the
OPEN_REPORTrequest carryingguidedSetupDataeither fails or is interrupted by the refresh, causing the failure data to be applied to each task's report action.Likely Root Cause
The loop is most likely caused by a race condition in
getOnboardingInitialPath()insrc/libs/actions/Welcome/OnboardingFlow.ts:OnboardingGuardruns on navigation, it callsgetOnboardingInitialPath()to determine where to redirect.onboardingPurposeSelectedandonboardingCompanySizematch the current path. IfonboardingInitialPathpoints to/onboarding/employeesor/onboarding/accountingbut the purpose/company-size Onyx values are stale or not yet persisted, the guard redirects back to/onboarding/purpose.ONBOARDING_LAST_VISITED_PATHkey (updated insrc/libs/Navigation/NavigationRoot.tsx) may also contribute by persisting a path that triggers the redirect cycle.The task errors come from failure handling in
prepareOnboardingOnyxData()insrc/libs/ReportUtils.ts, which appliesreport.genericAddCommentFailureMessageto each task report action when theOPEN_REPORTrequest fails.Key Files
src/libs/actions/Welcome/OnboardingFlow.ts-getOnboardingInitialPath()redirect logicsrc/libs/Navigation/guards/OnboardingGuard.ts- Guard that triggers redirectssrc/libs/Navigation/NavigationRoot.tsx- UpdatesONBOARDING_LAST_VISITED_PATHsrc/pages/OnboardingAccounting/BaseOnboardingAccounting.tsx- Accounting step (where loop was observed)src/libs/ReportUtils.ts-prepareOnboardingOnyxData()failure handlingsrc/libs/actions/Report/index.ts-getGuidedSetupDataForOpenReport()Steps to Reproduce
Note: This is intermittent and may not reproduce on every attempt.
Expected Behavior
Platforms
Issue Owner
Current Issue Owner: @linhvovan29546Upwork Automation - Do Not Edit