LPMetadataProvider errors

Using the code below to fetch data for multiple urls I encounter a number of errors such as:

2021-12-01 20:20:32.090690-0500 foo[63170:6750061] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>

021-12-01 20:20:32.115662-0500 yerl[63170:6749861] [ProcessSuspension] 0x10baf8cc0 - ProcessAssertion: Failed to acquire RBS assertion 'ConnectionTerminationWatchdog' for process with PID=63200, 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}

I've added the following to my entitlements file:

 <key>com.apple.security.network.client</key>

    <true/>

with no change in the result. I gather that these are errors from a WKWebView but don't know how to resolve them.

@State private var metadataProvider: LPMetadataProvider?
...
metadataProvider?.startFetchingMetadata(for: url) { (linkMetadata, error) in

            guard let linkMetadata = linkMetadata, let imageProvider = linkMetadata.iconProvider else { return }

            imageProvider.loadObject(ofClass: UIImage.self) { (fetchedImage, error) in

                if let error = error {
                    print(error.localizedDescription)
                    return
                }

                if let uiimage = fetchedImage as? UIImage {
                    DispatchQueue.main.async {
                        let image = Image(uiImage: uiimage)
                        self.image = image
                        print("cache: miss \(url.absoluteString)")
                        model.set(uiimage, for: url)
                    }
                } else {
                    print("no image available for \(url.absoluteString)")
                }
            }
        }

Thanks in advance.

Hi. I am having this same issue. Did you ever resolve the issue? Alternatively, did you try a different approach to get the metadata?

Did you ever resolve this? I have the same issue.

Thanks

LPMetadataProvider errors
 
 
Q