| Summary: | iOS: requests started during pending download are cancelled or fail due to "access control checks" error | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Oliver Joseph Ash <oliverjash> | ||||||||
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | NEW --- | ||||||||||
| Severity: | Major | CC: | achristensen, beidson, bfulgham, cdumez, kkinnunen, krollin, mark.lam, oliverjash, smoley, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | Safari 14 | ||||||||||
| Hardware: | iPhone / iPad | ||||||||||
| OS: | iOS 14 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Oliver Joseph Ash
2021-01-14 03:41:22 PST
Created attachment 417608 [details]
Screen recording 1
Created attachment 417609 [details]
Screen recording 2
Could anyone give us any clue what might be going on here? If we had some idea what exactly the problem was, it might help us find a usable/reliable workaround. I had hoped we could workaround this by scheduling a window focus event handler when the download link is clicked, and then making the requests inside of this event handler. If I understand correctly, the download prompt/modal/dialog will blur the window and then the window will focus again when the prompt is closed. Unfortunately I've only had limited success with this—if the download response has a `content-type` response header to something other than `text/html`, e.g. something like `text/plain`, then it fails with the "access control checks" error again. --- More observations: - If we use a longer delay like 2500ms instead of 10ms, the requests succeed. - If we do that *and* set the download response `content-type` response header to something *other* than `text/html`, e.g. something like `text/plain`, then it fails with the "access control checks" error again. Thanks for filing, I'm seeing the Unhandled Promise Rejection error on iOS 13 and the 14.4 beta as well. I'll cc some relevant folks here. Does anyone have any ideas what is going on here? Please can we get an update on this? At least could we get an explanation for why this is happening so we can better focus our efforts to create a robust workaround? With the release of iOS 15, our workaround broke and yet again we need to invest more time in creating workarounds. |