WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
247793
Clicking a link to a download file served by a service-worker with a fetch event handler yields "Frame load interrupted" error
https://bugs.webkit.org/show_bug.cgi?id=247793
Summary
Clicking a link to a download file served by a service-worker with a fetch ev...
Steffen Weber
Reported
2022-11-11 02:11:32 PST
Created
attachment 463490
[details]
reduced test-case When clicking a link to a file that Safari has to download (because of its MIME-type, a "Content-disposition" header, or a "download" attribute on the link) and which is served by a service worker with a non-empty fetch event handler, the download hangs and the developer console shows an error: "Failed to load resource: Frame load interrupted". This is a regression in Safari 16.0 or 16.1. We've been able to reproduce it on macOS 13 (Safari 16.1 18614.2.9.1.12 and Safari Technology Preview as of yesterday), on iPadOS 16.1 and on Linux (Epiphany 42.4 "Powered by WebKitGTK 2.38.2"). I've attached a reduced test-case. Remember that you have to open it on a secure origin (localhost or HTTPS) because it uses a service worker. The bug disappears when you remove the fetch event handler (or the service worker as a whole). The bug also disappears when you link to a file that Safari doesn't have to download but can display itself.
Attachments
reduced test-case
(208 bytes, application/zip)
2022-11-11 02:11 PST
,
Steffen Weber
no flags
Details
reduced test-case (for real)
(902 bytes, application/zip)
2022-11-14 00:15 PST
,
Steffen Weber
no flags
Details
reduced test-case v3
(1.01 KB, application/zip)
2022-11-14 02:18 PST
,
Steffen Weber
no flags
Details
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-11-13 14:52:30 PST
<
rdar://problem/102296700
>
youenn fablet
Comment 2
2022-11-14 00:03:17 PST
It appears the reduced test case only contains an empty file. Can you upload a new reduced test case?
Steffen Weber
Comment 3
2022-11-14 00:15:55 PST
Created
attachment 463514
[details]
reduced test-case (for real) Accidentally uploaded the wrong file and had already deleted the files locally. But fortunately the test-case was easy enough to recreate it. :)
youenn fablet
Comment 4
2022-11-14 01:06:21 PST
I can see the "Failed to load resource: Frame load interrupted", which is probably unexpected. But I do not see the download hang (in WebKit ToT and STP 157). The file seems properly downloaded and unzipped.
youenn fablet
Comment 5
2022-11-14 01:21:01 PST
I'll work on fixing the "Frame load interrupted". It seems this message was there in Safari 15.5
youenn fablet
Comment 6
2022-11-14 01:22:55 PST
@Steffen, let me know whether your main issue is the download hang. Since I cannot reproduce, I might ask a sysdiagnose. For now, I will use this bug entry for the console log message.
youenn fablet
Comment 7
2022-11-14 01:24:46 PST
Pull request:
https://github.com/WebKit/WebKit/pull/6463
Steffen Weber
Comment 8
2022-11-14 02:18:21 PST
Created
attachment 463519
[details]
reduced test-case v3 It seems like the two issues (the hanging download and the console error) are indeed unrelated. I had wrongly assumed they were related and focused on creating a reduced test-case that triggered the console error in Epiphany and later didn't verify the results in Safari again. (It's way easier for me to test in Epiphany.) Anyway, I have created another test-case (v3) that triggers the real bug (the hanging download) in Safari. It turns out you have to add "FetchEvent.preloadResponse" to the mix to trigger this bug. Please have a look at the updated test-case.
youenn fablet
Comment 9
2022-11-14 02:35:17 PST
Thanks Steffen, I can reproduce and will fix the issue.
EWS
Comment 10
2022-11-16 00:52:06 PST
Committed
256725@main
(30bd7667b181): <
https://commits.webkit.org/256725@main
> Reviewed commits have been landed. Closing PR #6463 and removing active labels.
Steffen Weber
Comment 11
2022-11-16 03:00:53 PST
Thank you! May I ask in which Safari release this fix will appear? Any chance to get the fix earlier than Safari 17 in March / April 2023?
Steffen Weber
Comment 12
2022-11-16 03:01:50 PST
Oops, forgot that this bug is only about the console error.
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