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-12] [$250] Web - [AU] Attachment - Console errors appear when uploading a PDF attachment to a 1:1 DM #51313

Closed
1 of 8 tasks
IuliiaHerets opened this issue Oct 23, 2024 · 51 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 23, 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.52-5
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:* https://expensify.testrail.io/index.php?/tests/view/5120680&group_by=cases:section_id&group_id=292107&group_order=asc
Issue reported by: Applause Internal Team

Action Performed:

  1. Navigate to https://staging.new.expensify.com/ and open Safari console
  2. Log in with a Gmail account
  3. Open any 1:1 DM
  4. Navigate to + button - Add attachment
  5. Send any PDF attachment

Expected Result:

There shouldn't be any console errors.

Actual Result:

Console errors appear when uploading a PDF attachment to a 1:1 DM.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6642816_1729659401962!Capture
2310.txt

Bug6642816_1729659401969.Screen_Recording_2024-10-22_At_21.39.25.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021851679624000395857
  • Upwork Job ID: 1851679624000395857
  • Last Price Increase: 2024-11-20
Issue OwnerCurrent Issue Owner: @abekkala
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 23, 2024
Copy link

melvin-bot bot commented Oct 23, 2024

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

@IuliiaHerets
Copy link
Author

@abekkala 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

@IuliiaHerets IuliiaHerets changed the title Web - Attachment - Console errors appear when uploading a PDF attachment to a 1:1 DM Web - [AU] Attachment - Console errors appear when uploading a PDF attachment to a 1:1 DM Oct 23, 2024
@melvin-bot melvin-bot bot added the Overdue label Oct 25, 2024
Copy link

melvin-bot bot commented Oct 28, 2024

@abekkala Eep! 4 days overdue now. Issues have feelings too...

@abekkala
Copy link
Contributor

I was able to reproduce in Safari

@melvin-bot melvin-bot bot removed the Overdue label Oct 30, 2024
@abekkala abekkala added the External Added to denote the issue can be worked on by a contributor label Oct 30, 2024
Copy link

melvin-bot bot commented Oct 30, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021851679624000395857

@melvin-bot melvin-bot bot changed the title Web - [AU] Attachment - Console errors appear when uploading a PDF attachment to a 1:1 DM [$250] Web - [AU] Attachment - Console errors appear when uploading a PDF attachment to a 1:1 DM Oct 30, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 30, 2024
Copy link

melvin-bot bot commented Oct 30, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External)

Copy link

melvin-bot bot commented Nov 4, 2024

@abekkala, @aimane-chnaif Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Nov 4, 2024
@aimane-chnaif
Copy link
Contributor

No proposals yet

@melvin-bot melvin-bot bot removed the Overdue label Nov 5, 2024
@aimane-chnaif
Copy link
Contributor

I am out sick at the moment. Please reassign C+ if needed

@aimane-chnaif aimane-chnaif removed their assignment Nov 5, 2024
Copy link

melvin-bot bot commented Nov 6, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@VickyStash
Copy link
Contributor

Hi, I'm Viktoryia from Callstack - expert contributor group - and I would like to work on this issue.

@VickyStash
Copy link
Contributor

Updates as for today:

  • I was able to reproduce the issue in the Safari browser. For me this issue is also partly reproducible if I attach a pdf file as a receipt (by partly I mean that I see only part of the error logs)
  • First part of the console errors disappears if I change the pdfWorkerSource import to be imported not from pdfjs-dist/legacy/build/pdf.worker.mjs, but from pdfjs-dist/build/pdf.worker.mjs in the PDFThumbnail component and PDFPreviewer component (from react-fast-pdf)

image

I'll continue my investigations tomorrow

@VickyStash
Copy link
Contributor

Updates:
I was able to identify the place which triggers the second part of the errors.
The problem is in the attachment optimistic report action, specifically in the attachment source attribute which is passed in the data attributes to the pdf attachment:

`${CONST.ATTACHMENT_SOURCE_ATTRIBUTE}="${file.uri}"`,

And the way it's used for the report action display.
I still need to find the way to handle it without errors, I haven't had enough time for it today unfortunately.
After that I should be able to combine formal proposal.

@melvin-bot melvin-bot bot added the Overdue label Nov 8, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

@abekkala Huh... This is 4 days overdue. Who can take care of this?

@melvin-bot melvin-bot bot added the Overdue label Nov 22, 2024
@allgandalf
Copy link
Contributor

Not overdue sir melv 🙇

@melvin-bot melvin-bot bot removed the Overdue label Nov 25, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 25, 2024
@VickyStash
Copy link
Contributor

Updates:
I've prepared the app PR as well. Note: it uses the patch for react-fast-pdf. We can easily remove it when Expensify/react-fast-pdf#39 is merged. Let's focus maybe on merging the lib PR first.

@allgandalf
Copy link
Contributor

@tylerkaraszewski can you please approve and merge the upstream PR:

@VickyStash
Copy link
Contributor

@tylerkaraszewski kind bump, could you take a look at the PR: Expensify/react-fast-pdf#39

@allgandalf
Copy link
Contributor

Bumped on slack for 👀

@allgandalf
Copy link
Contributor

2nd PR is on staging:

@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 5, 2024
@melvin-bot melvin-bot bot changed the title [$250] Web - [AU] Attachment - Console errors appear when uploading a PDF attachment to a 1:1 DM [HOLD for payment 2024-12-12] [$250] Web - [AU] Attachment - Console errors appear when uploading a PDF attachment to a 1:1 DM Dec 5, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 5, 2024
Copy link

melvin-bot bot commented Dec 5, 2024

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

Copy link

melvin-bot bot commented Dec 5, 2024

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

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

Copy link

melvin-bot bot commented Dec 5, 2024

@allgandalf @abekkala @allgandalf 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]

@garrettmknight garrettmknight moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Dec 10, 2024
@abekkala
Copy link
Contributor

PAYMENT SUMMARY FOR DEC 12

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

Payment Summary

Upwork Job

  • Contributor: @VickyStash is from an agency-contributor and not due payment
  • ROLE: @allgandalf paid $(AMOUNT) via Upwork (LINK)

BugZero Checklist (@abekkala)

  • 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/1851679624000395857/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@allgandalf
Copy link
Contributor

allgandalf commented Dec 12, 2024

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: chore: fix security vulnerabilities #48532 (comment)

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

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

Precondition:

  • N/A

Test:

  1. Open any chat.
  2. Start to add a PDF attachment.

Verify that during the PDF attachment preview before sending the attachment there are no console errors.

Do we agree 👍 or 👎

@abekkala
Copy link
Contributor

@allgandalf payment sent and contract ended - thank you! 🎉

@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Dec 12, 2024
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. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: Done
Development

No branches or pull requests

7 participants