Skip to content

[Due for payment 2026-03-06] [$250] Onboarding-App crashes when completed test drive as Get paid and opening Reports #83267

Closed

Description

@mitarachim

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.3.25-0
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/41237682
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.4 Chrome
App Component: Money Requests

Action Performed:

  1. Sign up with a new gmail account (without a +), choose Get paid back purpose
  2. Complete the test drive with another fake gmail
  3. Open the created expense, then close
  4. Go to the Reports page

Expected Result:

User can open Reports page successfully

Actual Result:

The app crashes after completing test drive as Get paid and opening Reports

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7086475_1771889266785!crash2.txt

Bug7086475_1771889266783.Crash_2.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @brianlee-expensify
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022026082153837721204
  • Upwork Job ID: 2026082153837721204
  • Last Price Increase: 2026-02-23

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Feb 23, 2026
  2. melvin-bot commented on Feb 23, 2026

    @melvin-bot

    Triggered auto assignment to @brianlee-expensify (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. melvin-bot commented on Feb 23, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 23, 2026

    @melvin-bot

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

  5. github-actions commented on Feb 23, 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. MelvinBot commented on Feb 23, 2026

    @MelvinBot
    Contributor

    Proposal

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

    After completing onboarding with the "Get paid back" purpose and finishing the test drive, the app crashes when navigating to the Reports page. The crash is a TypeError: Cannot read properties of undefined (reading 'toString') occurring in the UserSelectPopup component.

    What is the root cause of that problem?

    The root cause is in createOptionList in src/libs/PersonalDetailOptionsListUtils/index.ts:386-389. When iterating over personalDetailsList (typed as Record<string, PersonalDetails | null>), null entries are converted into empty objects via an unsafe type cast:

    const allPersonalDetailsOptions = Object.values(personalDetails).map((personalDetail) => {
        if (!personalDetail) {
            return {} as OptionData;  // ← empty object with accountID: undefined
        }
        // ...
    });

    These empty {} as OptionData objects have accountID: undefined at runtime, even though TypeScript thinks they satisfy the OptionData type.

    The UserSelectPopup component (src/components/Search/FilterDropdowns/UserSelectPopup.tsx:74-81) maps over these options and calls .toString() on accountID before any filtering occurs:

    const transformedOptions = useMemo(
        () =>
            options?.map((option) => ({
                ...option,
                isSelected: selectedAccountIDs.has(option.accountID.toString()),  // ← CRASH: undefined.toString()
            })) ?? [],
        [options, selectedAccountIDs],
    );

    Although getValidOptions (called on line 84) would filter out entries without accountID, the crash happens in transformedOptions (line 74) which executes before getValidOptions is called.

    After onboarding, personalDetailsList in Onyx contains null entries (which is valid per its type), and these flow through unfiltered to the crash site.

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

    The fix should be in createOptionList in src/libs/PersonalDetailOptionsListUtils/index.ts. Instead of returning {} as OptionData for null personalDetails entries, we should filter them out:

    const allPersonalDetailsOptions = Object.values(personalDetails)
        .filter((personalDetail): personalDetail is NonNullable<typeof personalDetail> => !!personalDetail)
        .map((personalDetail) => {
            // ... existing createOption logic
        });

    This addresses the root cause by never producing empty objects in the options array. The downstream .toString() calls in UserSelectPopup (lines 78, 97, 121, 123) will then always receive options with valid accountID values.

    What alternative solutions did you explore? (Optional)

    An alternative is to add defensive guards in UserSelectPopup.tsx at each .toString() call site (lines 78, 97, 121, 123), e.g., option.accountID?.toString() ?? ''. However, this treats the symptom rather than the root cause — the real problem is that createOptionList produces invalid OptionData objects that violate the type contract. Fixing it at the source prevents similar crashes in any other consumer of this function.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.

  7. 24 remaining items

  8. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Feb 27, 2026
  9. changed the title [-][$250] Onboarding-App crashes when completed test drive as Get paid and opening Reports[/-] [+][Due for payment 2026-03-06] [$250] Onboarding-App crashes when completed test drive as Get paid and opening Reports[/+] on Feb 27, 2026
  10. melvin-bot commented on Feb 27, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  11. melvin-bot commented on Feb 27, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.26-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-03-06. 🎊

    For reference, here are some details about the assignees on this issue:

  12. melvin-bot commented on Feb 27, 2026

    @melvin-bot

    @hoangzinh / @shubham1206agra @brianlee-expensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  13. brianlee-expensify commented on Feb 27, 2026

    @brianlee-expensify
    Contributor

    @mountiny just wanted to confirm whether payment is still required for this GH?

  14. mountiny commented on Feb 27, 2026

    @mountiny
    Contributor

    Not needed

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions