chirag04 / react-native-in-app-utils

A react-native wrapper for handling in-app payments
MIT License
890 stars 185 forks source link

Cannot connect to iTunes Store #117

Open anshul-kai opened 7 years ago

anshul-kai commented 7 years ago

Lately I've started receiving a few of the following errors and I'm wondering if I'm losing sales or whether these are just different examples of the user cancelling the purchase or not entering a valid iTunes password.

{ code: 'ENSURLERRORDOMAIN-999',
  userInfo:
   { NSErrorFailingURLKey: null,
     NSLocalizedDescription: 'Cannot connect to iTunes Store',
     NSErrorFailingURLStringKey: 'https://p45-buy.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy' },
  message: 'Cannot connect to iTunes Store',
  domain: 'NSURLErrorDomain' }
{ code: 'ESKERRORDOMAIN0',
  userInfo: { NSLocalizedDescription: 'Cannot connect to iTunes Store' },
  message: 'Cannot connect to iTunes Store',
  domain: 'SKErrorDomain' }
brianomchugh commented 7 years ago

I have not seen ENSURLERRORDOMAIN-999 yet, but I definitely get ESKERRORDOMAIN0 when a user cancels (and also when a user tries to repurchase something they already own). I ended up having to ignore all errors in my code since it was impossible to figure out what happened from code/message.

anshul-kai commented 7 years ago

Thanks @brianomchugh. Is there any documentation of all these codes? I couldn't find them anywhere.

brianomchugh commented 7 years ago

@a-koka Not sure, but check out #15

superandrew213 commented 6 years ago

@a-koka where you able to figure out if this error is happening in production too or just for dev/sandbox users?

anshul-kai commented 6 years ago

I should have mentioned. I got the above errors from my production server. I send them over to the server when a device throws a strange error. I haven't seen many of these recently though.

talalmajali commented 6 years ago

@a-koka, we're facing a similar thing, where users do have receipts from Apple, but nothing gets fired to our server(the callback of purchasing is not being invoked). But we don't know where the problem is, could you tell us how you 'send them over to the server when a device throws a strange error" ?

anshul-kai commented 6 years ago

I'm catching all unsuccessful attempts whether inside a catch or or invalid status codes and then sending them to the server via a custom logError API.

The good news is that I haven't seen any such errors in the past 2 months so maybe things were fixed in a recent version.

hugoh59 commented 6 years ago

I'm suddenly going through the same issue even tho it workes well before and I havent changed anything.

kawashimaken commented 6 years ago

I tested my app, and have the same issue now, it worked fine before.

HermitCarb commented 6 years ago

Same issue too.

image

But strangely, after I changed a Store account, it worked. 🤷‍♂️ I am going to check the OC code. 😔

kawashimaken commented 6 years ago

I also find out today, my sandbox user can purchase, however my TestFlight version still shown "can not connect to iTunes Store" , purchase failed....