3

only in ios16.1, wkwebview can not work.

``

let cfg = WKWebViewConfiguration()
let web = WKWebView(frame: view.bounds, configuration: cfg)
web.uiDelegate = self
web.navigationDelegate = self
view.addSubview(web)
        
web.load(URLRequest(url: URL(string: "xxx")!))

``

error info:

[Process] 0x1140009d0 - [PID=4283] WebProcessProxy::requestTermination: reason=8 [Process] 0x1140009d0 - [PID=4283] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=RequestedByNetworkProcess [Process] 0x10483c618 - [pageProxyID=6, webPageID=7, PID=4283] WebPageProxy::processDidTerminate: (pid 4283), reason=RequestedByNetworkProcess [Loading] 0x10483c618 - [pageProxyID=6, webPageID=7, PID=4283] WebPageProxy::dispatchProcessDidTerminate: reason=RequestedByNetworkProcess [assertion] Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}> [ProcessSuspension] 0x11301c4e0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=4283, error: Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}

test url work fine in Safari, i do not know why

Bleach
  • 31
  • 1
  • 2
  • Yes, I have the same problem. Is an issue in WKWebView with SharedWorkers, [here](https://developer.apple.com/forums/thread/718757?page=1#734568022) is the explanation how to disable it. – Eric Oct 31 '22 at 23:27
  • @Eric I have another problem, when using ywkwebview loads a complex page, there is a high chance that the UI will freeze, and it seems that the error message will only appear on models above ios15 [IPC] Connection::waitForSyncReply: Timed-out while waiting for reply for WebPage_TouchEventSync from process 2631, id=3 – Bleach Nov 02 '22 at 01:49
  • I tested with a very complex page and I didn't see the UI freezing. For me only disabling SharedWorkers was fine. – Eric Nov 03 '22 at 18:38
  • @Eric Yes, this solved one of my problems, thank you – Bleach Nov 04 '22 at 06:46
  • @Eric help me please, my web project is stuck, I will be fired if I can't solve this problem. "http://oo64.palmmob.com/palmmob3_web/doceditorv4.php?user=1621008&d=F9168800-A598-4880-8153-83031505D897&x=4739b22b4339cd420c117fb3cb6e374e&o=16.1.1&fileID=2777%20%282%29.docx&n=CN&t=1675150919&type=mobile&u=1621008&l=zh-Hans&a=13&action=edit&c=apple&v=169&" This is the test url, open it with safari, try to quickly zoom, the UI will freeze soon, click no response. "Connection::waitForSyncReply: Timed-out while waiting for reply for WebPage_TouchEventSync from process" this is the error message – Bleach Jan 31 '23 at 07:46
  • In Safari on simulator is just loading message "loading document" and in my Mac the fan is gonna blow! I don't know what framework are you using but it looks hybrid application. It's too heavy for mobile, you will need to debug in Xcode and check how many memory are you using. Something is happening in your code because is not loading. Also check the web console for any errors or warnings. – Eric Jan 31 '23 at 13:56
  • @Eric thanks, i found the key to solve the problem: "GPU process DOM Rendering", disable this in phone settings, it works perfectly on safari, but... i don't know how to disable it in WKWebView ? – Bleach Feb 01 '23 at 11:13
  • Try to double check the code or the framework you are using, because is html and some elements maybe are not rendering well in the canvas. – Eric Feb 01 '23 at 16:21

1 Answers1

1

Please take a look at those steps: It worked for me. I was having webview which was crashing on redirecting to other url. Json's answer helped me.Ref:

https://developer.apple.com/forums/thread/718757?page=1#734568022

And it wasn't enough so I add following:

Select Product => Scheme => Edit Scheme or use shortcut : CMD + < Select the Run option from left side.

On Environment Variables section, add the variable OS_ACTIVITY_MODE = disable

Ref:Xcode 8, iOS 10 - "Starting WebFilter logging for process"

Deepak Ghadi
  • 163
  • 2
  • 5