In app purchase “Cannot connect to iTunes Store” error for Sandbox user

We're using sandbox for testing auto renewing IAP but most of the time it's returning error saying 'Cannot connect to iTunes store'.


We've followed steps mentioned in following document : https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/ShowUI.html#//apple_ref/doc/uid/TP40008267-CH3-SW11


The System Status for iTunes Sandbox is showing Green (good) right now, but it still doesn't work for me.

Replies

Same for me. My code was working fine and now my SKProductsRequest is failing every time at didFailWithError, with error code 1001, which seems to indicate a time out issue. I haven't changed any of the code since it was last working, so I'm guessing and hoping its an Apple issue.

Yup, it's been that way for almost a week on my side. I checked on the adhoc version of the build that's currently on the appstore, same behavior. Live users are able to purchase stuff, so it's definitely a sandbox issue.


No idea what iTunes team is doing, but they sure are taking their sweet time fixing it.

Same here. This has been failing sporadically for months, sometimes works fine without issue, other times I just can't do any testing and have to just wait for it to start working again. Given how many Apps use InApp purchases you'd think this would work more reliably.

Same here. And we've got our app rejected because of this

To help get attention on this matter, please submit a bug report. Once you've submitted the bug report please send me the bug report number so that I can forward them to iTunes Server engineering. My direct email address is "rkubota@apple.com". If you've already submitted the bug report, please send me the bug report number.


To submit a bug report on this issue, iTunes engineering has requested the following.


First install the StoreKit and sysdiagnose profiles

Install StoreKit profile to an iOS 11+ device

Please login to the Apple Developer Bug Report - Profiles and Logs website

<https://developer.apple.com/bug-reporting/profiles-and-logs/>

Click the “Profile” URL associated with the “App Store/iTunes Store for iOS” item. You will download the “itmsdebugging.mobileconfig” file.

Click the “Profile” URL associated with the "sysdiagnose for iOS" item.

Read the instructions for triggering the sysdiagnose profile. Note where to find the sysdiagnose archive once you've sync'd the device with iTunes.

IMPORTANT - PLEASE RESTART THE DEVICE


CAPTURE THE DEVICE CONSOLE LOG - connect the device to a macOS X Sierra (or newer) system (macOS X 10.12.x)

1. Launch the Console app and select the device in the left side of the Console window

2. Before starting the iOS app, click “Clear”.

3. Start the application and perform the steps to replicate the problem.

4. When the issue occurs, trigger the sysdiagnose archive. Note the time of the event.

5. save the contents of the Console log. Please verify that the string “fetchSoftwareAddOns” appears in the console log. If this string does not appear, then the profile was either not installed properly or the device was not restarted after the install to the device.

6. Wait 5 minutes after triggering the sysdiagnose archive, then sync the device with iTunes.

7. When the sync is finished, navigate to the location of the sysdiagnose logs


To submit a bug report for investigation by iTunesConnect, please use the Apple Developer Bug Report web page - http://bugreport.apple.com.


After logging in, select the “Other” Product.


Fill out the bug report form. In the description section -

make sure to include the application ID

add the in app purchase identifiers which are failing

attach the console log as well as the sysdiagnose archive which you captured.

Indicate whether the problem is with the sandbox or production version of the app.

Describe what sequence of StoreKit API calls were made.

Note the time of the failure in the description.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

38663960 Has been marked dupe of 38616853

Going to settings and enabling restrictions, then disabling restrictions got sandbox InApp purchases working for me again!!

Going to settings and enabling restrictions, then disabling restrictions got sandbox InApp purchases working for me again!!

We’ve submitted bug report 38674215 Thanks

I can confirm this fixes the issue. This is really frustrating. We've submitted the app for review again and wrote the review team a note about the bug..

This only temporarily fixes it for me, it reverts back to failing after one or two purchases and have to do it again to get it working again.

Thank you for everyone who has submitted bug reports and forwarded the bug reports to me. I'm aware that we are investigating this issue.


For anyone who has not submitted a bug report, I would urge you to submit a bug report, to indicate you are affected and that the problem persists. As evidence, please open the Terminal app and ping the sandbox server. Capture the results and paste them into the bug report.


user$ ping -c 5 sandbox.itunes.apple.com


To submit a bug report for investigation by iTunesConnect, please use the Apple Developer Bug Report web page - http://bugreport.apple.com.

After logging in, select the “Other” Product.

Fill out the bug report form. In the description section -

make sure to include the application ID

add the in app purchase identifiers which are failing

paste the results of the ping commandline.


Please send the bug report to me at "rkubota@apple.com"


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

My bug report has been closed as dupe, so in case this is of use:


ping -c 5 sandbox.itunes.apple.com

PING sandbox.itunes-apple.com.akadns.net (17.154.66.159): 56 data bytes

Request timeout for icmp_seq 0

Request timeout for icmp_seq 1

Request timeout for icmp_seq 2

Request timeout for icmp_seq 3

Has this been resolved . its been over 3 weeks since this has been broken. I am not sure how others are getting to workaround this

What restrictions are you enabling/disabling? Where are these under settings?