-
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
[Due for payment 2025-01-22] [$250] Mac/Safari - [AU] Attachment - "WebKitBlobResource error" console error when sending a PDF attachment #54640
Comments
Triggered auto assignment to @RachCHopkins ( |
ProposalPlease 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. 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 Remove 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. |
ProposalPlease 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
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
To make the desired behavior, we also have to update the condition here
to stop rendering the pdf view when the file is being uploaded. Use 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 |
I think this is related to last week's fire. @IuliiaHerets can we please get a retest? |
@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 |
@RachCHopkins Whoops! This issue is 2 days overdue. Let's get this updated quick! |
I can't repro this at all. |
Ok, confirmed Kadie can repro! |
Job added to Upwork: https://www.upwork.com/jobs/~021876132827778405205 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 ( |
I will review today! |
@shubham1206agra Which case do we need this one? |
When the attachment is uploaded, we need to fetch it from a server. That's why we need authToken then. |
ProposalPlease re-state the problem that we are trying to solve in this issue."WebKitBlobResource error" console error when sending a PDF attachment What is the root cause of that problem?There's also similar bug on this issue when trying uploading the PDF file, it's because we're trying to encrypting the local source file url
So when the PDF previewer try to load the local source(that has been encrypted) it doesn't work and showing error It doesn't happen when uploading video because we will only encrypt the source url if it is not local source file
What changes do you think we should make in order to solve the problem?We will encrypt the source url if it's not a local source url similar like what we do for video attachment
// BaseAnchorForAttachmentsOnly.tsx
const finalSourceURL = FileUtils.isLocalFile(source) ? source : addEncryptedAuthTokenToURL(source);
return (
<ShowContextMenuContext.Consumer>
{({anchor, report, reportNameValuePairs, action, checkIfContextMenuActive, isDisabled}) => (
<PressableWithoutFeedback
style={[style, (isOffline || !sourceID) && styles.cursorDefault]}
onPress={() => {
if (isDownloading || isOffline || !sourceID) {
return;
}
Download.setDownload(sourceID, true);
fileDownload(finalSourceURL, displayName, '', Browser.isMobileSafari()).then(() => Download.setDownload(sourceID, false));
}}
...
<AttachmentView
source={finalSourceURL}
...
) What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional) |
I can't reproduce it, even when I didn't add |
This comment was marked as off-topic.
This comment was marked as off-topic.
Yep, I can reproduce, I just clarify the part of Shubham proposal above. |
📣 @shubham1206agra 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Any ETA for the PR? @shubham1206agra |
@hungvu193 Today |
@hungvu193 I need to do some discussion marked https://expensify.slack.com/archives/C02NK2DQWUX/p1735452999294309 |
@mjasikowski @hungvu193 @RachCHopkins @shubham1206agra this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Discussing on slack |
|
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:
|
@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] |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test ProposalTest:
Do we agree 👍 or 👎 |
$250 approved for @hungvu193 |
Payment Summary:
Upwork job here |
Contributors have been paid, the contract has been completed, and the Upwork post has been closed. |
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.79-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5386106&group_by=cases:section_id&group_id=292107&group_order=asc
Issue reported by: Applause Internal Team
Device used: macOS Sequoia 15.0 - Safari
App Component: Other
Action Performed:
Expected Result:
Console error shouldn't show.
Actual Result:
"WebKitBlobResource error" console error when sending a PDF attachment to a 1:1 DM.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6703307_1735366281759!Console.txt
Bug6703307_1735366281706.Screen_Recording_2024-12-27_At_22.03.00.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @RachCHopkinsThe text was updated successfully, but these errors were encountered: