In-App Purchase error that should be explained: Error Domain=SKErrorDomain Code=0 “Cannot connect to iTunes Store” when I change subscription
| Originator: | s.pankevich | ||
| Number: | rdar://32511567 | Date Originated: | 01-June-2017 17:28 PM |
| Status: | Open | Resolved: | |
| Product: | StoreKit | Product Version: | Xcode Version 8.3.2 (8E2002) |
| Classification: | Serious Bug | Reproducible: | Sometimes |
Area:
StoreKit
Summary:
The subject of this report is the error which happens when testing the purchases in Sandbox environment.
Error Domain=SKErrorDomain Code=0 “Cannot connect to iTunes Store”
I start getting this error if I do some purchases and restorations one the same user created in Sandbox Testers.
I AM logged out of my regular Apple ID when I do testing and most of the time I don't see this error. Then this error starts to happen and I have to create another fresh sandbox tester user to get rid of this error.
There is a bunch of StackOverflow topics complaining about this error and the different sources of its origin:
- Upgrading from one product to another [1]
- Just purchasing a product [2], [3], [4]
- Using inappropriate iTunes ID
All of these links contain different answers which suggest:
- Using appropriate iTunes ID
- Check the implementation according to IAP programming guide
- Reset device!!!
[1] https://stackoverflow.com/questions/42658170/sandbox-iap-returns-error-domain-skerrordomain-code-0-cannot-connect-to-itunes
[2] https://stackoverflow.com/questions/8208195/error-domain-skerrordomain-code-0-cannot-connect-to-itunes-store?rq=1
[3] https://stackoverflow.com/questions/2359739/iphone-store-kit-cannot-connect-to-itunes-store?rq=1
[4] https://discussions.apple.com/thread/5705245?start=0&tstart=0
I know that this code 0 means `.unknown` according to error codes of SKError so this error is probably an umbrella for multiple errors that could be made more specific. When I look at recent to additions to SKError codes like this one:
@available(iOS 10.3, *)
case cloudServiceRevoked // user has revoked permission to use this cloud service
it makes me think that it is doable to specify these error cases that are hinding behind code 0 because as you might see from these and many other links a lot of people suffer from it: they make arbitrary hypotheses, take magical actions like resetting phone etc.
Please take any action because a lot of people want their features based on IAP to be reliable.
Steps to Reproduce:
I am not aware of a guaranteed steps to reproduce this.
I start getting this error if I do some purchases and restorations one the same user created in Sandbox Testers.
Other people report they start getting this error by:
- Upgrading from one product to another
- Just purchasing a product
- Using inappropriate iTunes ID
Expected Results:
I expect StoreKit to explain to me what is going wrong.
Observed Results:
I see StokeKit error with code 0 and it communicates nothing to me.
Version:
Xcode Version 8.3.2 (8E2002)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!