Bug 180849

Summary: Service Worker Registration promise is sometimes not rejected when the script load fails
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Service WorkersAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, commit-queue, ews-watchlist, ggaren, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
none
Archive of layout-test-results from ews125 for ios-simulator-wk2
none
Patch
none
Patch
none
Patch
none
Patch none

Description Chris Dumez 2017-12-14 16:47:50 PST
Service Worker Registration promise is sometimes not rejected when the script load fails.
Comment 1 Chris Dumez 2017-12-14 19:15:50 PST
Created attachment 329439 [details]
Patch
Comment 2 EWS Watchlist 2017-12-14 20:18:27 PST
Comment on attachment 329439 [details]
Patch

Attachment 329439 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/5668394

New failing tests:
imported/w3c/web-platform-tests/service-workers/service-worker/claim-not-using-registration.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/claim-affect-other-registration.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/register-default-scope.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/service-worker-csp-default.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-using-registration.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/service-worker-csp-script.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-installed.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/claim-using-registration.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https.html
Comment 3 EWS Watchlist 2017-12-14 20:18:28 PST
Created attachment 329449 [details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 4 EWS Watchlist 2017-12-14 20:23:17 PST
Comment on attachment 329439 [details]
Patch

Attachment 329439 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/5668282

New failing tests:
imported/w3c/web-platform-tests/service-workers/service-worker/claim-not-using-registration.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/claim-affect-other-registration.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/register-default-scope.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/service-worker-csp-default.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-using-registration.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/service-worker-csp-script.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-installed.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/claim-using-registration.https.html
imported/w3c/web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https.html
Comment 5 EWS Watchlist 2017-12-14 20:23:18 PST
Created attachment 329450 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.6
Comment 6 Chris Dumez 2017-12-14 20:41:46 PST
(In reply to Build Bot from comment #4)
> Comment on attachment 329439 [details]
> Patch
> 
> Attachment 329439 [details] did not pass ios-sim-ews (ios-simulator-wk2):
> Output: http://webkit-queues.webkit.org/results/5668282
> 
> New failing tests:
> imported/w3c/web-platform-tests/service-workers/service-worker/claim-not-
> using-registration.https.html
> imported/w3c/web-platform-tests/service-workers/service-worker/claim-affect-
> other-registration.https.html
> imported/w3c/web-platform-tests/service-workers/service-worker/register-
> default-scope.https.html
> imported/w3c/web-platform-tests/service-workers/service-worker/service-
> worker-csp-default.https.html
> imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-
> using-registration.https.html
> imported/w3c/web-platform-tests/service-workers/service-worker/service-
> worker-csp-script.https.html
> imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting.
> https.html
> imported/w3c/web-platform-tests/service-workers/service-worker/skip-waiting-
> installed.https.html
> imported/w3c/web-platform-tests/service-workers/service-worker/claim-using-
> registration.https.html
> imported/w3c/web-platform-tests/service-workers/service-worker/register-same-
> scope-different-script-url.https.html

Those failures indicate that LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/empty.js is missing, even though I included it in my patch.

It could be that git/svn is getting confused because it is an empty file? Not sure how to address this, the file does show in my patch on bugzilla.
Comment 7 Chris Dumez 2017-12-14 21:22:24 PST
Created attachment 329455 [details]
Patch
Comment 8 Chris Dumez 2017-12-14 22:15:48 PST
Created attachment 329463 [details]
Patch
Comment 9 Chris Dumez 2017-12-15 09:13:01 PST
Comment on attachment 329463 [details]
Patch

Trying an alternative proposal from Youenn.
Comment 10 Chris Dumez 2017-12-15 09:17:14 PST
Created attachment 329491 [details]
Patch
Comment 11 Chris Dumez 2017-12-15 09:57:37 PST
Created attachment 329492 [details]
Patch
Comment 12 Chris Dumez 2017-12-15 11:36:57 PST
Comment on attachment 329492 [details]
Patch

Clearing flags on attachment: 329492

Committed r225975: <https://trac.webkit.org/changeset/225975>
Comment 13 Chris Dumez 2017-12-15 11:36:59 PST
All reviewed patches have been landed.  Closing bug.
Comment 14 Radar WebKit Bug Importer 2017-12-15 11:37:35 PST
<rdar://problem/36078168>