SKProductsRequest fails with SKErrorDomain error 0

I have an app with in-app purchases, where a small number of users report they are unable to download previously purchased iap's.


It looks like the app is unable to communicate with the app store, but there definitely have a working internet connection. Logs returned from these users show that SKProductsRequest is failing with

error.localizedDescription = The operation couldn’t be completed. (SKErrorDomain error 0.)

error.code = 0

error.domain = SKErrorDomain


Have tried getting users to reboot all the hardware at the their location, re-installing the app, signing out of iTunes. The problem is persistent for these users.


Anyone seen this? Any ideas?

If there are no response, this issue is the type that I help diagnose as a DTS incident. I've seen this error occurring once where there was the error message -

Tue 07/07 02:21 itunesstored[100]: Property list invalid for format: 200 (property lists cannot contain objects of type ‘CFURL’)

In your case, this is an issue only with a select group, so the above would not appear to be the issue.

If there is a valid network connection, the SKProductsRequest should work and return the identifiers in the response.products array, or in the invalidProducts array.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

We were unable to reproduce the problem here and other users seem to be getting the IAP's just fine.


The user reported they had the app installed and the iap downloaded on iOS 8.3. They then deleted the IAP to free space for the 8.4 upgrade. After the 8.4 upgrade, they are getting this issue.


We get a log back from the user, showing what happnes in the purchase process. The app does this on startup


SKProductsRequest *productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:pIdents]];

productsRequest.delegate = self;

[productsRequest start];


after 10 sec or so delegate request:didFailWithError: is called where


request is SKProductsRequest,

error.localizedDescription=SKErrorDomain error 0.

error.code=0

error.domain=SKErrorDomain


productsRequest:didReceiveResponse: is never called.


The user says that have network connectivity, and they did sucessfully delete and reinstall the app, so I guess that means that have some sort of connectivity to the store. They also say that they can get IAP's for other apps they have.

One other odd thing I noticed in the user's logs, since I posted, is that the app receipt present, but not valid. On startup we check the receipt signature and GUID hash. These checks fail, but we don't report which test failed. Would a broken receipt cause the products request to fail?

May I ask why this user is attempting a repurchase (for free) rather than a restoreCompletedTransaction? In a restore there is no SKProductsRequest.

because the list of Product to restore is built from the results of the product request

Actually it is not. When the user wishes to restore their previous purchases all they do is cause the code to execute a restoreCompletedTransactions and all of their non-consumable IAPs and autorenewable subscriptions are transmitted to them as transactions in a call to updatedTransactions. No need to specify specific products to restore.

PBK, thanks for your input, but I think you've misunderstood the question, which is why is the products request failing for this user?

You wrote "One other odd thing I noticed in the user's logs, since I posted, is that the app receipt present, but not valid. On startup we check the receipt signature and GUID hash. These checks fail...."


There is a lot more wrong with this user than a call to "request:didFailWithError:"


But again, you should reconsider the logic of your IAP - restoreCompletedTransactions does not require a list of products. The issue starts out with 'user cannot restore purchases' but the problem become 'user can't get list of products available' - that has nothing to do with restoring purchases; IMHO.

The IAP's have very large downloaded content, so we let the users pick them individually.

I have a couple of users reporting the same problem as of late. They're neither able to make purchases nor restore purchases. The error they're getting is "SKErrorDomain error 0". In one case the user has two devices, on one everything works fine but not on the other, both devices are on iOS 8.4 and the same version of my app. I'm wondering if it's related to iOS 8.4 since this problem never showed up until now.


My app has been out for a couple of years. I haven't changed the IAP code for several months, so I don't think it's a bug in my IAP code. Also we have thousands of users who've made purchases with no issues within this same time frame.

I've opened a DTS case on this. Working theory (with limited real evidence) is someting got borked during the 8.4 upgrade.


Basically the same problem here. Last app update was pre-8.4. IAP works fine for almost all users. One user, reports works on iPhone, but not iPad.


DTS were wanting to to load a special profile and recover the log from the user. I have users willing to do this, but they don't have Macs. If you have anyone with this problem and a Mac that would be willing to install Xcode on the Mac, a profile on the device and then use Xcode to recover the log for DTS, email me at jdm (at) urbeco.net and I'll cc you into the convo with DTS.

Any news?


I have a simliar issue. Started to develop a new app and created a IAP yesterday. Everytime I try to query the products in a development build

            let productsRequest = SKProductsRequest(productIdentifiers: productIdentifiers)
            productsRequest.delegate = self
            productsRequest.start()


I get the error in the request:didFailWithError: method:


Error Domain=SSErrorDomain Code=0 "Failed to Connect to iTunes"

There are many reasons why you could get no valid products. Check out TN2413:

https://developer.apple.com/library/ios/technotes/tn2413/_index.html#//apple_ref/doc/uid/DTS40016228-CH1-TROUBLESHOOTING-WHY_ARE_MY_PRODUCT_IDENTIFIERS_BEING_RETURNED_IN_THE_INVALIDPRODUCTIDENTIFIERS_ARRAY_


and be sure to delete old builds of your app and log out of the app store before reinstalling from Xcode.

Thx PBK, I know TN2413. I spend the whole day to check, fix and do it again. But it didn't worked and this is why I was asking baia for the state of his DTS.

No resolution yet. DTS person speculated that it was an 8.4 upgrade problem and to try a restore with iTunes. If I get to the bottom of this I'll post it here.

For those who are reporting ths issue, I've been working with one developer to track this issue, but there is very little data so far. What we need are more console logs taken with the StoreKit profile active. I'm limited to distributing this profile except as part of a DTS incident. It sounds to me as if this problem affects a very small number of users - but certainly enough to stir users to submit poor reviews.


If you submit a DTS incident, it will come to me for handling and I can provide the profile, which will assist with capturing data. I've seen reports that backing up the system and reinstalling iOS has worked in limited cases. In one case deleting the app and reinstalling from the Store fixed the issue - but not in all cases. If I do hear of an explanation, I'll post it to the forum.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

SKProductsRequest fails with SKErrorDomain error 0
 
 
Q