Skip to content

[Due for payment 2025-02-18] [$250] Sage Intacct - Connect button becomes unresponsive in Sage Intacct after exiting setup #55732

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.0.89-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): htad26+ri@gmail.com
Issue reported by: Applause Internal Team
Device used: iPhone 13/iOS 18.2.1, Tecno Spark/Android 11
App Component: Other

Action Performed:

Prerequisite

  • Have an account with one workspace connected to Sage Intacct
  1. Log into the account on the iOS/Android app
  2. Create a new workspace other than the one that is already connected to Sage Intacct
  3. Enable Accounting
  4. Accounting > Sage Intacct > Connect > Upgrade > Next
  5. When you reach the credentials page, exit the setup with back button without entering credentials
  6. Tap on "Connect" button next to Sage Intacct

Expected Result:

App proceeds to Sage Intacct connection setup

Actual Result:

"Connect" button becomes unresponsive and user is unable to procced to Sage Intacct connection setup

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • 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/~021883892443394659534
  • Upwork Job ID: 1883892443394659534
  • Last Price Increase: 2025-01-27
  • Automatic offers:
    • shubham1206agra | Contributor | 105925201
Issue OwnerCurrent Issue Owner: @trjExpensify

Activity

  1. added
    Bug
    Daily
    on Jan 24, 2025
  2. melvin-bot commented on Jan 24, 2025

    @melvin-bot

    Triggered auto assignment to @trjExpensify (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. shubham1206agra commented on Jan 24, 2025

    @shubham1206agra
    Contributor

    Proposal

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

    Sage Intacct - Connect button becomes unresponsive in Sage Intacct after exiting setup

    What is the root cause of that problem?

    In step 6, when we click on connect, we try to render the popover menu component defined here

    as hasPoliciesConnectedToSageIntacct is true due to existing connection present.

    But in https://github.com/Expensify/App/blob/264728f1b086117b9cabfd4728ff30b8afdfc520/src/components/PopoverWithMeasuredContent.tsx, we have 2 setState conditions having race condition

    setIsContentMeasured(popoverDimensions.width > 0 && popoverDimensions.height > 0);

    and

    setIsContentMeasured(true);

    which caused

    return isContentMeasured ? (
    to be false, which fails to render the component correctly

    Which causes the bug

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

    Let's solve the race condition entirely

    Transform this block of code

    if (!isPopoverVisible && isVisible) {
    if (shouldEnableNewFocusManagement) {
    ComposerFocusManager.saveFocusState(modalId);
    }
    // When Popover is shown recalculate
    setIsContentMeasured(popoverDimensions.width > 0 && popoverDimensions.height > 0);
    setIsPopoverVisible(true);
    } else if (isPopoverVisible && !isVisible) {
    setIsPopoverVisible(false);
    }

    to

    if (!prevIsVisible && isVisible) {
            if (shouldEnableNewFocusManagement) {
                ComposerFocusManager.saveFocusState(modalId);
            }
        }

    Here prevIsVisible comes from const prevIsVisible = usePrevious(isVisible);. And we get rid of isPopoverVisible state since it is no longer needed.

    Note

    Optional: We can change

    popoverDimensions={popoverDimensions}
    to popoverDimensions={{height: popoverHeight, width: popoverWidth}}

    Result

    Screen.Recording.2025-01-24.at.10.36.52.PM.mov

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    NA since change is related to UI component

    What alternative solutions did you explore? (Optional)

  4. moved this to Bugs and Follow Up Issues in #expensify-bugson Jan 27, 2025
  5. added
    External
    on Jan 27, 2025
  6. changed the title [-]Sage Intacct - Connect button becomes unresponsive in Sage Intacct after exiting setup[/-] [+][$250] Sage Intacct - Connect button becomes unresponsive in Sage Intacct after exiting setup[/+] on Jan 27, 2025
  7. melvin-bot commented on Jan 27, 2025

    @melvin-bot
  8. added
    Help Wanted
    on Jan 27, 2025
  9. melvin-bot commented on Jan 27, 2025

    @melvin-bot

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

  10. 19 remaining items

  11. melvin-bot commented on Feb 11, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.95-6 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 2025-02-18. 🎊

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

  12. melvin-bot commented on Feb 11, 2025

    @melvin-bot

    @shubham1206agra / @eh2077 @trjExpensify @shubham1206agra / @eh2077 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. shubham1206agra commented on Feb 11, 2025

    @shubham1206agra
    Contributor

    Seems like we've got a regression here?

    @trjExpensify Just stating for the record. The answer is no. Since this PR has made some race conditions more visible, which will be fixed in #56594. And as for the #56505, I was able to repro this on main if we do throttle the system.

  14. added
    Daily
    and removed
    Weekly
    on Feb 17, 2025
  15. trjExpensify commented on Feb 18, 2025

    @trjExpensify
    Contributor

    👋 @eh2077 checklist time here, please. Thanks!

  16. eh2077 commented on Feb 19, 2025

    @eh2077
    Contributor

    Yeah, I will update by tomorrow. Thank you

  17. trjExpensify commented on Feb 19, 2025

    @trjExpensify
    Contributor

    Sounds good!

  18. eh2077 commented on Feb 20, 2025

    @eh2077
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [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: NA. It wasn't caused by a recent PR. The issue exits before TS migration, so it's not easy to find the PR to blame.

    • [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: NA

    • [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 an account with one workspace connected to Sage Intacct

    Test:

    1. Open App.
    2. Open a workspace other than the one that is already connected to Sage Intacct (use control workspace)
    3. Enable Accounting
    4. Click Accounting > Sage Intacct > Connect
    5. Verify that the existing connection popover appears.

    Do we agree 👍 or 👎

  19. trjExpensify commented on Feb 20, 2025

    @trjExpensify
    Contributor

    Thanks! I've suggested a regression test for reuse connection.

    Payment summary as follows:

    @shubham1206agra, please accept the offer.

  20. shubham1206agra commented on Feb 20, 2025

    @shubham1206agra
    Contributor

    @trjExpensify Offer accepted

  21. trjExpensify commented on Feb 20, 2025

    @trjExpensify
    Contributor

    Paid, closing!

  22. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Feb 20, 2025
  23. JmillsExpensify commented on Feb 20, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @eh2077

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions