-
Notifications
You must be signed in to change notification settings - Fork 3k
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 on #53493] [$250] [ iOS 17.2] App closes when back button pressed on PDF preview #55537
Comments
Triggered auto assignment to @MitchExpensify ( |
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989 |
I can repro (I'm the bug reporter), please assign me @MitchExpensify 🙏 |
Job added to Upwork: https://www.upwork.com/jobs/~021883275195164447950 |
Current assignee @jjcoffee is eligible for the External assigner, not assigning anyone new. |
ProposalPlease re-state the problem that we are trying to solve in this issue.App closes when back button pressed on PDF preview What is the root cause of that problem?We have an App/src/pages/home/report/ReportAttachments.tsx Lines 45 to 47 in b59f23b
When the back button is pressed, the closeModal function is triggered. Inside this function, we first call setIsModalOpen to close the AttachmentModal and then call the onModalClose callback to close the ReportAttachments modal (handled by react-navigation). However, due to asynchronous behavior, the ReportAttachments modal closes before the AttachmentModal , leading to a crash.
This issue can be reproduced with other types of attachments, not just PDFs. App/src/components/AttachmentModal.tsx Lines 389 to 398 in b59f23b
DetailSimulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2025-01-26.at.18.42.25.mp4What changes do you think we should make in order to solve the problem?It seems there is already a plan to migrate modal to react-navigation. We can hold this until the PR for the migration is merged. 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)We should close the App/src/components/AttachmentModal.tsx Lines 500 to 503 in b59f23b
onModalHide={() => {
...
if (typeof onModalClose === 'function') {
if (shouldCallDirectly) {
onModalClose();
return;
}
attachmentModalHandler.handleModalClose(onModalClose);
}
} |
What do you think about the proposal @jjcoffee ? |
Still waiting for confirmation from @chrispader. |
Thanks! @MitchExpensify I think we should hold on #53493, then we can retest once that's done. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Sounds good @jjcoffee ! |
@jjcoffee, @MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Issue not reproducible during KI retests. (First week) |
There is a PR for this up now: #56219 |
@jjcoffee, @MitchExpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Not overdue, melvin |
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.88-4
Reproducible in staging?: Needs Reproduction
Reproducible in production?: Needs Reproduction
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: @jjcoffee
Slack conversation (hyperlinked to channel name): expensify_bugs
Action Performed:
Expected Result:
Return to the chat.
Actual Result:
App closes.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
ios-app-2025-01-20_11.10.51.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @The text was updated successfully, but these errors were encountered: