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

[HOLD for payment 2024-12-19] [HOLD for payment 2024-12-17] iOS - Expense - App returns to transaction thread when trying to replace receipt, then freezes #53848

Open
2 of 8 tasks
IuliiaHerets opened this issue Dec 10, 2024 · 15 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

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 10, 2024

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.73-6
Reproducible in staging?: Yes
Reproducible in production?: No
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: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Launch ND or hybrid app.
  2. Go to workspace chat.
  3. Submit an expense with receipt.
  4. Go to transaction thread.
  5. Tap on the receipt.
  6. Tap 3-dot menu > Replace.

Expected Result:

Replace receipt page will open.

Actual Result:

App returns to transaction thread, then app freezes.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6689959_1733833378116.ScreenRecording_12-10-2024_20-20-10_1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @zanyrenney
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Dec 10, 2024
Copy link

melvin-bot bot commented Dec 10, 2024

Triggered auto assignment to @zanyrenney (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 Dec 10, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Dec 10, 2024
Copy link

melvin-bot bot commented Dec 10, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Dec 10, 2024
Copy link
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.

@youssef-lr
Copy link
Contributor

youssef-lr commented Dec 10, 2024

Can reproduce, pretty bad regression. Checking the deploy checklist for an offending PR.

@mkzie2
Copy link
Contributor

mkzie2 commented Dec 10, 2024

Proposal

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

App returns to transaction thread, then app freezes.

What is the root cause of that problem?

It comes from #53108. On IOS, we call onModalClose with a delay then we navigate to the scan page first then we call dismissModal here. That cause we go back to the TransactionReceiptPage and now the modal is hidden which is the freeze.

attachmentModalHandler.handleModalClose(onModalClose);

InteractionManager.runAfterInteractions(() => {
onCloseCallback?.();
});
},
};

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

We should only call onModalClose with a delay when it's not receipt attachment

if (!isEmptyObject(report) && !isReceiptAttachment) {
     attachmentModalHandler.handleModalClose(onModalClose); 
} else {
    onModalClose();
}

attachmentModalHandler.handleModalClose(onModalClose);

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

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@huult
Copy link
Contributor

huult commented Dec 10, 2024

@Beamanator Can we add InteractionManager.runAfterInteractions for each onClose event instead of using it within AttachmentModal?

@Beamanator
Copy link
Contributor

Mmmmm i mean yeah if that would be cleaner, that would work well! But using it within AttachmentModal like suggested above might make it so we don't have to remember to wrap onClose outside of AttachmentModal in the future, right?

@huult
Copy link
Contributor

huult commented Dec 10, 2024

@Beamanator Yes, you are correct

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels Dec 10, 2024
@luacmartins
Copy link
Contributor

Confirmed this is fixed in staging

@luacmartins luacmartins removed the DeployBlockerCash This issue or pull request should block deployment label Dec 10, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 10, 2024
@melvin-bot melvin-bot bot changed the title iOS - Expense - App returns to transaction thread when trying to replace receipt, then freezes [HOLD for payment 2024-12-17] iOS - Expense - App returns to transaction thread when trying to replace receipt, then freezes Dec 10, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 10, 2024
Copy link

melvin-bot bot commented Dec 10, 2024

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

Copy link

melvin-bot bot commented Dec 10, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.73-8 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 2024-12-17. 🎊

Copy link

melvin-bot bot commented Dec 10, 2024

@youssef-lr @zanyrenney @youssef-lr 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]

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Dec 12, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-12-17] iOS - Expense - App returns to transaction thread when trying to replace receipt, then freezes [HOLD for payment 2024-12-19] [HOLD for payment 2024-12-17] iOS - Expense - App returns to transaction thread when trying to replace receipt, then freezes Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.74-8 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 2024-12-19. 🎊

Copy link

melvin-bot bot commented Dec 12, 2024

@youssef-lr @zanyrenney @youssef-lr 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]

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