Sandboxing and ABAddressBook

  • Hi,

    I have address book data access enabled, but when I do a [ABAddressBook sharedAddressBook] in applicationDidFinishLaunching, it generates a series of sandbox deny file-read-data messages.

    Interestingly, if I then ask it for "me" it returns correct data, so whatever the messages are, it doesn't seem to be stopping it loading at least some of the addresses.

    I'd like to get rid of the error if possible - any ideas where to look?

    0  libsystem_kernel.dylib           0x00007fff93ea5fee __open + 10
    1  CarbonCore                       0x00007fff90489f74 PBOpenIteratorSync + 378
    2  CarbonCore                       0x00007fff90489de2 FSOpenIterator + 28
    3  Foundation                       0x00007fff989cbab3 _NSDirectoryContentsFromCarbonError + 130
    4  Foundation                       0x00007fff989c9962 -[NSFileManager directoryContentsAtPath:matchingExtension:options:keepExtension:error:] + 315
    5  Foundation                       0x00007fff989c9814 -[NSFileManager contentsOfDirectoryAtPath:error:] + 36
    6  AddressBook                       0x00007fff96be6716 -[ABDataSourcePluginIndex sourceBundlePaths] + 940
    7  AddressBook                       0x00007fff96be6118 -[ABDataSourcePluginIndex indexPlugins] + 94
    8  AddressBook                       0x00007fff96be6050 -[ABDataSourcePluginIndex bundleForClassName:] + 37
    9  AddressBook                       0x00007fff96be5fce -[ABDataSourcePluginIndex loadBundleForClassName:error:] + 31
    10  AddressBook                       0x00007fff96be5e47 +[ABAccountFactory sourceClassForClassName:] + 64
    11  AddressBook                       0x00007fff96be5cda -[ABAccountFactory localAccount] + 39
    12  AddressBook                       0x00007fff96be5c30 -[ABAccountFactory uncachedAccounts] + 53
    13  AddressBook                       0x00007fff96be5a37 -[ABAccountRepository runWithLockLoadingExistingAccountsIfNecessary:] + 259
    14  AddressBook                       0x00007fff96be588a -[ABAccountRepository allAccounts] + 208
    15  AddressBook                       0x00007fff96be577a -[ABAccountRepository persistentAccounts] + 17
    16  AddressBook                       0x00007fff96be5139 -[ABPersistentStoreCoordinatorFactory pool_makeCoordinatorForAllAvailableSources] + 102
    17  AddressBook                       0x00007fff96be506c ABResultWithAutoreleasePool + 62
    18  AddressBook                       0x00007fff96be501c -[ABPersistentStoreCoordinatorFactory makeCoordinatorForAllAvailableSources] + 73
    19  AddressBook                       0x00007fff96be4de6 -[ABPersistentStoreCoordinatorCache nts_coordinatorForAllSources] + 102
    20  AddressBook                       0x00007fff96be4d5a -[ABPersistentStoreCoordinatorCache coordinatorForAllSources] + 34
    21  AddressBook                       0x00007fff96be4b25 -[ABAddressBook(ABAddressBook_CoreData_Private) nts_managedObjectContextWithStoreDescription:databasePath:loadFailure:] + 163
    22  AddressBook                       0x00007fff96be43e9 -[ABAddressBook(ABAddressBook_CoreData_Private) managedObjectContext] + 112
    23  AddressBook                       0x00007fff96bdffe3 +[ABAddressBook nts_SharedAddressBook] + 186
    24  AddressBook                       0x00007fff96bdfe8a +[ABAddressBook nts_CreateSharedAddressBook] + 49
    25  AddressBook                       0x00007fff96bdf1d7 +[ABAddressBook sharedAddressBook] + 69
    26  NovaMind5                         0x000000010010e641 +[NMInformationCollector userName] + 49 (NMInformationCollector.m:36)
    27  NovaMind5                         0x000000010010ec29 +[NMInformationCollector systemAndUserInformation] + 937 (NMInformationCollector.m:84)
    28  NovaMind5                         0x000000010004975a -[NMApplication applicationDidFinishLaunching:] + 15802 (NMApplication.m:1476)
    29  CoreFoundation                   0x00007fff935d8eda _CFXNotificationPost + 2554
    30  Foundation                       0x00007fff9897fe26 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
    31  AppKit                           0x00007fff97a1f55d -[NSApplication _postDidFinishNotification] + 292
    32  AppKit                           0x00007fff97a0fc0a -[NSApplication finishLaunching] + 2177
    33  OmniAppKit                       0x00000001008b201e -[OAApplication finishLaunching] + 206 (OAApplication.m:109)
    34  AppKit                           0x00007fff97a0f04a -[NSApplication run] + 124
    35  OmniAppKit                       0x00000001008b20cf -[OAApplication run] + 127 (OAApplication.m:118)
    36  AppKit                           0x00007fff979b3c06 NSApplicationMain + 869
    37  NovaMind5                         0x0000000100001c22 main + 34 (main.m:11)
    38  NovaMind5                         0x0000000100001bf4 start + 52

    TIA

    Gideon
  • I notice the 'indexPlugins' method in your backtrace.  Do you have anything in Library/Address Book Plug-Ins ?

    Sean

    On Mon, 20 May 2013 18:45:39 +1000, Gideon King said:

    > I have address book data access enabled, but when I do a [ABAddressBook
    > sharedAddressBook] in applicationDidFinishLaunching, it generates a
    > series of sandbox deny file-read-data messages.
    >
    > Interestingly, if I then ask it for "me" it returns correct data, so
    > whatever the messages are, it doesn't seem to be stopping it loading at
    > least some of the addresses.
    >
    > I'd like to get rid of the error if possible - any ideas where to look?
    >
    >
    > 0  libsystem_kernel.dylib           0x00007fff93ea5fee __open + 10
    > 1  CarbonCore                       0x00007fff90489f74 PBOpenIteratorSync + 378
    > 2  CarbonCore                       0x00007fff90489de2 FSOpenIterator + 28
    > 3  Foundation                       0x00007fff989cbab3
    > _NSDirectoryContentsFromCarbonError + 130
    > 4  Foundation                       0x00007fff989c9962 -[NSFileManager
    > directoryContentsAtPath:matchingExtension:options:keepExtension:error:] + 315
    > 5  Foundation                       0x00007fff989c9814 -[NSFileManager
    > contentsOfDirectoryAtPath:error:] + 36
    > 6  AddressBook                       0x00007fff96be6716 -
    > [ABDataSourcePluginIndex sourceBundlePaths] + 940
    > 7  AddressBook                       0x00007fff96be6118 -
    > [ABDataSourcePluginIndex indexPlugins] + 94
    > 8  AddressBook                       0x00007fff96be6050 -
    > [ABDataSourcePluginIndex bundleForClassName:] + 37
    > 9  AddressBook                       0x00007fff96be5fce -
    > [ABDataSourcePluginIndex loadBundleForClassName:error:] + 31
    > 10  AddressBook                       0x00007fff96be5e47 +[ABAccountFactory
    > sourceClassForClassName:] + 64
    > 11  AddressBook                       0x00007fff96be5cda -[ABAccountFactory
    > localAccount] + 39
    > 12  AddressBook                       0x00007fff96be5c30 -[ABAccountFactory
    > uncachedAccounts] + 53
    > 13  AddressBook                       0x00007fff96be5a37 -
    > [ABAccountRepository runWithLockLoadingExistingAccountsIfNecessary:] + 259
  • I did, but even after I renamed that folder, I still got the error messages. I tried it on another machine and didn't get any sandbox errors, so maybe it's just something on my machine.

    Regards

    Gideon

    On 22/05/2013, at 3:34 AM, "Sean McBride" <sean...> wrote:

    > I notice the 'indexPlugins' method in your backtrace.  Do you have anything in Library/Address Book Plug-Ins ?
    >
    > Sean
    >
    >
    > On Mon, 20 May 2013 18:45:39 +1000, Gideon King said:
    >
    >> I have address book data access enabled, but when I do a [ABAddressBook
    >> sharedAddressBook] in applicationDidFinishLaunching, it generates a
    >> series of sandbox deny file-read-data messages.
    >>
  • On Wed, 22 May 2013 06:41:05 +1000, Gideon King said:

    > I did, but even after I renamed that folder, I still got the error
    > messages. I tried it on another machine and didn't get any sandbox
    > errors, so maybe it's just something on my machine.

    Did you check all the 'Library's?  In home, root, System, network...

    Cheers,

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
  • I checked /Library, /System/Library and ~/Library. I presume by network you would be referring to some server config, since I don't have a /Network folder but I recall seeing one on another machine I worked on in another place.

    G.

    On 22/05/2013, at 6:43 AM, "Sean McBride" <sean...> wrote:

    >
    > Did you check all the 'Library's?  In home, root, System, network...
    >
previous month may 2013 next month
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Go to today