Repository navigation
Description
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.50-2
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/13176677/test-cases/41236548
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Exploratory - Critical User Impact
Device used: Windows 11, Chrome
App Component: Other
Action Performed:
Precondition:
- The user is signed in on ND.
- The user is not signed in on OD.
- Go to https://staging.new.expensify.com/
- Open a new tab and navigate to https://staging.expensify.com/
- In the ND tab, sign out (do not close the tab).
- In the OD tab, select the radio button 'Manage expenses for 10+ employees', enter an email address, and sign up.
- Skip the 'What's your work email' modal > 51-100 employees > QBD > Continue
Expected Result:
After completing the onboarding steps, the user should exit the flow and be redirected to the main application without being forced back into onboarding.
Actual Result:
The user remains trapped in the onboarding flow, repeatedly redirected through the same steps without being able to proceed to the main application.
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
Screenshots/Videos
Video.mp4
Issue Owner
Current Issue Owner: @mananjadhavUpwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022043624323600678650
- Upwork Job ID: 2043624323600678650
- Last Price Increase: 2026-05-11
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
wildan-m commentedon Mar 28, 2026
Proposal for #86586 - Web - Onboarding - User stuck in Onboarding loop
What is the root cause of that problem?
When an OD-originated SMB user reaches NewDot, the server returns
NVP_ONBOARDINGwithsignupQualifier: "SMB"andhasCompletedGuidedSetupFlow: false. TheOnboardingGuardredirects them into the NewDot onboarding flow (Employees → Accounting → InterestedFeatures → PersonalDetails).At the end of the flow,
BaseOnboardingPersonalDetailscallscompleteOnboardingReport, which callsprepareOnboardingOnyxData. For theMANAGE_TEAMengagement choice (auto-set for SMB users),shouldPostTasksInAdminsRoomistrue, so the function needs anadminsChatReportIDto determine the target chat report.The
adminsChatReportIDis set on the Accounting page via auseEffectthat readspaidGroupPolicy.chatReportIDAdmins. For OD-originated users, the workspace was created on OldDot andchatReportIDAdminsmay not be populated when NewDot loads the policy data. When it's undefined,setOnboardingAdminsChatReportID(undefined)storesnullvia the?? nullcoercion.In
prepareOnboardingOnyxData, whenadminsChatReportIDisnull:adminsChatReport=allReports?.["report_null"]→undefined{reportID: null, policyID: ...}is used{reportID: targetChatReportID = ''}givesnull(not'', because JS destructuring defaults only apply toundefined, notnull)!targetChatReportID→!null→true→ function returnsundefinedsilentlySince
prepareOnboardingOnyxDatareturnsundefined,completeOnboardingreturns early without calling theCompleteGuidedSetupAPI.hasCompletedGuidedSetupFlowstaysfalse. ButnavigateAfterOnboardingWithMicrotaskQueuefires regardless (it's not gated on the completion result), attempting to navigate to HOME. TheOnboardingGuardintercepts this navigation (sinceisOnboardingCompletedis stillfalse) and redirects back to onboarding → infinite loop.What changes do you think we should make in order to solve the problem?
In
prepareOnboardingOnyxData, guard theshouldPostTasksInAdminsRoombranch so it only takes effect whenadminsChatReportIDis also truthy. WhenadminsChatReportIDis missing, fall back to the Concierge chat report (the same report used for non-team-management flows) instead of constructing a placeholder object with anullreportID. This ensurestargetChatReportIDis always a valid string, so the early-return guard (!targetChatReportID) never fires, andCompleteGuidedSetupis called — settinghasCompletedGuidedSetupFlowtotrueand breaking the loop.Compare link: main...wildan-m:App:wildan-m/fix-86586-onboarding-loop
MelvinBot commentedon Apr 13, 2026
Proposal
What is the root cause of that problem?
When an OD-originated SMB user reaches NewDot, their workspace was created on OldDot and
chatReportIDAdminsmay not be populated on the policy object. This triggers a chain of failures:BaseOnboardingAccounting.tsx:127callssetOnboardingAdminsChatReportID(undefined)becausepaidGroupPolicy.chatReportIDAdminsis undefined.Welcome/index.ts:57coercesundefinedtonullvia?? nulland stores it in Onyx.ReportUtils.ts:11775-11778, sinceshouldPostTasksInAdminsRoomistrue(SMB users getMANAGE_TEAM), the admins branch constructs a fallback{reportID: null}.= '') doesn't apply tonull(only toundefined), sotargetChatReportIDisnull.!nullistrue→prepareOnboardingOnyxDatareturnsundefinedat line 11781.completeOnboarding(Report/index.ts:5055-5071) returns early —CompleteGuidedSetupAPI is never called, sohasCompletedGuidedSetupFlowstaysfalse.navigateAfterOnboardingWithMicrotaskQueuefires unconditionally (BaseOnboardingPersonalDetails.tsx:99-107), butOnboardingGuardredirects back → infinite loop.What changes do you think we should make in order to solve the problem?
In
prepareOnboardingOnyxData(ReportUtils.ts:11775), guard theshouldPostTasksInAdminsRoomternary so it only takes the admins-room branch whenadminsChatReportIDis also truthy. When it's missing, fall back to the Concierge chat report instead of constructing a broken placeholder. This ensurestargetChatReportIDis always a valid string,CompleteGuidedSetupis called, and the loop is broken.What alternative solutions did you explore? (Optional)
completeOnboardingReportbefore navigating — would prevent the loop symptom but doesn't fix the root cause (the API call still wouldn't fire).?? nullcoercion to keepundefined— would let the destructuring default work, but anull-vs-undefinedsemantic fix is fragile. Better to handle the missing ID explicitly.Related issues
Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.32 remaining items
mvtglobally commentedon May 2, 2026
Issue not reproducible during KI retests. (Second week)
mananjadhav commentedon May 3, 2026
@mvtglobally Can we close this issue?
melvin-bot commentedon May 4, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon May 7, 2026
@mananjadhav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
mvtglobally commentedon May 9, 2026
Issue not reproducible during KI retests. (Third week)
mananjadhav commentedon May 10, 2026
@mvtglobally Can we please close this issue?
melvin-bot commentedon May 11, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon May 13, 2026
@mananjadhav Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!