Post

Replies

Boosts

Views

Activity

Reply to WebGL linkProgram fails for every program in a Mac Catalyst WKWebView on macOS 27.3 beta
Same failure here, but with an iPad app running on Apple silicon ("Designed for iPad"), not Catalyst. So this affects every WKWebView that uses the iOSSupport WebKit, and it still reproduces on 27.3 beta 2 (26C5047e). Setup Mac16,1 (M4). App: PlanningCharts (com.apollodor.planningcharts), a WKWebView that loads a MapLibre GL JS page through a WKURLSchemeHandler. Worked on macOS 27.2 on the same machine. Broke with the update to 27.3 beta 1 (26C5035r), still broken on beta 2. WebGL in Safari on the same Mac works. What we see WebGL 2: the context is created, then every program fails ("Could not compile fragment shader" / "Program failed to link"), and the info log is empty. A WebGL 1 context draws nothing either. The unified log shows two sandbox denials for the app's com.apple.WebKit.GPU process right at its start, before the first shader fails (captured on beta 1, paths shortened, "…/C" is DARWIN_USER_CACHE_DIR): deny file-issue-extension (read-write) …/C/com.apple.WebKit.GPU+com.apollodor.planningcharts/com.apple.WebKit.GPU/com.apple.metalfe deny file-issue-extension (read-write) …/C/com.apple.WebKit.GPU+com.apollodor.planningcharts/com.apple.WebKit.GPU/com.apple.gpuarchiver A possible explanation for "Compilation BEGIN" without "Compilation SUCCESS" The GPU process is not allowed to hand its Metal cache directories to MTLCompilerService. In the open-source WebKit tree: The iOS-family UI process issues a read-write extension only for <container>/Library/Caches/com.apple.WebKit.GPU (GPUProcessProxy.cpp, containerCachesDirectoryExtensionHandle). The iOS-family GPU sandbox profile lets the GPU process re-issue extensions only for paths it already holds an extension for (com.apple.WebKit.GPU.sb.in, read-write-and-issue-extensions). MTLSetShaderCachePath(containerCachesDirectory) is only called under USE(EXTENSIONKIT) (GPUProcessCocoa.mm). The denied paths are under DARWIN_USER_CACHE_DIR, which that extension does not cover. I have not checked whether the same denials are logged on 27.2, so this is a lead, not a proof. Could you check whether your Catalyst GPU process logs the same two denials? This shows them at app launch: log stream --style compact --predicate 'eventMessage CONTAINS "file-issue-extension" AND eventMessage CONTAINS "com.apple.WebKit.GPU"' Also seen on the same build, possibly related: the app's WebContent process fails to decode almost every WebP image (ImageIO: 'WEBP'-_reader->initImage[0] failed err=-50). Our feedback: FB25440938.
Topic: Graphics & Games SubTopic: General Tags:
1w
Reply to WebGL linkProgram fails for every program in a Mac Catalyst WKWebView on macOS 27.3 beta
Same failure here, but with an iPad app running on Apple silicon ("Designed for iPad"), not Catalyst. So this affects every WKWebView that uses the iOSSupport WebKit, and it still reproduces on 27.3 beta 2 (26C5047e). Setup Mac16,1 (M4). App: PlanningCharts (com.apollodor.planningcharts), a WKWebView that loads a MapLibre GL JS page through a WKURLSchemeHandler. Worked on macOS 27.2 on the same machine. Broke with the update to 27.3 beta 1 (26C5035r), still broken on beta 2. WebGL in Safari on the same Mac works. What we see WebGL 2: the context is created, then every program fails ("Could not compile fragment shader" / "Program failed to link"), and the info log is empty. A WebGL 1 context draws nothing either. The unified log shows two sandbox denials for the app's com.apple.WebKit.GPU process right at its start, before the first shader fails (captured on beta 1, paths shortened, "…/C" is DARWIN_USER_CACHE_DIR): deny file-issue-extension (read-write) …/C/com.apple.WebKit.GPU+com.apollodor.planningcharts/com.apple.WebKit.GPU/com.apple.metalfe deny file-issue-extension (read-write) …/C/com.apple.WebKit.GPU+com.apollodor.planningcharts/com.apple.WebKit.GPU/com.apple.gpuarchiver A possible explanation for "Compilation BEGIN" without "Compilation SUCCESS" The GPU process is not allowed to hand its Metal cache directories to MTLCompilerService. In the open-source WebKit tree: The iOS-family UI process issues a read-write extension only for <container>/Library/Caches/com.apple.WebKit.GPU (GPUProcessProxy.cpp, containerCachesDirectoryExtensionHandle). The iOS-family GPU sandbox profile lets the GPU process re-issue extensions only for paths it already holds an extension for (com.apple.WebKit.GPU.sb.in, read-write-and-issue-extensions). MTLSetShaderCachePath(containerCachesDirectory) is only called under USE(EXTENSIONKIT) (GPUProcessCocoa.mm). The denied paths are under DARWIN_USER_CACHE_DIR, which that extension does not cover. I have not checked whether the same denials are logged on 27.2, so this is a lead, not a proof. Could you check whether your Catalyst GPU process logs the same two denials? This shows them at app launch: log stream --style compact --predicate 'eventMessage CONTAINS "file-issue-extension" AND eventMessage CONTAINS "com.apple.WebKit.GPU"' Also seen on the same build, possibly related: the app's WebContent process fails to decode almost every WebP image (ImageIO: 'WEBP'-_reader->initImage[0] failed err=-50). Our feedback: FB25440938.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
1w