Skip to content

[Due for payment 2025-04-23] Hybrid-Scan- circle loading infinitely after close the alert modal of scanning corrupted file #59903

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

Closed
2 of 8 tasks
mitarachim opened this issue Apr 9, 2025 · 21 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Apr 9, 2025

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: v9.1.25-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5903588
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: iPhone 16 pro/ 18.3.2
App Component: Money Requests

Action Performed:

  1. Open app
  2. Go to any workspace chat
  3. Start the the Submit expense > "Scan" receipt flow
  4. Upload the corrupted file
  5. Tap on "Close" button of the alert modal

Expected Result:

The alert modal is closed for user upload new file

Actual Result:

The alert modal is closed and circle loading infinitely

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6796970_1744190916909.Nohs3452_1_.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @stephanieelliott
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

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

Copy link

melvin-bot bot commented Apr 9, 2025

Triggered auto assignment to @rlinoz (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Apr 9, 2025

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 9, 2025
Copy link
Contributor

github-actions bot commented Apr 9, 2025

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

@rlinoz
Copy link
Contributor

rlinoz commented Apr 9, 2025

Building the app locally to understand what is happening. It doesn't look like we have changes in the smartscan step in this deploy.

@luacmartins
Copy link
Contributor

@rlinoz do you think this is an API issue?

@thelullabyy
Copy link
Contributor

Proposal

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

  • The alert modal is closed, but the circular loading indicator continues spinning indefinitely.

What is the root cause of that problem?

  • The issue was introduced in PR #59519, which added a new fullscreen loading indicator. In the scan step of the IOU request flow, isLoaderVisible is set to true to show the loader:

    <AttachmentPicker onOpenPicker={() => setIsLoaderVisible(true)}>

    However, if an error occurs with the selected image, we forgot to reset isLoaderVisible to false, causing the loader to persist indefinitely.

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

  • We should ensure that isLoaderVisible is set to false when the image selection process completes, regardless of whether it succeeds or fails.

  • Specifically, update the finally block in the following file to hide the loader after the operation concludes:

    .finally(() => delete onModalHide.current);


.finally(() => {
    setIsLoaderVisible(false);
    delete onModalHide.current;
});

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

  • N/A

What alternative solutions did you explore? (Optional)

  • N/A

@rlinoz
Copy link
Contributor

rlinoz commented Apr 9, 2025

@luacmartins ah no, it doesn't look like it is, removed the label.

@rlinoz
Copy link
Contributor

rlinoz commented Apr 9, 2025

@thelullabyy hmm if that is the PR then it should be reproducible in prod?

@thelullabyy
Copy link
Contributor

@rlinoz I’m not sure how to reproduce this behavior in production, but during my investigation, I noticed that removing the setIsLoaderVisible(true) call at the following line:

<AttachmentPicker onOpenPicker={() => setIsLoaderVisible(true)}>

causes the issue to go away. Since this line was introduced in PR #59519, I believe that PR is the source of the regression.

Could you help test the behavior in the prod?

@rlinoz
Copy link
Contributor

rlinoz commented Apr 9, 2025

Yeah, running the prod branch right now.

@rlinoz
Copy link
Contributor

rlinoz commented Apr 9, 2025

Yeah, reproducible in prod, version 9.1.24-10.

@rlinoz rlinoz added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Hourly KSv2 labels Apr 9, 2025
@rlinoz
Copy link
Contributor

rlinoz commented Apr 9, 2025

cc: @DylanDylann @TMisiukiewicz

@thelullabyy
Copy link
Contributor

@rlinoz If the original authors are unavailable, I’d be happy to help by opening a PR to address this issue.

@rlinoz rlinoz added the Daily KSv2 label Apr 9, 2025
@TMisiukiewicz
Copy link
Contributor

@rlinoz I'll take care of it

@TMisiukiewicz
Copy link
Contributor

Opened #60008

@mountiny
Copy link
Contributor

No payments here

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 16, 2025
@melvin-bot melvin-bot bot changed the title Hybrid-Scan- circle loading infinitely after close the alert modal of scanning corrupted file [Due for payment 2025-04-23] Hybrid-Scan- circle loading infinitely after close the alert modal of scanning corrupted file Apr 16, 2025
Copy link

melvin-bot bot commented Apr 16, 2025

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 16, 2025
Copy link

melvin-bot bot commented Apr 16, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.28-15-staging 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-04-23. 🎊

Copy link

melvin-bot bot commented Apr 16, 2025

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

@rlinoz
Copy link
Contributor

rlinoz commented Apr 17, 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: https://github.com/Expensify/App/pull/59519/files#r2049038966

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

Regression Test Proposal Template
  • [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

We already have a testrail for this.

@rlinoz rlinoz closed this as completed Apr 17, 2025
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. Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants