Skip to content

[Due for payment 2025-12-17] [$250] Category - Infinite loading on Category tab #75612

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: v9.2.61-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #74927
Email or phone of affected tester (no customers): -
Issue reported by: Applause Internal Team
Device used: Android 12 / Chrome
App Component: Other

Action Performed:

Precondition:

  1. Have two non-default workspaces and no default workspace
  2. Have self DM with expense without category

STR:

  1. Go to self DM
  2. Open an expense without category
  3. Open the expense thread
  4. Click Category
  5. On workspace selector page, select any workspace

Expected Result:

Category tab with list of categories opened

Actual Result:

Category tab with infinite spinner opened

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021991987935187197199
  • Upwork Job ID: 1991987935187197199
  • Last Price Increase: 2025-11-28
Issue OwnerCurrent Issue Owner: @joekaufmanexpensify

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 19, 2025
  2. melvin-bot commented on Nov 19, 2025

    @melvin-bot

    Triggered auto assignment to @joekaufmanexpensify (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. bernhardoj commented on Nov 20, 2025

    @bernhardoj
    Contributor

    Proposal

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

    Inifinite loading in category list page after selecting default workspace.

    What is the root cause of that problem?

    The loading will show when the policyCategories is undefined.

    const isLoading = !isOffline && policyCategories === undefined;

    We already have a logic to fetch the categories on mount.

    const fetchData = () => {
    if ((!!policy && !!policyCategories) || !policyID) {
    return;
    }
    getPolicyCategories(policyID);
    };

    useEffect(() => {
    fetchData();
    // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
    }, []);

    But the policyID is undefined because policyForMovingExpensesID is undefined, so the API call isn't called.

    const policyID = isUnreportedExpense || isCreatingTrackExpense ? policyForMovingExpensesID : policy?.id;

    We already set the default workspace ID here, but the data isn't available immediately.

    // eslint-disable-next-line rulesdir/no-default-id-values
    setNameValuePair(ONYXKEYS.NVP_ACTIVE_POLICY_ID, selectedPolicyID, activePolicyID ?? '');
    if (policy?.areCategoriesEnabled) {
    Navigation.navigate(navigateTo);
    return;
    }

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

    We can add policyID to the effect so it's called whenever the policyID becomes available.

    useEffect(() => {
        fetchData();
        // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
    }, [policyID]);

    (or just add fetchData as the deps)

  4. joekaufmanexpensify commented on Nov 20, 2025

    @joekaufmanexpensify
    Contributor

    Will triage tomorrow AM

  5. joekaufmanexpensify commented on Nov 21, 2025

    @joekaufmanexpensify
    Contributor

    Reproduced

  6. changed the title [-]Category - Infinite loading on Category tab[/-] [+][$250] Category - Infinite loading on Category tab[/+] on Nov 21, 2025
  7. melvin-bot commented on Nov 21, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 21, 2025
  9. melvin-bot commented on Nov 21, 2025

    @melvin-bot

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

  10. 27 remaining items

  11. hoangzinh commented on Dec 16, 2025

    @hoangzinh
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: N/A. I think it's a new case that we haven't covered before

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    • Have non-default workspaces
    • Have self DM with expense without category

    Test:

    1. Go to self DM
    2. Open the expense without category
    3. Press Category
    4. On workspace selector page, select any workspace
    5. Verify the category list is shown without infinite loading

    Do we agree 👍 or 👎

  12. joekaufmanexpensify commented on Dec 16, 2025

    @joekaufmanexpensify
    Contributor

    Payment due tomorrow, could you finish up the checklist @hoangzinh

  13. hoangzinh commented on Dec 17, 2025

    @hoangzinh
    Contributor

    Payment due tomorrow, could you finish up the checklist @hoangzinh

    Sorry @joekaufmanexpensify. I just completed checklist

  14. joekaufmanexpensify commented on Dec 17, 2025

    @joekaufmanexpensify
    Contributor

    Awesome. I will handle payment today!

  15. joekaufmanexpensify commented on Dec 17, 2025

    @joekaufmanexpensify
    Contributor
  16. joekaufmanexpensify commented on Dec 17, 2025

    @joekaufmanexpensify
    Contributor

    All set to pay!

  17. joekaufmanexpensify commented on Dec 17, 2025

    @joekaufmanexpensify
    Contributor

    Payment Summary

  18. joekaufmanexpensify commented on Dec 17, 2025

    @joekaufmanexpensify
    Contributor

    @bernhardoj @hoangzinh please request payment at your earliest convenience. Closing as this is otherwise all set!

  19. bernhardoj commented on Dec 18, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  20. garrettmknight commented on Dec 29, 2025

    @garrettmknight
    Contributor

    $250 approved for @hoangzinh

  21. garrettmknight commented on Dec 29, 2025

    @garrettmknight
    Contributor

    $250 approved for @bernhardoj

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.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