Bug 209172

Summary: Download of Blob URL fails when Pin Tab
Product: WebKit Reporter: Thanh Ngo <vietthanhbk1994>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: aestes, beidson, cdumez, henning, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: PC   
OS: macOS 10.14   
See Also: https://bugs.webkit.org/show_bug.cgi?id=197441

Description Thanh Ngo 2020-03-17 00:32:06 PDT
When Pin Tab, and download file. (If not Pin Tab, it's working)
- The first time it will download and have file name "unknown".
- The second time, A new tab displaying the error: Safari can't open the page "blob:https://domain/[ blob id ]". The error is: "The operation couldn't be completed. (WebkitBlobResource error 1.)" (WebkitBlobResource:1)

Code:

const url = window.URL.createObjectURL(new Blob(["Name ,Email"], { type: 'application/csv' }))
const downloadLink = document.createElement('a')
downloadLink.href = url
downloadLink.download = "demo.csv"
document.body.appendChild(downloadLink)
downloadLink.click()
window.URL.revokeObjectURL(url)
document.body.removeChild(downloadLink)
Comment 1 Radar WebKit Bug Importer 2020-03-18 18:04:18 PDT
<rdar://problem/60611822>
Comment 2 Henning Stummer 2020-04-23 04:07:44 PDT
We encountered the same issue with: Safari 13.1, iOS 13.4, WebKit 605.1.15
Comment 3 Chris Dumez 2020-04-23 12:58:04 PDT
(In reply to Henning Stummer from comment #2)
> We encountered the same issue with: Safari 13.1, iOS 13.4, WebKit 605.1.15

Is this about pinned tabs on iPadOS?

This particular bug is about Safari 12 on macOS. We did fix the bug in Safari 13 on macOS (and I am actually not able to reproduce this issue on Safari 13 on macOS).

Issue may remain on iPadOS 13 though but this would be a separate bug.
Comment 4 Chris Dumez 2020-04-23 12:58:12 PDT

*** This bug has been marked as a duplicate of bug 197441 ***
Comment 5 Chris Dumez 2020-04-23 13:01:09 PDT
(In reply to Chris Dumez from comment #3)
> (In reply to Henning Stummer from comment #2)
> > We encountered the same issue with: Safari 13.1, iOS 13.4, WebKit 605.1.15
> 
> Is this about pinned tabs on iPadOS?
> 
> This particular bug is about Safari 12 on macOS. We did fix the bug in
> Safari 13 on macOS (and I am actually not able to reproduce this issue on
> Safari 13 on macOS).
> 
> Issue may remain on iPadOS 13 though but this would be a separate bug.

I might be wrong but I don't think we support pinned tabs on iOS.