zed-industries/zed · error
{verb} password failed: {status}
Error message
{verb} password failed: {status} What it means
Guard in the macOS Keychain credential writer: SecItemUpdate (or SecItemAdd) returned a non-zero OSStatus, so storing/updating the internet password failed. {status} is the raw Security framework status code (e.g. -34018 missing entitlement, errSecAuthFailed).
Source
Thrown at crates/gpui_macos/src/platform.rs:1210
// update the username and password.
let mut verb = "updating";
let mut query_attrs = CFMutableDictionary::with_capacity(2);
query_attrs.set(kSecClass as *const _, kSecClassInternetPassword as *const _);
query_attrs.set(kSecAttrServer as *const _, url.as_CFTypeRef());
let mut attrs = CFMutableDictionary::with_capacity(4);
attrs.set(kSecClass as *const _, kSecClassInternetPassword as *const _);
attrs.set(kSecAttrServer as *const _, url.as_CFTypeRef());
attrs.set(kSecAttrAccount as *const _, username.as_CFTypeRef());
attrs.set(kSecValueData as *const _, password.as_CFTypeRef());
let mut status = SecItemUpdate(
query_attrs.as_concrete_TypeRef(),
attrs.as_concrete_TypeRef(),
);
// If there were no existing credentials for the given server, then create them.
if status == errSecItemNotFound {
verb = "creating";
status = SecItemAdd(attrs.as_concrete_TypeRef(), ptr::null_mut());
}
anyhow::ensure!(status == errSecSuccess, "{verb} password failed: {status}");
}
Ok(())
})
}
fn read_credentials(&self, url: &str) -> Task<Result<Option<(String, Vec<u8>)>>> {
let url = url.to_string();
self.background_executor().spawn(async move {
let url = CFString::from(url.as_str());
let cf_true = CFBoolean::true_value().as_CFTypeRef();
unsafe {
use security::*;
View on GitHub (pinned to 9d272b0363)
Solutions
- Map the OSStatus: -34018 means keychain-access-groups entitlement missing in dev builds; add it or use a proper signing identity
- For errSecItemNotFound, insert first via SecItemAdd instead of SecItemUpdate
- Propagate the error to the UI so login-save failures are visible rather than silent
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/gpui_macos/src/platform.rs:1178 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/818c3918675edf76.
Report an issue: GitHub.