M1 Chip Mac app - MS Office files not opening in WKWebview

We are not able to load any .xlsx, .pptx file in WKWebview with M1 Chip Mac app but we can load PDF files.

The app is designed for iPad.

We can able to load the same files in iOS and iPadOS.

We are getting "Frame Load Interrupted" error in Mac app.

  • I receive the same error back in the func webView(_ webView: WKWebView, didFailProvisionalNavigation: WKNavigation!, withError error: Error). The error received is WebKitErrorDomain code 102 - Frame Load Interrupted.

    PDFs, JPGs all display fine in the WKWebview on M1, but unable to display Pages, Numbers and other Microsoft file types without the above error.

    The same files that fail with error on M1 display without a problem on the iPad.

    Any help in identifying why M1 fails for these file types would be appreciated.

  • I am having this exact same issue. Does anyone have a fix for this?

    [Process] 0x1530d6818 - [pageProxyID=15, webPageID=16, PID=3455] WebPageProxy::didFailProvisionalLoadForFrame: frameID=3, domain=WebKitErrorDomain, code=102

Add a Comment

Replies

func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) { decisionHandler(.allow)  }

  • Thank you for this suggestion. I have implemented this function and it now no longer returns the Frame Load Interrupted (error 102).

    However, it now renders the documents in the WKWebview with strange characters (binary?) Any suggestions on how to solve that issue?

  • I am getting that issue also. Still trying to fix it.

  • Could you find any workaround to solve this issue? (having the raw content displayed also instead of the file being renderered properly on the Mac but ok on iPad/iPhone)

Add a Comment

2 years have passed since this thread was created, the problem still exists(

Using the QLPreviewController could be a workaround. It renders docs properly on the Mac.