storeaccountd(453) deny file-write-create

Since upgrading to El Capitan, my Mac app which includes an In-App Purchase is failing to process the In-App Purchase. This is the error that I see in the console:


storeaccountd(453) deny file-write-create /Users/kenny/Library/Caches/com.inadaydevelopment.mac10biiFinancialCalculator

When the user clicks to purchase, they get the App Store login pop-up, and they get the In-App Purchase confirm pop-up with a Buy button. When they click Buy, that Buy confirmation pops up a 2nd time. Then I get the above error message in the console about 15 times. Then I get a final popup that says "An unknown error has occured" with Retry and Cancel buttons.

This app has been working, but once the user upgrades to El Capitan, it horks. What is going wrong?

Here is the full error report from the console:

storeaccountd(453) deny file-write-create /Users/kenny/Library/Caches/com.inadaydevelopment.mac10biiFinancialCalculator



Process: storeaccountd [453]

Path: /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Resources/storeaccountd

Load Address: 0x108432000

Identifier: storeaccountd

Version: ??? (???)

Code Type: x86_64 (Native)

Parent Process: launchd [1]



Date/Time: 2015-11-17 17:44:11.750 -0800

OS Version: Mac OS X 10.11.1 (15B42)

Report Version: 8



Thread 0:

0 libsystem_kernel.dylib 0x00007fff87e57c96 mach_msg_trap + 10

1 CoreFoundation 0x00007fff8dd5f2b4 __CFRunLoopServiceMachPort + 212

2 CoreFoundation 0x00007fff8dd5e77c __CFRunLoopRun + 1356

3 CoreFoundation 0x00007fff8dd5dfc8 CFRunLoopRunSpecific + 296

4 CoreFoundation 0x00007fff8dd9f961 CFRunLoopRun + 97

5 storeaccountd 0x0000000108439a99

6 libdyld.dylib 0x00007fff8f8215ad start + 1



Thread 1:

0 libsystem_kernel.dylib 0x00007fff87e5e0a2 kevent_qos + 10

1 libdispatch.dylib 0x00007fff99400d85 _dispatch_autorelease_pool_pop + 0



Thread 2:

0 libsystem_kernel.dylib 0x00007fff87e57c96 mach_msg_trap + 10

1 CoreFoundation 0x00007fff8dd5f2b4 __CFRunLoopServiceMachPort + 212

2 CoreFoundation 0x00007fff8dd5e77c __CFRunLoopRun + 1356

3 CoreFoundation 0x00007fff8dd5dfc8 CFRunLoopRunSpecific + 296

4 CFNetwork 0x00007fff91efbd6d +[NSURLConnection(Loader) _resourceLoadLoop:] + 412

5 Foundation 0x00007fff92f42ee4 __NSThread__start__ + 1351

6 libsystem_pthread.dylib 0x00007fff951ce9b1 _pthread_body + 131

7 libsystem_pthread.dylib 0x00007fff951ce92e _pthread_body + 0

8 libsystem_pthread.dylib 0x00007fff951cc385 thread_start + 13



Thread 3:

0 libsystem_kernel.dylib 0x00007fff87e5d78a __workq_kernreturn + 10

1 libsystem_pthread.dylib 0x00007fff951cc375 start_wqthread + 13



Thread 4:

0 libsystem_kernel.dylib 0x00007fff87e5d222 __select + 10

1 libsystem_pthread.dylib 0x00007fff951ce9b1 _pthread_body + 131

2 libsystem_pthread.dylib 0x00007fff951ce92e _pthread_body + 0

3 libsystem_pthread.dylib 0x00007fff951cc385 thread_start + 13



Thread 5:

0 libsystem_kernel.dylib 0x00007fff87e57cd2 semaphore_wait_trap + 10

1 libdispatch.dylib 0x00007fff99409a19 _dispatch_barrier_sync_f_slow + 594

2 storeaccountd 0x0000000108436d1a

3 storeaccountd 0x000000010843c77b

4 libdispatch.dylib 0x00007fff994068f5 _dispatch_call_block_and_release + 12

5 libdispatch.dylib 0x00007fff993fb3c3 _dispatch_client_callout + 8

6 libdispatch.dylib 0x00007fff9940dbd6 _dispatch_async_redirect_invoke + 1733

7 libdispatch.dylib 0x00007fff993fb3c3 _dispatch_client_callout + 8

8 libdispatch.dylib 0x00007fff993ff253 _dispatch_root_queue_drain + 1890

9 libdispatch.dylib 0x00007fff993feab8 _dispatch_worker_thread3 + 91

10 libsystem_pthread.dylib 0x00007fff951ce4f2 _pthread_wqthread + 1129

11 libsystem_pthread.dylib 0x00007fff951cc375 start_wqthread + 13



Thread 6:

0 libsystem_kernel.dylib 0x00007fff87e5e1f2 mkdir + 10

