Bug 270102 - Fetch Request Fails with `TypeError: Load failed` Error After Initiating Download in Safari
Summary: Fetch Request Fails with `TypeError: Load failed` Error After Initiating Down...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari 17
Hardware: Mac (Apple Silicon) macOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-02-26 10:33 PST by misinoe.t
Modified: 2024-03-04 10:36 PST (History)
4 users (show)

See Also:


Attachments
File to reproduce the issue (44.39 KB, application/zip)
2024-02-26 10:33 PST, misinoe.t
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description misinoe.t 2024-02-26 10:33:26 PST
Created attachment 470050 [details]
File to reproduce the issue

During development, I have encountered a specific bug in Safari. Specifically, after initiating a file download using a dynamic <a> element, subsequent HTTP requests made with the fetch function fail with a `TypeError: Load failed` error. This issue only occurs after the download has been initiated and does not affect any fetch requests made prior to it.

The steps to reproduce are as follows:
1. Open the Developer Tools' Console tab.
2. Click the "Start Download and Fetch" button to start the file download and initiate fetch requests to `https://webkit.org`.
3. Observe in the console that fetch requests made before the download succeed, while fetch requests made after the download fail with a `TypeError: Load failed` error.

This issue could have a significant impact on web applications that need to perform data communication with servers after downloading files. I have attached code that can reproduce this issue, and I kindly request an investigation for a possible fix.

Thank you for your attention to this matter.
Comment 1 Radar WebKit Bug Importer 2024-03-04 10:36:55 PST
<rdar://problem/124018850>