Skip to content

fix(macos): add NSLocalNetworkUsageDescription for macOS 26 webview blank tabs#249

Open
St0rmingBr4in wants to merge 1 commit intoSnapmaker:mainfrom
St0rmingBr4in:fix/macos26-local-network-webview
Open

fix(macos): add NSLocalNetworkUsageDescription for macOS 26 webview blank tabs#249
St0rmingBr4in wants to merge 1 commit intoSnapmaker:mainfrom
St0rmingBr4in:fix/macos26-local-network-webview

Conversation

@St0rmingBr4in
Copy link
Copy Markdown

@St0rmingBr4in St0rmingBr4in commented Apr 10, 2026

Problem

On macOS 26 (Tahoe), the Print Preprocessing window show a blank white screen. The Prep and Preview tabs work fine.

Screenshot 2026-04-10 at 12 19 38

Root cause: macOS 26 tightened Local Network access controls for WKWebView. The app serves its Flutter-based UI on http://127.0.0.1:13619, but the embedded WebKit webview is blocked from fetching it before the app can even request Local Network permission. Without NSLocalNetworkUsageDescription in Info.plist, the OS silently denies access, no dialog is shown, no fallback.

This was reported in issues #58 and #167, and also discussed on Reddit:
https://www.reddit.com/r/snapmaker/comments/1pr5icl/snapmaker_orca_mac_problem/

Root cause of the fix being missing in 2.3.0

src/dev-utils/platform/osx/Info.plist.in already contains these keys (added in Feb 2026), but it is not wired to MACOSX_BUNDLE_INFO_PLIST in CMake. The actual bundle Info.plist is generated from cmake/modules/MacOSXBundleInfo.plist.in. This PR fixes the correct file.

Changes

Single file changed: cmake/modules/MacOSXBundleInfo.plist.in

Three keys added:

  • NSLocalNetworkUsageDescription which triggers the macOS "Allow Local Network Access" permission dialog on first launch
  • NSBonjourServices required alongside the usage description to declare service types
  • NSAllowsLocalNetworking: true which explicitly permits HTTP to localhost within WebViews

Testing

Tested on macOS 26.x (Tahoe) with a local build. After granting Local Network permission on first launch, the Print Preprocessing window loads correctly.

Fixes #58
Fixes #167

macOS 26 (Tahoe) blocks WKWebView from accessing localhost before the
app can request Local Network permission. Without NSLocalNetworkUsageDescription
in Info.plist, the OS silently denies access with no dialog, causing the
Home and Device tabs to show a blank white screen.

Add the three keys needed to trigger the permission prompt:
- NSLocalNetworkUsageDescription: usage string shown to the user
- NSBonjourServices: declares the service types the app uses
- NSAllowsLocalNetworking: permits HTTP to localhost in WebViews

Note: this file (cmake/modules/MacOSXBundleInfo.plist.in) is the template
actually used by the CMake build. The src/dev-utils/platform/osx/Info.plist.in
file already had these keys but was never wired to MACOSX_BUNDLE_INFO_PLIST.

Fixes: Snapmaker#58
Fixes: Snapmaker#167

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@St0rmingBr4in St0rmingBr4in marked this pull request as ready for review April 10, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to view Snapmaker devices on MacOS Tahoe 2.3 Unable to access home or device tab

1 participant