fix(macos): add NSLocalNetworkUsageDescription for macOS 26 webview blank tabs#249
Open
St0rmingBr4in wants to merge 1 commit intoSnapmaker:mainfrom
Open
fix(macos): add NSLocalNetworkUsageDescription for macOS 26 webview blank tabs#249St0rmingBr4in wants to merge 1 commit intoSnapmaker:mainfrom
St0rmingBr4in wants to merge 1 commit intoSnapmaker:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On macOS 26 (Tahoe), the Print Preprocessing window show a blank white screen. The Prep and Preview tabs work fine.
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. WithoutNSLocalNetworkUsageDescriptioninInfo.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.inalready contains these keys (added in Feb 2026), but it is not wired toMACOSX_BUNDLE_INFO_PLISTin CMake. The actual bundle Info.plist is generated fromcmake/modules/MacOSXBundleInfo.plist.in. This PR fixes the correct file.Changes
Single file changed:
cmake/modules/MacOSXBundleInfo.plist.inThree keys added:
NSLocalNetworkUsageDescriptionwhich triggers the macOS "Allow Local Network Access" permission dialog on first launchNSBonjourServicesrequired alongside the usage description to declare service typesNSAllowsLocalNetworking: truewhich explicitly permits HTTP tolocalhostwithin WebViewsTesting
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