Bug 247087

Summary: iOS 16.1 regression of SharedWorker when a process doesn't have com.apple.developer.web-browser entitlement
Product: WebKit Reporter: dmt021
Component: Service WorkersAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: cdumez, leonardo.balter, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   

Description dmt021 2022-10-26 14:23:36 PDT
Starting from iOS 16.1 WKWebView can't load pages with SharedWorker, if an app doesn't have "com.apple.developer.web-browser" entitlement.
Samples: 
https://mdn.github.io/dom-examples/web-workers/simple-shared-worker/ 
https://vc.ru

The NetProcess terminates the WebProcess, and renders the whole WKWebView crashed.
In case the "com.apple.developer.web-browser" entitlement is present it works fine.

The issue can be reproduced on iOS 16.1 with a basic WKWebView, or in apps:
Google - https://apps.apple.com/ru/app/google/id284815942
Yandex - https://apps.apple.com/ru/app/яндекс-с-алисой/id1050704155

The issue can NOT be reproduced in:
Chrome - https://apps.apple.com/ru/app/chrome-браузер-от-google/id535886823
Yandex Browser - https://apps.apple.com/ru/app/яндекс-браузер/id483693909
or on any iOS version prior 16.1
Comment 1 Radar WebKit Bug Importer 2022-10-26 15:12:38 PDT
<rdar://problem/101606803>
Comment 2 youenn fablet 2022-10-27 02:47:08 PDT
Can you share the crash log?
Comment 3 dmt021 2022-10-27 03:54:03 PDT
Clarification: The app doesn't crash. Only the WebProcess crashes. There is this message in the log.
[Process] 0x136010a18 - [pageProxyID=6, webPageID=7, PID=57025] WebPageProxy::processDidTerminate: (pid 57025), reason=RequestedByNetworkProcess

And:
com.apple.WebKit.Networking  Received an invalid message 'WebSharedWorkerObjectConnection_FetchScriptInClientReply' from WebContent process 5, requesting for it to be terminated.
Comment 4 Leo Balter 2022-10-28 14:08:56 PDT
This issue is also affecting Salesforce customers on iOS. This is used in multiple apps.

Ref https://trailblazer.salesforce.com/issues_view?title=white-screen-when-logging-into-mobile-publisher-for-experience-cloud-app-on-ios-16-1&Id=a1p4V000002fqzg
Comment 5 Chris Dumez 2022-10-28 14:16:42 PDT
Also see this for some details (and a workaround):
https://developer.apple.com/forums/thread/718757?page=1#734292022

*** This bug has been marked as a duplicate of bug 247147 ***