zed-industries/zed · error
resource not found
Error message
resource not found
What it means
Guard in path_for_auxiliary_executable: NSBundle could not locate an executable with the given name in the bundle's MacOS directory (pathForAuxiliaryExecutable returned nil). The requested helper binary is absent from the .app bundle.
Solutions
- Add the helper executable to the bundle's Contents/MacOS in the build/packaging step
- Verify the name passed matches the installed binary exactly (case-sensitive)
- Handle the Err by disabling the dependent feature or prompting reinstall
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/gpui_macos/src/platform.rs:1086 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20).
Data as JSON: /api/errors/8c6ef6eb7c78e636.
Report an issue: GitHub.
Appendix: source
Thrown at crates/gpui_macos/src/platform.rs:1118
CFRelease(old as _)
}
}
}
fn add_recent_document(&self, path: &Path) {
if let Some(path_str) = path.to_str() {
unsafe {
let document_controller: id =
msg_send![class!(NSDocumentController), sharedDocumentController];
let url: id = NSURL::fileURLWithPath_(nil, ns_string(path_str));
let _: () = msg_send![document_controller, noteNewRecentDocumentURL:url];
}
}
}
fn path_for_auxiliary_executable(&self, name: &str) -> Result<PathBuf> {
unsafe {
let bundle: id = NSBundle::mainBundle();
anyhow::ensure!(!bundle.is_null(), "app is not running inside a bundle");
let name = ns_string(name);
let url: id = msg_send![bundle, URLForAuxiliaryExecutable: name];
anyhow::ensure!(!url.is_null(), "resource not found");
ns_url_to_path(url)
}
}
/// Match cursor style to one of the styles available
/// in macOS's [NSCursor](https://developer.apple.com/documentation/appkit/nscursor).
fn set_cursor_style(&self, style: CursorStyle) {
unsafe {
set_active_window_cursor_style(style);
}
}
fn hide_cursor_until_mouse_moves(&self) {
let cursor_visible = self.0.lock().cursor_visible.clone();View on GitHub (pinned to 9d272b0363)