1 Foundation 0x00007fff92f38212 -[NSFileManager createDirectoryAtPath:withIntermediateDirectories:attributes:error:] + 286

2 StoreFoundation 0x00007fff928c90e9 +[NSFileManager(ISAdditions) ensureDirectoryExists:] + 292

3 storeaccountd 0x0000000108437d8e

4 storeaccountd 0x0000000108437ff2

5 libdispatch.dylib 0x00007fff993fb3c3 _dispatch_client_callout + 8

6 libdispatch.dylib 0x00007fff993fc9aa _dispatch_barrier_sync_f_invoke + 74

7 storeaccountd 0x0000000108437677

8 storeaccountd 0x0000000108437074

9 storeaccountd 0x0000000108439510

10 StoreFoundation 0x00007fff928d4bde -[ISURLOperation _sendOutputToDelegate:] + 101

11 StoreFoundation 0x00007fff928d1b5d -[ISURLOperation _handleFinishedLoading] + 937

12 CFNetwork 0x00007fff91f21851 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 69

13 CFNetwork 0x00007fff91f21766 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 233

14 CFNetwork 0x00007fff91f2166b -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 48

15 CFNetwork 0x00007fff91f26492 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 104

16 CFNetwork 0x00007fff920ba977 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 100

17 libdispatch.dylib 0x00007fff993fb3c3 _dispatch_client_callout + 8

18 libdispatch.dylib 0x00007fff994090be _dispatch_block_invoke + 474

19 CFNetwork 0x00007fff91f21528 RunloopBlockContext::_invoke_block(void const*, void*) + 24

20 CoreFoundation 0x00007fff8dd21e64 CFArrayApplyFunction + 68

21 CFNetwork 0x00007fff91f21421 RunloopBlockContext::perform() + 137

22 CFNetwork 0x00007fff91f212c2 MultiplexerSource::perform() + 282

23 CFNetwork 0x00007fff91f210e4 MultiplexerSource::_perform(void*) + 72

24 CoreFoundation 0x00007fff8dd7f8b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17

25 CoreFoundation 0x00007fff8dd5f0ac __CFRunLoopDoSources0 + 556

26 CoreFoundation 0x00007fff8dd5e5cf __CFRunLoopRun + 927

27 CoreFoundation 0x00007fff8dd5dfc8 CFRunLoopRunSpecific + 296

28 StoreFoundation 0x00007fff928cb771 -[ISOperation runRunLoopUntilStopped] + 46

29 StoreFoundation 0x00007fff928d463d -[ISURLOperation _runWithURL:] + 436

30 StoreFoundation 0x00007fff928d4410 -[ISURLOperation _run] + 234

31 StoreFoundation 0x00007fff928d092e -[ISURLOperation run] + 238

32 StoreFoundation 0x00007fff928b73b1 -[ISStoreURLOperation _runURLOperation] + 2707

33 StoreFoundation 0x00007fff928b5e37 -[ISStoreURLOperation run] + 354

34 StoreFoundation 0x00007fff928cc0d5 -[ISOperation _main:] + 426

35 StoreFoundation 0x00007fff928cbc03 -[ISOperation main] + 547

36 StoreFoundation 0x00007fff928cb861 -[ISOperation runSubOperation:returningError:] + 209

37 storeaccountd 0x0000000108438e56

38 StoreFoundation 0x00007fff928cc0d5 -[ISOperation _main:] + 426

39 StoreFoundation 0x00007fff928cbc03 -[ISOperation main] + 547

40 StoreFoundation 0x00007fff928cb861 -[ISOperation runSubOperation:returningError:] + 209

41 StoreFoundation 0x00007fff928cb729 -[ISOperation runSyncReturningError:] + 124

42 storeaccountd 0x0000000108436e96

43 libdispatch.dylib 0x00007fff993fb3c3 _dispatch_client_callout + 8

44 libdispatch.dylib 0x00007fff993fc9aa _dispatch_barrier_sync_f_invoke + 74

45 storeaccountd 0x0000000108436d1a

46 storeaccountd 0x000000010843c77b

47 libdispatch.dylib 0x00007fff994068f5 _dispatch_call_block_and_release + 12

48 libdispatch.dylib 0x00007fff993fb3c3 _dispatch_client_callout + 8

49 libdispatch.dylib 0x00007fff9940dbd6 _dispatch_async_redirect_invoke + 1733

50 libdispatch.dylib 0x00007fff993fb3c3 _dispatch_client_callout + 8

51 libdispatch.dylib 0x00007fff993ff253 _dispatch_root_queue_drain + 1890

52 libdispatch.dylib 0x00007fff993feab8 _dispatch_worker_thread3 + 91

53 libsystem_pthread.dylib 0x00007fff951ce4f2 _pthread_wqthread + 1129

54 libsystem_pthread.dylib 0x00007fff951cc375 start_wqthread + 13



Thread 7:

