Skip to content

contacts_update fails with NSCocoaErrorDomain Code=134092 — missing com.apple.developer.contacts.notes entitlement #148

Description

@khwerhahn

Bug Description

contacts_update consistently fails with a CoreData merge conflict error when updating any existing contact:

Error Domain=NSCocoaErrorDomain Code=134092 "(null)"
UserInfo={NSUnderlyingException=Unhandled error (NSCocoaErrorDomain, 134092)
occurred during faulting and was thrown}

This affects every contacts_update call, regardless of which fields are being updated (even updating just organizationName fails). contacts_create works fine for new contacts.

Root Cause

Error code 134092 is triggered when Apple's Contacts framework attempts to access a contact's notes field without the required entitlement. Since macOS Ventura, Apple requires apps to have:

com.apple.developer.contacts.notes

in their entitlements to read or write contacts that have a notes field (even a blank/nil one).

Looking at iMCP's entitlements files (App/App.entitlements and App/App.Debug.entitlements), this entitlement is not included.

When contacts_update fetches an existing contact to modify it, the framework faults in the notes property, triggering the error. New contacts created via contacts_create don't have notes, so they succeed.

Steps to Reproduce

  1. Have an existing contact in Apple Contacts (one that has ever had a notes field, or one synced via iCloud — most contacts qualify)
  2. Use contacts_search to find the contact — works fine
  3. Use contacts_update with the contact's identifier and any field change (e.g., organizationName)
  4. Error 134092 is thrown

Expected Behavior

contacts_update should successfully update the contact's fields.

Additional Issue: No Serialization for Rapid Operations

ContactsService executes each CNSaveRequest immediately with no queue serialization. When multiple contacts_create or contacts_update calls arrive in quick succession, concurrent CNContactStore.execute() calls also trigger error 134092.

Adding a serial dispatch queue or similar throttling mechanism would prevent this.

Environment

  • macOS 15 (Sequoia)
  • iMCP latest version (installed via App Store)
  • Used via Claude Code MCP integration

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions