WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226440
Blob url downloads fail when triggered from webextension
https://bugs.webkit.org/show_bug.cgi?id=226440
Summary
Blob url downloads fail when triggered from webextension
Victor
Reported
2021-05-30 16:59:22 PDT
Blob url downloads fail when triggered from a webextension tab. The tab is created with `chrome.tabs.create({ url: /wordlist.html })`. wordlist.html embeds a script with the following code to trigger downloads when clicking on a button: ``` let saveBlob = new Blob(['content'], { "type": "text/plain" }); let a = document.getElementById('savelink'); // tab html contains "<a id="savelink" download="download.txt"></a>" const blobLink = URL.createObjectURL(saveBlob); a.href = blobLink; a.click(); ``` This opens in the existing tab (replacing its content) and fails with the following safari error: ``` Safari can’t open the page “blob:safari-web-extension://20101d16-cc55-4a3f-a307-a03b6e2df273/07f5a98e-8fbd-409e-9113-58afe3c748c8”. The error is: “The operation couldn’t be completed. (WebKitBlobResource error 1.)” (WebKitBlobResource:1) ``` I found some related bugs on non-extension pages, e.g
https://bugs.webkit.org/show_bug.cgi?id=190351
(usage of target="_blank"),
https://bugs.webkit.org/show_bug.cgi?id=211234
(bugs with immediately revoked object urls) , The presence of the `target` attribute doesn't seem to matter, and it seems like whatever was fixed in the latter bug doesn't apply to this extension tab case.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-06-06 17:00:22 PDT
<
rdar://problem/78929424
>
pascoe@apple.com
Comment 2
2024-09-05 10:04:16 PDT
https://github.com/WebKit/WebKit/pull/33167/
EWS
Comment 3
2024-09-05 10:36:02 PDT
Committed
283220@main
(61868ae02c5f): <
https://commits.webkit.org/283220@main
> Reviewed commits have been landed. Closing PR #33167 and removing active labels.
EWS
Comment 4
2024-09-06 12:17:42 PDT
Committed
280938.310@safari-7619-branch
(eb5a1e97b064): <
https://commits.webkit.org/280938.310@safari-7619-branch
> Reviewed commits have been landed. Closing PR #1699 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug