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.

Thanks Rich.
Can you give us any guidance on going through the review process? We have a live app in the store right now that we are adding In-App Purchases functionality with next release. Our app is rejected due to this issue. Apple review team is not able to test it as their sandbox account is experiencing the same issue. we are stuck.
Thanks in advance

I have the same issue in iOS 11.

I have the same issue on iOS 11 & 12

Thank you


Unfortunately, I'm experiencing this issue.


I was able to test the In-App Purchase in sandbox with an old account using TestFlight as you suggested, but it simply does not work with recently created sandbox accounts.


The app keeps being rejected due to this.

Lukos86


App Review should not be seeing this issue as they are using older accounts. If AR is rejecting the app something else is the issue.


rich kubota - rkubota@apple.com


developer technical support CoreOS/Hardware/MFI

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

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.

This is because the In app purchase only work on real devices like: camera, and previous xcode 11.4, the push notifications (from xcode 11.4 you can work with push notifications on simulators).

This just started today for me as well. IAP sandbox (on real devices) was working this past weekend and have made no changes since to my IAP protocols. Appears to be an iTunes sandbox server issue?

Same for us right now,

responseCode: '0',

code: 'E_UNKNOWN',

Tried different countries' VPN

This is happening to me too.. I need a fix. I've submitted my app 4 times, and it keeps getting rejected.

This is happeninng to me.

It's using iOS 13.4, all of result are "Cannot connect to iTunes store" error (Error code: 0, 2, -2002).

But it works well in the last year.


I also figure out that Consumables, Non-consumables and Non-renewing subscriptions work well.

But it's always failed when Auto-renewable subscriptions.



Does any have any idea for this?

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