com.apple.WebKit errors after deallocating WKWebView

I'm using WKWebView to display help content in an app. It's embedded in a view that's displayed by a view controller when required, and the help content is extracted from the app's main bundle and loaded via loadHTMLString. This all works without a problem, but exactly 30 seconds after navigating away from the help view two messages appear on the log:


Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service

Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service


I've confirmed that the view controller and view containing the WKWebView have been deallocated as expected when navigating away from the help view, so I'm unsure what could be remaining active to cause these messages, especially given all the content displayed is local to the app.

Replies

113: Could not find specified service

In this context 113 is a private errno-style error (

ENOSERVICE
) used by XPC. Which ties in well with this:

Could not signal service com.apple.WebKit.WebContent … Could not signal service com.apple.WebKit.Networking …

These are two XPC Services used by the web view to implement core functionality (page rendering and networking, respectively).

I suspect what’s going on here is that the web view has shut down and, 30 seconds later, its XPC Services are shut down. That does not seem particularly worrying in and of itself.

Are these log messages your only concern? If so, I don’t think you need to worry about them [1]. However, if you’re seeing other problems associated with these messages then please post some details about those.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

[1] Although if you find them really annoying you should feel free to file a bug about the log noise.

Thanks for your reply.


Yes, my concern was simply that I was getting messages which seemed out of context since I wasn't using the WKWebView to access any remote content. If it's just a question of services that load as a result of my using the web view subsequently stopping after it's deallocated then it's not a problem.

I wasn't using the

WKWebView
to access any remote content.

Right. In this context “remote” means “outside of the process in which the view appears”, not “loaded from the ’net”. Of course there’s no way to know that without knowing a bit how the web view works internally )-:

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
I'm also using WKWebView to display help content in an app. It's embedded in a view that's displayed by a view controller when required, and the help served through a website and loaded but exactly 30 seconds i see the page starts flickering and then it just crashes, I also get similar error

Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}>

ProcessAssertion: Failed to acquire RBS Background assertion 'WebProcess Background Assertion' for process with PID 41741, error: Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}

during this flickering i also observed that didFinishNavigation is being called even though there is no response from the server
  • I am getting the same error,

    Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service Anyone has a solution?

Add a Comment