Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 of 8 tasks
vincdargento opened this issue Jan 24, 2025 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@vincdargento
Copy link

vincdargento commented Jan 24, 2025

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
@vincdargento vincdargento added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 24, 2025
Copy link

melvin-bot bot commented Jan 24, 2025

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.

@shubham1206agra
Copy link
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)

@melvin-bot melvin-bot bot added the Overdue label Jan 27, 2025
@trjExpensify trjExpensify moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Jan 27, 2025
@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Jan 27, 2025
@melvin-bot melvin-bot bot 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 Jan 27, 2025
Copy link

melvin-bot bot commented Jan 27, 2025

Job added to Upwork: https://www.upwork.com/jobs/~021883892443394659534

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 27, 2025
Copy link

melvin-bot bot commented Jan 27, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Jan 27, 2025
@trjExpensify
Copy link
Contributor

Putting this in #expense as Intacct isn't a direct focus of #migrate or #convert just yet.

@eh2077
Copy link
Contributor

eh2077 commented Jan 29, 2025

I can reproduce the issue

Screen.Recording.2025-01-29.at.10.37.00.PM.mov

@eh2077
Copy link
Contributor

eh2077 commented Jan 29, 2025

I agree with @shubham1206agra 's diagnosis of the issue. Let's go with their proposal!

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jan 29, 2025

Triggered auto assignment to @madmax330, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 30, 2025
Copy link

melvin-bot bot commented Jan 30, 2025

📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

Copy link

melvin-bot bot commented Feb 8, 2025

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@trjExpensify
Copy link
Contributor

Seems like we've got a regression here?

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Feb 11, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Feb 11, 2025
@melvin-bot melvin-bot bot changed the title [$250] Sage Intacct - Connect button becomes unresponsive in Sage Intacct after exiting setup [Due for payment 2025-02-18] [$250] Sage Intacct - Connect button becomes unresponsive in Sage Intacct after exiting setup Feb 11, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

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

Copy link

melvin-bot bot commented Feb 11, 2025

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:

Copy link

melvin-bot bot commented Feb 11, 2025

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

@shubham1206agra
Copy link
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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 17, 2025
@trjExpensify
Copy link
Contributor

👋 @eh2077 checklist time here, please. Thanks!

@eh2077
Copy link
Contributor

eh2077 commented Feb 19, 2025

Yeah, I will update by tomorrow. Thank you

@trjExpensify
Copy link
Contributor

Sounds good!

@eh2077
Copy link
Contributor

eh2077 commented Feb 20, 2025

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 👎

@trjExpensify
Copy link
Contributor

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

Payment summary as follows:

@shubham1206agra, please accept the offer.

@shubham1206agra
Copy link
Contributor

@trjExpensify Offer accepted

@trjExpensify
Copy link
Contributor

Paid, closing!

@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Feb 20, 2025
@JmillsExpensify
Copy link

$250 approved for @eh2077

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

6 participants