App icon indicating copy to clipboard operation
App copied to clipboard

LHN not displayed after page refresh from settings page

Open m-natarajan opened this issue 1 year ago • 10 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.4-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @suneox Slack conversation: https://expensify.slack.com/archives/C05LX9D6E07/p1720062549074999

Action Performed:

  1. Go to staging.new.expensify.com
  2. Click Settings > About
  3. Refresh the page

Expected Result:

Page reloads with out any issue

Actual Result:

LHN menu not displayed until navigated to other menu icon

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [ ] Android: Native
  • [ ] Android: mWeb Chrome
  • [ ] iOS: Native
  • [ ] iOS: mWeb Safari
  • [X] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

https://github.com/Expensify/App/assets/38435837/4e9d1846-c1fa-4a64-92a8-9aa017da1732

https://github.com/Expensify/App/assets/38435837/59988534-303d-43c1-9f52-e2a91f63d275

Add any screenshot/video evidence

View all open jobs on GitHub

m-natarajan avatar Jul 04 '24 17:07 m-natarajan

Triggered auto assignment to @iwiznia (AutoAssignerNewDotQuality)

melvin-bot[bot] avatar Jul 04 '24 17:07 melvin-bot[bot]

Triggered auto assignment to @sonialiap (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.

melvin-bot[bot] avatar Jul 04 '24 17:07 melvin-bot[bot]

Proposal

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

LHN not displayed after page refresh from settings page. Also, menu options inside the about page are not clickable.

What is the root cause of that problem?

Coin animation loading freezes the page.

https://github.com/Expensify/App/blob/8ec71d6d0ff38f58f2c07396a0963359382ba82a/src/pages/settings/AboutPage/AboutPage.tsx#L148

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

We can do an async load of the animation in this way:

Add the below in Lottie/index.tsx:

const [animationFile, setAnimationFile] = useState<string | AnimationObject | {uri: string}>();

useEffect(() => {
    setAnimationFile(source.file);
}, [setAnimationFile, source.file]);

Now, update to return the below:

animationFile ? <LottieView
    // eslint-disable-next-line react/jsx-props-no-spreading
    {...props}
    source={animationFile}
    ref={ref}
    style={[aspectRatioStyle, props.style]}
    webStyle={{...aspectRatioStyle, ...webStyle}}
    onAnimationFailure={() => setIsError(true)}
/> : null

This will fix it for all usages of Lottie animations.

ShridharGoel avatar Jul 04 '24 20:07 ShridharGoel

Thank @ShridharGoel proposal, but this issue also happens on other settings screens that use Lottie. This issue only started occurring in a few recent releases, so could you please find the offending PR?

suneox avatar Jul 05 '24 08:07 suneox

@suneox It has started happening because we have switched to concurrent mode. We can fix this at all places using a common base logic for Lottie animations.

ShridharGoel avatar Jul 05 '24 10:07 ShridharGoel

@suneox It has started happening because we have switched to concurrent mode.

@ShridharGoel Thank you. I also tried reverting the code before the merge commit #42592, and the issue doesn’t happen. It only occurs after commit d047467a enabled React concurrent mode.

We can fix this at all places using a common base logic for Lottie animations.

We don’t need to fix this at all places using Lottie; we just need to fix it in Lottie/index.tsx.

@iwiznia We can fix this issue based on this proposal and implement the fix in Lottie/index.tsx. I have tested it, and it works as expected.

suneox avatar Jul 06 '24 10:07 suneox

We don’t need to fix this at all places using Lottie; we just need to fix it in Lottie/index.tsx.

Yes, that's what I meant by the common base logic. Will update to include code example.

ShridharGoel avatar Jul 06 '24 10:07 ShridharGoel

Waiting for @ShridharGoel to create the PR.

suneox avatar Jul 09 '24 06:07 suneox

Will open PR by tomorrow.

ShridharGoel avatar Jul 09 '24 20:07 ShridharGoel

@sonialiap Should this have the "High Priority" label since it was marked as critical?

ShridharGoel avatar Jul 11 '24 18:07 ShridharGoel

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

melvin-bot[bot] avatar Jul 17 '24 00:07 melvin-bot[bot]

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

  • https://github.com/Expensify/App/pull/45211

If no regressions arise, payment will be issued on 2024-07-24. :confetti_ball:

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

  • @suneox requires payment (Needs manual offer from BZ)
  • @ShridharGoel requires payment (Needs manual offer from BZ)
  • @suneox requires payment (Needs manual offer from BZ)

melvin-bot[bot] avatar Jul 17 '24 00:07 melvin-bot[bot]

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [ ] [@suneox] The PR that introduced the bug has been identified. Link to the PR:
  • [ ] [@suneox] 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:
  • [ ] [@suneox] A discussion in #expensify-bugs 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:
  • [ ] [@suneox] Determine if we should create a regression test for this bug.
  • [ ] [@suneox] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [ ] [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

melvin-bot[bot] avatar Jul 17 '24 00:07 melvin-bot[bot]

  • [x] [@suneox] The PR that introduced the bug has been identified. Link to the PR: https://github.com/Expensify/App/pull/42592
  • [x] [@suneox] 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: Due to the offending PR is an infrastructure update.
  • [x] [@suneox] A discussion in #expensify-bugs 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
  • [x] [@suneox] Determine if we should create a regression test for this bug. N/A: This issue has fixed the regression caused by the infrastructure update.

suneox avatar Jul 20 '24 08:07 suneox

Payment summary:

  • @ShridharGoel ~$250~ $500 - offer sent in upwork - paid ✔️
  • @suneox ~$250~ $500 - offer sent in upwork - paid ✔️

sonialiap avatar Jul 24 '24 10:07 sonialiap

  • @suneox $250 - offer sent in upwork

@sonialiap Thank you, I have accepted an offer

suneox avatar Jul 24 '24 11:07 suneox

Payment Summary

Upwork Job

  • ROLE: @suneox paid $(AMOUNT) via Upwork (LINK)
  • ROLE: @ShridharGoel paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@sonialiap)

  • [ ] I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • [ ] I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • [ ] I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • [ ] I have verified the payment summary above is correct

melvin-bot[bot] avatar Jul 24 '24 18:07 melvin-bot[bot]

This issue was Critical and High Priority so I've adjusted the payouts to $500

sonialiap avatar Jul 25 '24 15:07 sonialiap

This issue was Critical and High Priority so I've adjusted the payouts to $500

Thank you. I really appreciate your recognition of our task.

suneox avatar Jul 25 '24 15:07 suneox