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

I see that this issue is under investigation.


rich kubota - rkubota@apple.com


developer technical support CoreOS/Hardware/MFI

I am also having the same issue.

Still having the problem.


Same issue at another big thread:

https://forums.developer.apple.com/thread/109370

Neilc's advice worked for me: https://forums.developer.apple.com/thread/90594#273543

Just adding sandbox tester from AppStoreConnect was ok.

'Please check your Apple ID. 'Will be delivered but I did not do anything OK.

I was able to purchase receipts and purchase as well.

Facing the same issue. I am Requesting for Products, but every time "didFailWithError" called and giving me error "Cannot connect to iTunes Store".

I am not even making any purchases; just trying to request products brings me to request(_ request: SKRequest, didFailWithError error: Error) with Error Domain=SSErrorDomain Code=2 "Cannot connect to iTunes Store"


Xcode10, Apple TV $K Simulator

Sorry for the delayed response - if the SKProductsRequest is failing, this would appear to be a bug report issue. However, the first thing I'd do is collect a console log from the Apple TV with the StoreKit profile active. I'd then include the console log with the bug report. Here's the instructions for doing so.


To install the StoreKit profile onto the Apple TV please follow these instructions


1. On your macOS system (10.12 or later) open Safari and navigate to the Developer Bug Reporting - Profiles and Logs web page

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

2. Download the “App Store/iTunes Store for iOS” profile. You will see the file “itmsdebugging-2.mobileconfig” in your Downloads folder.

3. Enable Remote debugging with the Apple TV with your macOS system (see below if you aren't familiar with this step)

3a. Open the Settings app on the Apple TV - Remotes and Devices -> Remote Apps and Devices

3b. On the macOS system, launch Xcode -> Window menu -> Devices and Simulators. Select the Apple TV and follow the instructions to connect with the device.

4. On the macOS system, launch the “Apple Configurator 2” application. You can install the Apple Configurator 2 app from the Mac App Store.

Within Apple Configurator 2, select the Apple TV, then click on the “Profiles” item on the left column.

Navigate to the “itmsdebugging-2.mobileconfig” file and select it.

5. Go to the Apple TV and enable the installation of the profile - After the install is complete, restart the Apple TV.


To access the Console from the Apple TV, open the Apple Configurator 2 app, select the Apple TV and click on the “Console” item on the left side.

Clear the console log, then start your application.


6. When the issue occurs, save the contents of the Console log

Check the contents of the console log for the string “fetchSoftwareAddOns”. If this string is not present in the log, the profile was not active. Please re-install the StoreKit profile and make sure to restart the device.


Instructions to enable Wireless Debugging

Requirements - Xcode 9.0 or later on macOS 10.12.4 or later

Requires tvOS 11.0 or later

Both the macOS system and the tvOS device must be connected to the same WiFi network


To set up the Apple TV

1. Launch Xcode - choose Windows -> Devices and Simulators, then select the Devices item

2. On the Apple TV, open the Settings app and choose Remotes and Devices -> Remote App and Devices. The Apple TV searches for

available devices to connect with.

3. On the Mac, select the Apple TV in the Devices pane. The Apple TV pane is displayed with the current status of the connection request.

4. On the Apple TV, note the verification code, and enter the code in the Apple TV pane on Xcode. Then click connect.


Xcode will set up the Apple TV for wireless debugging.


Submitting a Bug Report

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 Product “Other”.


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

Please include the console log contents


By following these instructions, the Bug Report team will be able to expedite the assignment of the bug report to the iTunesConnect Support team.

I know it's an old thread, but this hint got me out of the problem: thank you!


I was beta-testing in TestFlight and my InApp purchase was asking twice for password and then displaying the dreaded "Cannot connect to iTunes Store" message.


With iOS 12, I went to Settings > Screen Time > Turn On Screen Time

And then enabled "Content and Privacy Restrictions"


This did it!

This seems to still be an issue. Has the bug been fixed (cannot seem to access the bug report)?


Reported this as a bug/feedback: FB6473089

Thread:

https://forums.developer.apple.com/message/369498#369498

Same issue for us. Do you know how you resolved this?

A year and a half later and this critical bug is still not fixed! Thank you for this workaround!

Its now April 2020, using iOS 13.3 and this issue isn't resolved.I'm totally unable to complete a purchase in the sandbox, "Cannot connect to iTunes store" error all the time. This is for an existing app in the app store, need to add some new features and overhaul to it, but am totally blocked with this problem.


Anybody else still encountering this issue and have any work arounds that work?

Same here

For me it only works on physical devices. If I run the app on a simulator, I see the error message "Cannot connect to iTunes Store" as well.