Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing renewable subscription in iOS In-app purchase triggers “Cannot connect to iTunes Store” error #803

Closed
grubstarstar opened this issue Oct 23, 2019 · 12 comments
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS 🚶🏻 stale Stale

Comments

@grubstarstar
Copy link

grubstarstar commented Oct 23, 2019

I have multiple renewable subscriptions set up for my App in App Store Connect.

Screen Shot 2019-10-23 at 11 36 05 am

There are a handful of renewable subscriptions which are all part of the same subscription group, plus one which is a non-renewable subscription.

I am using a sandbox user account as created under "Users and Access" > "Sandbox" > "Testers" logged in as a sandbox user on the iPhone. I am logged in as that user on the iPhone under "iTunes & App Stores" > "SANDBOX ACCOUNT".

I can successfully fetch the subscriptions using 'RNIap.getSubscriptions()' and display them in the UI. I can then successfully trigger a purchase of a subscription using RNIap.requestSubscription(productId, false) after which my registered RNIap.purchaseUpdatedListener handler correctly fires, and I finish the transaction using RNIap.finishTransactionIOS(purchase.transactionId). So far, so good.

The problem arises when I try to make subsequent changes to the renewable subscription, by following the same process with one of the other subscriptions. I get a pop-up asking whether I want to confirm the modification to the new subscription, as expected, followed by "You're all set, Your purchase was successful". But I when this happens it actually calls the RNIap.purchaseErrorListener event handler, rather than the RNIap.purchaseUpdatedListener as expected.

The error message I get from the handler is:

{
	responseCode: "0",
	code: "E_UNKNOWN",
	debugMessage: "Cannot connect to iTunes Store",
	message: "Cannot connect to iTunes Store"
}

Which originates from the StoreKit api itself when transaction.transactionState is equal to SKPaymentTransactionStateFailed.

If I then ettempt to buy thnon-renewable subscription (1 Week in the above example) the purchase is successful, triggering the RNIap.purchaseUpdatedListener as expected. But whenever I try to change the subscription to another renewable subscription again the RNIap.purchaseErrorListener handler is triggered.

@adelrodriguez
Copy link

I'm running into the same issues. I think it might be related to #525?

@grubstarstar
Copy link
Author

I'm running into the same issues. I think it might be related to #525?

Yeah that looks like it's the same issue. Thanks for that. Gives me something more to go on.

@hyochan hyochan added 🙏 help wanted Extra attention is needed 📱 iOS Related to iOS labels Oct 24, 2019
@jvandenaardweg
Copy link
Contributor

jvandenaardweg commented Oct 24, 2019

Can you verify your subscription group looks something like this? With the numbers next to it? As that shows the correct order to properly allow upgrading/downgrading. You need to re-arrange (drag and drop) this yourself. So, for example, an upgrade is from 3 to 2. A downgrade is from 2 to 3.

Screenshot 2019-10-24 at 11 50 53

@grubstarstar
Copy link
Author

Can you verify your subscription group looks something like this? With the numbers next to it? As that shows the correct order to properly allow upgrading/downgrading. You need to re-arrange (drag and drop) this yourself. So, for example, an upgrade is from 3 to 2. A downgrade is from 2 to 3.

Screenshot 2019-10-24 at 11 50 53

Ah okay. I will have a look at that and see. Thanks

@grubstarstar
Copy link
Author

Can you verify your subscription group looks something like this? With the numbers next to it? As that shows the correct order to properly allow upgrading/downgrading. You need to re-arrange (drag and drop) this yourself. So, for example, an upgrade is from 3 to 2. A downgrade is from 2 to 3.

Screenshot 2019-10-24 at 11 50 53

I didn't even know that page existed to be honest. I read this article which the page links to https://help.apple.com/app-store-connect/#/dev75708c031. It says that if they are all the same level you should be able to "crossgrade" between each one. Mine are all level 1, which matches the example they give under the section Identical services at different durations in that article. This is what it looks like now. I will try it out again when I get hold of a iOS test device.

Screen Shot 2019-11-04 at 11 12 14 am

@DavidGOrtega
Copy link

I have the same error. Subscriptions with same level different duration

@mustafaaksoy
Copy link

I have the same error.

@stale
Copy link

stale bot commented Apr 15, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the 🚶🏻 stale Stale label Apr 15, 2020
@grubstarstar
Copy link
Author

I haven't solved the issue yet. I will probably come back to it in the next month or so.

@stale stale bot removed the 🚶🏻 stale Stale label May 9, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the 🚶🏻 stale Stale label Aug 8, 2020
@stale
Copy link

stale bot commented Sep 7, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Sep 7, 2020
@grubstarstar
Copy link
Author

Still active. I will get round to this soon(ish)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS 🚶🏻 stale Stale
Projects
None yet
Development

No branches or pull requests

6 participants