Open IuliiaHerets opened 1 month ago
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.
@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
@abekkala Eep! 4 days overdue now. Issues have feelings too...
I was able to reproduce in Safari
Job added to Upwork: https://www.upwork.com/jobs/~021851679624000395857
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External
)
@abekkala, @aimane-chnaif Huh... This is 4 days overdue. Who can take care of this?
No proposals yet
I am out sick at the moment. Please reassign C+ if needed
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Hi, I'm Viktoryia from Callstack - expert contributor group - and I would like to work on this issue.
Updates as for today:
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
)I'll continue my investigations tomorrow
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: https://github.com/Expensify/App/blob/346bb370add9c7225bec8b5b499a1aab93476dec/src/libs/ReportUtils.ts#L4307 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.
@abekkala Huh... This is 4 days overdue. Who can take care of this?
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allgandalf (External
)
I was OOO yesterday. I'm not sure I'll have enough time today to post the proposal, but I think it should be possible tomorrow.
Thanks for the update :)
Is this issue available for proposals or has it already been assigned?
No response. Assuming the task has been assigned, it's best to remove the help wanted tag if that is the case.
Okay, I've done more in-depth research about the second part of the console errors - the one that appears when you send the PDF attachment. And it's turned out:
So maybe we should skip this part in favor of mentioned about issues/PRs. @allgandalf @abekkala
Regarding the first part of the console errors - the one that appears during selected pdf file preview in the Safari web. As I mentioned above, changing the pdfWorkerSource
import to be imported not from pdfjs-dist/legacy/build/pdf.worker.mjs
but from pdfjs-dist/build/pdf.worker.mjs
in both E/App and react-fast-pdf lib fixes the errors.
But I've noticed that @hurali97 changed it from non-legacy to legacy in one of his PR some time ago. Was there any specific reason for it? Should we be aware of something if decide to update the pdfWorkerSource
?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Thanks for the summary @VickyStash , I looked the linked issue of the PR, there is a short description there:
maybe this adds a bit info, now lets wait for @hurali97 for some inputs from his side, I don't see them on Slack, but maybe you can bump them internally for faster response , thanks
I've confirmed internally that updating the pdfWorkerSource
was out of the scope of the mentioned PR, so it was decided not to change it at that point. So, I guess there are no blockers as for now.
Console errors appear:
During pdf file attachment preview in the Safari web browser.
During pdf file attachment sending, for optimistically generated report action.
react-fast-pdf
lib (link)
Update pdfWorkerSource
in both E/App and react-fast-pdf
from pdfjs-dist/legacy/build/pdf.worker.mjs
to pdfjs-dist/build/pdf.worker.mjs
.
Ignore this part of the console errors in this issue, since there are several issues and PR that are handling it:
okay cool, this makes sense to me, i will get and internal engineer assigned for final though and then we can probably get a PR up next week 🤝
🎀👀🎀 C+ reviewed
Triggered auto assignment to @tylerkaraszewski, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@tylerkaraszewski, @abekkala, @VickyStash, @allgandalf Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@tylerkaraszewski Could you take a look at the proposal?
That seems OK to me.
dope!, @VickyStash lets get the PR going 💪
Updates:
I've started to work on the PR but unfortunately, I've noticed some issues in the react-fast-pdf
lib after getting rid of legacy. I'm going to take a closer look tomorrow to make sure all works correctly.
@tylerkaraszewski @abekkala @VickyStash @allgandalf this issue is now 4 weeks old, please consider:
Thanks!
we are working through it melv!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
I'll provide the updates in 1-2h!
Updates: Today, I've decided to start with the reproduction of the console errors in the example app in the react-fast-pdf lib and fixing it there.
The difference between pdfWorkerSource
legacy and not legacy is the supported browsers: https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#which-browsersenvironments-are-supported
While legacy
version supports outdated browsers it can have some minor issues.
Do we want to keep the legacy version for outdated browsers compatibility?
The example app in the react-fast-pdf
had the non existing path for the worker inside webpack config. Due to this the fake worker always was used, it confused me a little during the testing.
I've corrected the path to be the same as in the code and started to see the same console errors as in the E/App:
https://github.com/user-attachments/assets/d835dcf8-2d23-4cab-bc39-c9615324a2a6
pdf.worker.min.mjs
as a worker source:The updates can be found in this branch.
Updates:
I've opened the PR for the react-fast-pdf
lib.
No updates for today, I'll continue to work on it next week.
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: 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:
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:
Screenshots/Videos
2310.txt
https://github.com/user-attachments/assets/06963836-08f7-4bed-8154-93573665e2dd
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @allgandalf