Cannot connect to iTunes Store Code 0

I am trying to test something in IAP Sandbox with both old and new sand box accounts. For sandbox accounts created before Oct. 4, 2018, everything works and I am able to complete my purchase. However, new accounts I've created after October 4th do not work and return the error "Cannot connect to iTunes Store (code 0)" (or something like that). Here are the steps I have taken when testing with the new accounts:


1) Set up new sandbox account in ItunesConnect

2) Vefified email.

3) On device, "signed out" of itunes. Most definitely DID NOT try to sign back in with sandbox account credentials

4) Launched app, initiated subscription purchase trigger.

5) Presented with "Sign In" dialog with two choices: "Use Existing Account" and "Cancel".

6) Chose "Use Existing Account".

7) Entered sandbox account email and password from step 1.

8) Purchase fails with "Cannot connect to iTunes Store 0"


I have tried this with several new sandbox accounts, all with the same results. The Apple Developer Status page says the sanbox is working.


Am I doing something wrong? Is anyone else experiencing this?

Replies

The following is a response which I posted to <https://forums.developer.apple.com/thread/98763>


I've finally replicated the issue by taking a hint post above by seansy. I created a new test user account. Then I attempted the in-app purchase and it failed when I used the new test user account. Since I was using iOS 12 on my iPhone, i also found that when I entered the Settings app -> iTunes & App Store -> Sandbox Acct setting

and entered my new test user account credentials, the test user field remained blank. When I entered a test user account which I'd been using for a while, the test user field was updated. I captured the console log for both cases and observed a "failure to authenticate" error prior to the call to the updatedTransactions method.


I've submitted bug report rdar://45059292to document this problem.


For those that are experiencing this problem. If you have iOS 12, are you able to replicate the problem in the Settings app.


As a workaround suggestion, if you can submit a TestFlight build so that you can use your existing iTunes accounts(created before Sept '18) in sandbox mode, I would expect that things will work. If not, this would be another bug report issue.


rich kubota - rkubota@apple.com

developer technical support CoreOS/Hardware/MFI

Hi Rich,


I'm experiencing the exact same problem. The old sandbox account works, but new ones can't connect. This is really problematic as we can't test our app anymore.


When do you expect this to be resolved? Is there a way to be notified when it's fixed?


Many Thanks,

Houman