Skip to main content

About ¼ of our users’ attempted subscription purchases on iOS are failing with errorcode 2 (store problem). There are no underlying errors that we can see, but this error message in the logs is present for almost all of them (PID is different each time):

Product purchase for 'pro_plan_quarterly_24' failed with error: systemError(Error Domain=NSCocoaErrorDomain Code=4097 "connection to service with pid 13290 named com.apple.storekitd" UserInfo={NSDebugDescription=connection to service with pid 13290 named com.apple.storekitd})

We’ve found this difficult to reproduce on our own devices. We’ve found that when it does happen, then if we press the button to start the subscription purchase again then it does usually work the second time.

Our integration involves AppsFlyer, Superwall, and Amplitude.

We put in additional logging to try to catch whatever the problem is. Since then we are seeing this happening across iOS 18.3.1 and 18.1.1, but it’s happened on other versions before then.

I’ve read that error 4097 is because of an issue with the StoreKit process (https://stackoverflow.com/a/76824106). Is there a recommended integration pattern for dealing with this?


This same thing happens in my app! Just a few days ago, I don't know how to fix it.


Hi,

In general this is an error with the App Store itself, do you still see the issue happening? And do you know which percentage of users are affected?

 

Best,


Hi all, just adding to ​@joan-cardona’s comment, this is a known StoreKit bug in which the purchase fails because the StoreKit API cannot connect to StoreKit daemon. We have shared this with Apple and they’ve said this will be fixed in an upcoming iOS release, but we don’t have any visibility into which release or when this will happen.


Reply