Skip to content

[Due for payment 2026-06-04] [Due for payment 2026-06-03] Workspace - App crashes when opening Copy settings after disconnecting Intacct&connecting QBD #91825

Closed

Description

@applause-bot

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.83-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #90220
Email or phone of affected tester (no customers): applausetester+ssndjois2jd@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Log in with Expensifail account.
  • Create two Control workspaces - A and B.
  • Enable Accounting in Workspace A.
  1. Go to staging.new.expensify.com
  2. Go to Workspace A settings > Accounting.
  3. Click Connect Sage Intacct.
  4. Enter wrong credentials.
  5. Click 3-dot menu > Disconnect > Disconnect.
  6. Click Connect QuickBooks Desktop.
  7. Click Done.
  8. Click app back button to return to workspace list.
  9. Click 3-dot menu on Workspace A > Copy settings.
  10. Select Workspace B > Continue.

Expected Result:

App will not crash.

Actual Result:

App crashes after disconnecting Intacct, connecting QBD and opening Copy settings page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7164140_1779873898342.8.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7164140

Issue OwnerCurrent Issue Owner: @fedirjh

Activity

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

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #90220

  3. melvin-bot commented on May 27, 2026

    @melvin-bot

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

  4. github-actions commented on May 27, 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.
  5. MelvinBot commented on May 27, 2026

    @MelvinBot
    Contributor

    Proposal

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

    The app crashes when opening Copy settings after disconnecting Sage Intacct and connecting QuickBooks Desktop on a workspace.

    What is the root cause of that problem?

    The crash is at CopyPolicySettingsSelectFeaturesPage.tsx:65 where Object.values(tagGroup.tags) is called without null-safety:

    Object.values(policyTags).reduce((sum, tagGroup) => sum + Object.values(tagGroup.tags).filter(...)

    When disconnecting Intacct and connecting QBD, removePolicyConnection sets the old connection to null via Onyx.merge, which can leave policyTags in a state where individual tag group entries are null or have an undefined tags property. Object.values(null) throws a TypeError, crashing the app.

    The original duplicate-workspace code at WorkspaceDuplicateSelectFeaturesForm.tsx:71 had partial defensive patterns (?.filter(...) ?? 0), but the copy-settings code dropped those guards.

    Line 63 has the same class of bug — c.pendingAction will crash if any category entry in the Onyx record is null.

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

    Add null guards in CopyPolicySettingsSelectFeaturesPage.tsx:

    1. Line 63 — guard against null category entries:

      const categoriesCount = Object.values(policyCategories ?? {}).filter((c) => c?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE).length;
    2. Lines 64-66 — guard against null tagGroup and undefined tagGroup.tags:

      const totalTags = policyTags
          ? Object.values(policyTags).reduce((sum, tagGroup) => sum + Object.values(tagGroup?.tags ?? {}).filter((tag) => tag?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE).length, 0)
          : 0;
    Investigation details
    • PR [Bulk workspace edits] Add Copy Policy Settings select-features page (step 2 of 3) #90220 introduced the Copy Policy Settings select-features page (merged 2026-05-26)
    • The removePolicyConnection action at src/libs/actions/connections/index.ts:37-39 sets connections[connectionName]: null via Onyx.merge, which can propagate null entries into related Onyx collection keys during the disconnect/reconnect flow
    • The PolicyTagLists type (Record<string, OnyxValueWithOfflineFeedback<PolicyTagList>>) doesn't model null values at the TypeScript level, but Onyx merge operations can produce them at runtime

    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  6. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on May 27, 2026
  7. changed the title [-]Workspace - App crashes when opening Copy settings after disconnecting Intacct&connecting QBD[/-] [+][Due for payment 2026-06-03] Workspace - App crashes when opening Copy settings after disconnecting Intacct&connecting QBD[/+] on May 27, 2026
  8. melvin-bot commented on May 27, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.83-3 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-06-03. 🎊

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

    • @fedirjh does not require payment (Contractor)
  9. melvin-bot commented on May 27, 2026

    @melvin-bot

    @yuwenmemon @fedirjh 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]

  10. melvin-bot commented on May 28, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.88-2 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-06-04. 🎊

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

    • @fedirjh does not require payment (Contractor)
  11. changed the title [-][Due for payment 2026-06-03] Workspace - App crashes when opening Copy settings after disconnecting Intacct&connecting QBD[/-] [+][Due for payment 2026-06-04] [Due for payment 2026-06-03] Workspace - App crashes when opening Copy settings after disconnecting Intacct&connecting QBD[/+] on May 28, 2026
  12. melvin-bot commented on May 28, 2026

    @melvin-bot

    @yuwenmemon @fedirjh 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. fedirjh commented on May 28, 2026

    @fedirjh
    Contributor

    Should be fixed in #91241

  14. melvin-bot commented on Jun 1, 2026

    @melvin-bot

    @fedirjh Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  15. melvin-bot commented on Jun 3, 2026

    @melvin-bot

    @fedirjh Huh... This is 4 days overdue. Who can take care of this?

  16. fedirjh commented on Jun 5, 2026

    @fedirjh
    Contributor

    This was fixed:

    CleanShot.2026-06-05.at.17.21.53.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