fix(desktop): stop macOS attach from aborting on nil NSOpenPanel - #20
Merged
Conversation
WKWebView file inputs and rfd dialogs call +[NSOpenPanel openPanel]. On macOS 26, especially ad-hoc local builds, that can return nil; the typed objc2 binding then SIGABRTs. Patch wry 0.55.1 and rfd 0.16.0 to cancel instead, and keep the app a regular activating UI process. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: jmfcamp <jmfcamp@users.noreply.github.com>
Move Regular activation into tray_menu init so lib.rs stays at the main-branch line count (file-size ratchet). Provide a no-op stub so Linux still compiles the tray module. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: jmfcamp <jmfcamp@users.noreply.github.com>
tray_menu is macOS-only, so the vendored wry/rfd nil-panel assertions never executed in Linux CI. Include the same module from util under test so the guards stay live. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: jmfcamp <jmfcamp@users.noreply.github.com>
tray_menu is already macOS-only, so the no-op stub was never called and warned as dead_code when the test module compiled on Linux. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: jmfcamp <jmfcamp@users.noreply.github.com>
jmfcamp
marked this pull request as ready for review
August 20, 2026 21:28
This was referenced Aug 20, 2026
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.
Summary
Attaching a file in the Hula Buzz desktop composer (any
<input type="file">/ WKWebView open panel) SIGABRTed on the main thread. The crash is a Rust panic inobjc2, not a WebKit bug:NSOpenPanel::openPanel()→objc2::__macro_helpers::retain_semantics::none_fail→wry::…::run_file_upload_panel→ abort.+[NSOpenPanel openPanel]can return nil. The typed objc2 binding treats that as a hard fail. This shows up on macOS 26 Tahoe and on ad-hoc / unsigned local.appbuilds (emptycodeSigningTeamID): AppKit’sopenAndSavePanelServiceXPC can refuse the request when the on-disk signature does not match the running image, or when the process is not a regular activating UI app (the crash report Role was Background).This repo pins wry 0.55.1 (via Tauri 2.11.5) and rfd 0.16.0. Upstream tauri-apps/wry#1716 has the nil-guard; it is still open, and crates.io wry 0.56.1 still calls the typed binding. Same panic exists in rfd (
tauri-plugin-dialog/pick_and_upload_*).Fix
desktop/src-tauri/vendor/and[patch.crates-io]them.+[NSOpenPanel openPanel]/+[NSSavePanel savePanel]return. If nil, cancel the picker (WebKit completion handler /None) instead of aborting.NSApplicationActivationPolicyRegularand activate. Composer attach uses a hidden<input type="file">(deferUploadsUntilSend), so Wry is the reported stack; rfd covers the native dialog path.LSUIElement=falseandNSPrincipalClass=NSApplication. Hula branding is unchanged (productNameHula Buzz,com.huladesk.buzz,hulabuzz://).Drop the vendor patches when a crates.io wry/rfd release includes the nil-guard.
Related issue
None found on jmfcamp/buzz (issues disabled). Closest upstream: tauri-apps/tauri#13047, tauri-apps/wry#1716.
Testing
Linux CI:
just desktop-tauri-test(includes source-level guards that the vendored files stay nil-safe). This environment cannot run the Mac GUI; do not treat CI as picker reproduction.Verify on a Mac (the crash host):
aarch64-apple-darwinis fine; ad-hoc/local unsigned.appis the reported case).macOS 26.3.1 / Tahoe is the reported OS.