0 libsystem_kernel.dylib 0x00007fff87e5d78a __workq_kernreturn + 10

1 libsystem_pthread.dylib 0x00007fff951cc375 start_wqthread + 13



Thread 8:

0 libsystem_kernel.dylib 0x00007fff87e5d78a __workq_kernreturn + 10

1 libsystem_pthread.dylib 0x00007fff951cc375 start_wqthread + 13



Thread 9:

0 libsystem_kernel.dylib 0x00007fff87e5d78a __workq_kernreturn + 10

1 libsystem_pthread.dylib 0x00007fff951cc375 start_wqthread + 13



Binary Images:

0x108432000 - 0x1084b3ff7 storeaccountd (453.1) <44e44bb6-89e6-3c27-ab8f-c4270e9eb93a> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Resources/storeaccountd

0x7fff87e46000 - 0x7fff87e64fff libsystem_kernel.dylib (3247.10.11) <fa4dcf42-27b0-3878-9158-e148d208b21e> /usr/lib/system/libsystem_kernel.dylib

0x7fff8dcd5000 - 0x7fff8e14aff7 com.apple.CoreFoundation (6.9 - 1255.1) <86b26482-c917-34f2-80d8-02911b6001e0> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

0x7fff8f81e000 - 0x7fff8f821ffb libdyld.dylib (360.17) <99396189-e53a-3a78-bc49-449236da7cff> /usr/lib/system/libdyld.dylib

0x7fff91ef3000 - 0x7fff9217aff3 com.apple.CFNetwork (760.1.2 - 760.1.2) <d4fd8df6-8481-3be6-9e93-a3268b16774e> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork

0x7fff928ab000 - 0x7fff92911ff7 com.apple.StoreFoundation (1.0 - 453.1) <f92b8382-6ef1-3948-aec5-b7d2ef1e4f39> /System/Library/PrivateFrameworks/StoreFoundation.framework/Versions/A/StoreFoundation

0x7fff92f0d000 - 0x7fff93261fff com.apple.Foundation (6.9 - 1255.1) <3ad7b198-3943-3919-b6f2-b0c28dc817b1> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation

0x7fff951cb000 - 0x7fff951d4ff7 libsystem_pthread.dylib (137.1.1) <1373d0f1-c6ca-364e-a6ba-8bdbd0d34670> /usr/lib/system/libsystem_pthread.dylib

0x7fff993f9000 - 0x7fff99426fff libdispatch.dylib (500.10.1) <438f4595-0731-34a2-acad-60121a76d1ff> /usr/lib/system/libdispatch.dylib

Replies

That's a sandbox violation. These will be logged by a process that tries to write to a file system location it hasn't been granted access to. Your app is not at fault here—this is a malfunction within the App Store system. If you haven't already, you should totally upload that printout in a bug report. Here's the link:

bugreport.apple.com

Thanks, Bob. I've filed a Bug.

I'm having the same issue. Have you found a solution? Thanks

Have you also filed a bug? It will almost certainly get closed as a duplicate, but they do pay attention to the amount of duplicates being filed as a measure of how severe or widespread a bug is.

No I didn't. I don't see the point. IAP purchase is a very basic feature and it must work. Certainly I don't want to wait months to get it fixed.

It seems to me that there is a different approch or a workaround available, otherwise it would have been fixed long time ago.

You really should file a bug report. After all, not reporting it does not cause it to go away!

Any update on this? Any workaround? I added In App Purchase to my app, and now I have unhappy and confused customers, when their purchase has mysterious errors.


Filed Radar #25026891.

Update: the issue I had turned out to be unrelated to this. As far as I can tell, the 'deny file-write-create' issue seems to be cosmetic.

I'm having the same problem and trying to figure out the reason. Do you mind sharing what you had and how you solved it?

Any follow up on the issues mentioned above? I am experiencing the same behaviour with the macOS App I just launched that has a non-consumable in-app purchase:


I see multiple lines of these:


sandboxd: ([501]) storeaccountd(501) deny file-write-create /Users/me/Library/Caches/com.my.App
...
kernel: Sandbox: storeaccountd(468) deny(1) file-write-create /Users/me/Library/Caches/com.my.App


And


storeinappd: LoadCompletedMicroPaymentsOperation: Could not install receipt after fetching completed purchases - Error Domain=ISErrorDomain Code=2  “No Receipt.” UserInfo={NSLocalizedDescription=No receipt., NSLocalizedFailureReason=receiptAsString was nil}


Finally the SKPaymentTransactionObserver will log that the cannot be restored with an 'Unknown Error.":


    public func paymentQueue(_ queue: SKPaymentQueue, restoreCompletedTransactionsFailedWithError error: Error) {
        DDLogError("Could not restore purchases (\(error.localizedDescription))")
    }


My app has the in-app purchases entitlement and I don't understand why it would try to write to the Library/Caches?


Any way to solve this?


Radar: 30856402