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-04-25] Attachment - Wrong PDF is opened #39833

Closed
2 of 6 tasks
lanitochka17 opened this issue Apr 8, 2024 · 21 comments
Closed
2 of 6 tasks

[HOLD for payment 2024-04-25] Attachment - Wrong PDF is opened #39833

lanitochka17 opened this issue Apr 8, 2024 · 21 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production DeployBlockerCash This issue or pull request should block deployment Engineering Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Apr 8, 2024

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: 1.4.60-1
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Navigate to any report
  2. Send two pdf files
  3. Open the last one

Expected Result:

The last pdf file should be opened

Actual Result:

The first pdf file is opened

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6442231_1712580406073.Screen_Recording_2024-04-08_at_3.44.37_in_the_afternoon.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

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

Copy link
Contributor

github-actions bot commented Apr 8, 2024

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

@lanitochka17
Copy link
Author

@amyevans FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@amyevans
Copy link
Contributor

amyevans commented Apr 8, 2024

I verified by reverting #39578 locally that it's the source of the regression cc @abzokhattab @hungvu193 @flodnv.

Since the package bump PR is tied to a rather non-urgent bug fix I think it makes the most sense to just revert the bump PR, but speak up soon if you disagree.

@amyevans
Copy link
Contributor

amyevans commented Apr 9, 2024

PR has been merged but waiting on CP: https://expensify.slack.com/archives/C07J32337/p1712628550724549

@hungvu193
Copy link
Contributor

Hey @amyevans I can reproduce even when I downgrade react-fast-pdf to 1.0.6

@hungvu193
Copy link
Contributor

Screen.Recording.2024-04-09.at.09.14.09.mov

@amyevans
Copy link
Contributor

amyevans commented Apr 9, 2024

Can you verify the version is "version": "1.0.6", within /node_modules/react-fast-pdf/package.json? You'd likely need to delete your node_modules folder and run npm ci to get it to "downgrade" to 1.0.6

@abzokhattab
Copy link
Contributor

For your information, there is an open issue related to the problem where the wrong file is viewed, which can be found at #23546 This may be related to the current issue.

@hungvu193
Copy link
Contributor

Can you verify the version is "version": "1.0.6", within /node_modules/react-fast-pdf/package.json? You'd likely need to delete your node_modules folder and run npm ci to get it to "downgrade" to 1.0.6

@amyevans I see, seems like caching. Confirmed it's fixed with 1.0.6. My bad 🤦

@amyevans
Copy link
Contributor

amyevans commented Apr 9, 2024

No worries!

@kidroca
Copy link
Contributor

kidroca commented Apr 9, 2024

I confirm this seems to be related to #23546 and the version bump can be a coincidence
The wrong attachment bug manifests with all attachment types, you just need to scroll a bit to the past in the conversation in order to pre-fill the local database with comments with attachments

@hungvu193
Copy link
Contributor

I confirm this seems to be related to #23546 and the version bump can be a coincidence The wrong attachment bug manifests with all attachment types, you just need to scroll a bit to the past in the conversation in order to pre-fill the local database with comments with attachments

@kidroca I saw you were assigned on that issue, do you have any WIP? So I can test if it solved this issue as well 😄

@kidroca
Copy link
Contributor

kidroca commented Apr 9, 2024

@kidroca I saw you were assigned on that issue, do you have any WIP? So I can test if it solved this issue as well 😄

@hungvu193 here's my WIP:

@hungvu193
Copy link
Contributor

@kidroca I saw you were assigned on that issue, do you have any WIP? So I can test if it solved this issue as well 😄

@hungvu193 here's my WIP:

Awesome! I'll give it a try. Thank you 🙏

@amyevans
Copy link
Contributor

amyevans commented Apr 9, 2024

Testing on:

This branch + react-fast-pdf 1.0.8:

pr-39930-and-1-0-8.mov

The behavior is inconsistent, but it usually seems to do what's in the recording: briefly flashes the wrong attachment before loading the correct (most recent) one.

main + react-fast-pdf 1.0.6:

main-and-1-0-6.mov

Bug is not reproducible.

main + react-fast-pdf 1.0.7:

main-and-1-0-7.mov

Bug is reproducible.

While perhaps the root cause might be similar to what's being worked on in #39930, I don't think it is coincidental that the bug manifests on 1.0.7 but not on 1.0.6, so I still think proceeding with the revert is the right course of action. Do you all agree or disagree? Cc @Julesssss as well as deployer this week

@amyevans
Copy link
Contributor

amyevans commented Apr 9, 2024

Alright I retested on staging following the CP: #39869 (comment). I think we can close this one out, thanks for the discussion!

@amyevans amyevans closed this as completed Apr 9, 2024
@kidroca
Copy link
Contributor

kidroca commented Apr 11, 2024

Should we open and track an issue for react-fast-pdf or maybe have a note that the library shouldn't be updated since a bug manifests in more recent versions?

@amyevans
Copy link
Contributor

Yes, I believe they're working on a patch in the original issue but I left a note (#34816 (comment)) to clarify expectations.

@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 18, 2024
@melvin-bot melvin-bot bot changed the title Attachment - Wrong PDF is opened [HOLD for payment 2024-04-25] Attachment - Wrong PDF is opened Apr 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 18, 2024
Copy link

melvin-bot bot commented Apr 18, 2024

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

Copy link

melvin-bot bot commented Apr 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.62-17 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-04-25. 🎊

kidroca added a commit to kidroca/Expensify.cash that referenced this issue Apr 22, 2024
- Fixed an issue with carousel scrolling in the AttachmentCarousel component
- Implemented a new pan gesture for smoother scrolling experience
- Adjusted layout calculations for optimal rendering of attachments

Related to:
- Expensify#23546
- Expensify#39833
- Expensify#22318
- Expensify#21177
- Expensify#31166
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 DeployBlockerCash This issue or pull request should block deployment Engineering Weekly KSv2
Projects
None yet
Development

No branches or pull requests

5 participants