Bug 302212
| Summary: | WKWebView Precondition Failure: Unable to load binary archive for shader library | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | julianmella2 |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | adilrc, ap, pvollan, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Mac (Apple Silicon) | ||
| OS: | macOS 26 | ||
julianmella2
Hello,
When I try to run a WKWebView for MacOS, I get the following error:
precondition failure: unable to load binary archive for shader library: /System/Library/PrivateFrameworks/IconRendering.framework/Resources/binary.metallib, The file file:///System/Library/PrivateFrameworks/IconRendering.framework/Resources/binary.metallib has an invalid format.
==============================
This is the code I use, it's very simple.
ContentView.swift
import SwiftUI
struct ContentView: View {
var body: some View {
WebViewControllerWrapper()
.frame(minWidth: 800, minHeight: 600)
}
}
struct WebViewControllerWrapper: NSViewControllerRepresentable {
func makeNSViewController(context: Context) -> ViewController {
return ViewController()
}
func updateNSViewController(_ nsViewController: ViewController, context: Context) {
// nothing to update
}
}
==============================
ViewController.swift
import Cocoa
import WebKit
class ViewController: NSViewController {
var webView: WKWebView!
override func loadView() {
webView = WKWebView(frame: .zero)
self.view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
if let url = URL(string: "https://www.apple.com") {
let request = URLRequest(url: url)
webView.load(request)
}
}
}
macOS Tahoe 26.1
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
Thank you for the report! Could you please clarify if this is a benign warning, or if are observing some issues linked to it?
adilrc
Hi, I'm getting the same error logged in the console, here's more information:
Library: RenderBox
Subsystem: com.apple.renderbox
Level: error
Message:
```
precondition failure: unable to load binary archive for shader library: /System/Library/PrivateFrameworks/IconRendering.framework/Resources/binary.metallib, The file file:///System/Library/PrivateFrameworks/IconRendering.framework/Resources/binary.metallib has an invalid format.
```
There's no apparent issues related to the error in my case.
Radar WebKit Bug Importer
<rdar://problem/164826744>