RESOLVED FIXED 227524
ServiceWorkerRegistration.unregister method fails in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=227524
Summary ServiceWorkerRegistration.unregister method fails in WKWebView
Kiran S
Reported 2021-06-30 05:34:05 PDT
Created attachment 432585 [details] 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)
Attachments
Trying to invoke unregister from dev console (9.58 MB, video/quicktime)
2021-06-30 05:34 PDT, Kiran S
no flags
Patch (12.68 KB, patch)
2021-07-25 09:13 PDT, Kate Cheney
no flags
Chris Dumez
Comment 1 2021-07-01 18:40:06 PDT
App bound domains -> Kate :)
Radar WebKit Bug Importer
Comment 2 2021-07-07 05:35:26 PDT
Kate Cheney
Comment 3 2021-07-25 09:13:09 PDT
EWS
Comment 4 2021-07-26 15:09:35 PDT
Committed r280319 (239967@main): <https://commits.webkit.org/239967@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434180 [details].
Kiran Satheesan
Comment 5 2021-07-28 03:14:00 PDT
Hi Thanks the fix. Could you please provide the following info as well - In which iOS version will this changes be released ? - Is it possible to upgrade the webview locally for trying out the new fix ?
Kate Cheney
Comment 6 2021-08-05 10:57:32 PDT
(In reply to Kiran Satheesan from comment #5) > Hi > > Thanks the fix. > > Could you please provide the following info as well > > - In which iOS version will this changes be released ? > - Is it possible to upgrade the webview locally for trying out the new fix > ? Bugzilla tracks the WebKit Open Source Project which is not in charge of future iOS releases, so I have no comment there.
Kate Cheney
Comment 7 2021-09-03 14:47:39 PDT
This should be in the latest iOS 15 beta, so you can test it there.
Kate Cheney
Comment 9 2021-10-27 13:03:54 PDT
*** Bug 227918 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.