You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-01-22] [$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment #54640
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Please re-state the problem that we are trying to solve in this issue.
Uploading of attachment in 1:1 DM shows console error
What is the root cause of that problem?
Though on an initial look, this may point fingers at Safari unable to handle pdf blobs, it is not a Safari alone issue. As against what's tagged in the title of this bug, this occurs on other browsers as well.
As Blob URLs are temporary in memory references to data from browser memory, a GET call to this URL fails to get it, because the encryptedAuthToken is invalid.
What changes do you think we should make in order to solve the problem?
If we make a call to the blob URL without the encryptedAuthToken, the call succeeds.
Please re-state the problem that we are trying to solve in this issue.
Attachment - "WebKitBlobResource error" console error when sending a PDF attachment
What is the root cause of that problem?
When we upload the PDF file, we store the file temporarily in Browser file blob storage. But when we try to fetch the file using source, we add the encryptedAuthToken here
changed the title [-][$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment[/-][+][HOLD for payment 2025-01-22] [$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment[/+]on Jan 15, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.85-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@hungvu193 / @shubham1206agra@RachCHopkins@hungvu193 / @shubham1206agra 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]
changed the title [-][HOLD for payment 2025-01-22] [$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment[/-][+][Due for payment 2025-01-22] [$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment[/+]on Jan 20, 2025
[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.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Dec 28, 2024
Triggered auto assignment to @RachCHopkins (
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.kpadmanabhan commentedon Dec 28, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Uploading of attachment in 1:1 DM shows console error
What is the root cause of that problem?
Though on an initial look, this may point fingers at Safari unable to handle pdf blobs, it is not a Safari alone issue. As against what's tagged in the title of this bug, this occurs on other browsers as well.

As Blob URLs are temporary in memory references to data from browser memory, a GET call to this URL fails to get it, because the
encryptedAuthTokenis invalid.What changes do you think we should make in order to solve the problem?
If we make a call to the blob URL without the encryptedAuthToken, the call succeeds.
The attachment is added without
encryptedAuthTokeninhttps://github.com/Expensify/App/blob/main/src/pages/home/report/ReportActionCompose/ReportActionCompose.tsx#L262
However a further call to get attachment is made using
encryptedAuthToken, which results in display of error message in console.Remove
encryptedAuthTokenparameter if reportAction is attachment without any comment.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)
N.A.
shubham1206agra commentedon Dec 29, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Attachment - "WebKitBlobResource error" console error when sending a PDF attachment
What is the root cause of that problem?
When we upload the PDF file, we store the file temporarily in Browser file blob storage. But when we try to fetch the file using source, we add the
encryptedAuthTokenhereApp/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.tsx
Line 26 in b7b5dda
But we should not have added the authToken for temporary file in memory.
This causes the console error since the file could not be loaded.
What changes do you think we should make in order to solve the problem?
Change source to use without
encryptedAuthToken, and addisAuthTokenRequired={!!sourceID}to add the authToken when required.App/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.tsx
Line 61 in b7b5dda
To make the desired behavior, we also have to update the condition here
App/src/components/Attachments/AttachmentView/index.tsx
Line 178 in b7b5dda
to stop rendering the pdf view when the file is being uploaded.
Use
!isUploading && !hasPDFFailedToLoad && (isSourcePDF || isFilePDF)What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
NA
RachCHopkins commentedon Dec 31, 2024
I think this is related to last week's fire. @IuliiaHerets can we please get a retest?
IuliiaHerets commentedon Jan 1, 2025
@RachCHopkins Tester still can reproduce this issue in the latest build v9.0.80-1
Screen.Recording.2025-01-01.At.5.59.51.mp4
melvin-bot commentedon Jan 3, 2025
@RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick!
RachCHopkins commentedon Jan 6, 2025
I can't repro this at all.
35 remaining items
[-][$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment[/-][+][HOLD for payment 2025-01-22] [$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment[/+]melvin-bot commentedon Jan 15, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 15, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.85-4 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 2025-01-22. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 15, 2025
@hungvu193 / @shubham1206agra @RachCHopkins @hungvu193 / @shubham1206agra 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]
[-][HOLD for payment 2025-01-22] [$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment[/-][+][Due for payment 2025-01-22] [$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment[/+]hungvu193 commentedon Jan 20, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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: https://github.com/Expensify/App/pull/44889/files#r1921988161
[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.
Regression Test Proposal
Test:
Do we agree 👍 or 👎
garrettmknight commentedon Jan 21, 2025
$250 approved for @hungvu193
RachCHopkins commentedon Jan 23, 2025
Payment Summary:
Upwork job here
RachCHopkins commentedon Jan 23, 2025
Contributors have been paid, the contract has been completed, and the Upwork post has been closed.