[Webkit-unassigned] [Bug 227524] New: ServiceWorkerRegistration.unregister method fails in WKWebView
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jun 30 05:34:05 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=227524
Bug ID: 227524
Summary: ServiceWorkerRegistration.unregister method fails in
WKWebView
Product: WebKit
Version: Other
Hardware: iPhone / iPad
OS: iOS 14
Status: NEW
Severity: Normal
Priority: P2
Component: Service Workers
Assignee: webkit-unassigned at lists.webkit.org
Reporter: 18kirans at gmail.com
Created attachment 432585
--> https://bugs.webkit.org/attachment.cgi?id=432585&action=review
Trying to invoke unregister from dev console
Overview
ServiceWorkerRegistration.unregister method fails in WKWebView. Error message "TypeError: Job rejected for non app-bound domain" is displayed in console.
The current domain is listed as a App Bound Domain and service worker registration is also successful. But the issue is with unregister method.
I have also attached a video of the error. In the video I have tried to invoke unregister method from Dev Console.
Steps to Reproduce
1. For an App Bound Domain. Register a service worker
2. After the service worker is activated try to unregister it
3. Sample Code
navigator.serviceWorker.getRegistration()
.then(registration => registration.unregister())
.then(() => console.log('Unregistration success'))
.catch(error => console.error('Unregistration failed', error));
Actual Result
unregister method fails with the error - "TypeError: Job rejected for non app-bound domain".
Expected Result
Service worker registration gets unregistered
Environment
Device: iPad Mini 4
OS: iOS 14.7 (18G5042c)
--
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/20210630/e2d55155/attachment.htm>
More information about the webkit-unassigned
mailing list