[Webkit-unassigned] [Bug 229554] New: WKWebView: navigator.serviceWorker.register method fails for a new version of an already registered service worker.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 26 07:01:48 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=229554

            Bug ID: 229554
           Summary: WKWebView: navigator.serviceWorker.register method
                    fails for a new version of an already registered
                    service worker.
           Product: WebKit
           Version: Other
          Hardware: iPhone / iPad
                OS: Other
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Service Workers
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: kiran.satheesan at oracle.com

Created attachment 436506

  --> https://bugs.webkit.org/attachment.cgi?id=436506&action=review

navigator.serviceWorker.register error on console

WKWebView: navigator.serviceWorker.register method fails for a new version of an already registered service worker.

Overview

    The issue here is that it is not possible to use register method to load a new version of service worker once 3 registrations are reached.
    In this case the register operation does not violate the limit as its an update operation.

Steps to Reproduce

    1. On WKWebView try to load 2 websites with service workers
    2. From a new website execute -> navigator.serviceWorker.register('sw.js?version=1')
    3. Now the max limit of 3 is reached.
    4. After this try to update the service worker by executing -> navigator.serviceWorker.register('sw.js?version=2')

Actual Result

     -  register method fails with the error - "TypeError: Job rejected for non app-bound domain".
        This happens even though the limit of 3 will not be exceeded.

Expected Result

     - register method should not fail if the limit of 3 is not exceeded.

Environment

    Device: iPad Mini 4
    OS: iOS 15.0 (19A5325f)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210826/8e6e71d5/attachment.htm>


More information about the webkit-unassigned mailing list