Solved

Unable to start a trial of one product

  • 23 August 2022
  • 3 replies
  • 434 views

Badge +4

Hello,

 

My app has 3 products, Monthly, Annual, and Lifetime packages in 1 offering.

 

On launch I call getOfferings, take the current offering, and store the packages. My paywall is dynamically generated based on these packages. When I try and call purchase() on my Annual or Lifetime packages it works fine, but my Monthly fails with a weird error:

 

2022-08-23 11:00:18.932233+0930 Pestle[44020:4973217] [Purchases] - INFO: 💰 Purchasing Product 'mymonthlyoffering' from package in Offering 'Pro Upgrade'
2022-08-23 11:00:23.562161+0930 Pestle[44020:4973974] [Default] [StoreKit] Received error that does not have a corresponding StoreKit Error:
Error Domain=ASDServerErrorDomain Code=3502 "This item is not available." UserInfo={client-environment-type=Sandbox, storefront-country-code=AUS, NSLocalizedDescription=This item is not available.}

2022-08-23 11:00:23.562331+0930 Pestle[44020:4973974] [Default] [StoreKit] Purchase did not return a transaction: Error Domain=ASDServerErrorDomain Code=3502 "This item is not available." UserInfo={client-environment-type=Sandbox, storefront-country-code=AUS, NSLocalizedDescription=This item is not available.}

2022-08-23 11:00:23.567551+0930 Pestle[44020:4973974] [Purchases] - ERROR: 🍎‼️ There was a problem with the App Store.

2022-08-23 11:00:23.573746+0930 Pestle[44020:4973974] [Purchases] - ERROR: 💰 Product purchase for 'mymonthlyoffering' failed with error: Error Domain=RevenueCat.ErrorCode Code=2 "There was a problem with the App Store." UserInfo={NSLocalizedDescription=There was a problem with the App Store., source_function=asPurchasesError, NSUnderlyingError=0x2803d1200 {Error Domain=StoreKit.StoreKitError Code=2 "Unable to Complete Request"}, readable_error_code=STORE_PROBLEM, source_file=RevenueCat/StoreKitError+Extensions.swift:43}

 

I can’t figure out why it’s failing, or why the Yearly and Annual work fine, and tips would be appreciated.

icon

Best answer by joshdholtz 24 August 2022, 03:40

View original

3 replies

Userlevel 5
Badge +7

Hi @WillBishop , this article has more information: 

 

The key takeaway from the article as that for further investigation, you should try getting the underlying error from the error object. Probably it’s a good idea to inspect the contents of the error object, e.g., using the Dart inspect() function.

Badge +4

Hi, I’m not using Flutter, just regular Swift. 

Userlevel 3
Badge +5

Hey @WillBishop! 👋 

 

So `Error Domain=ASDServerErrorDomain Code=3502 "This item is not available."` seems like this could be an issue with the configuration of the monthly product in App Store Connect.

The `UserInfo={client-environment-type=Sandbox, storefront-country-code=AUS, NSLocalizedDescription=This item is not available.}` dives a little further into that error and makes it seem like you are trying to purchase from the AUS storefront (which makes sense based on where you live 😉) but your product isn’t available there. 

Now for the fun part of trying to figure out the exact reason why you are getting this. Here are the things I would look into:

  • Is your monthly configured that exact same as annual and lifetime? Is anything missing like some prices or other fields?
  • Are they in the same state? (Ex: something like “Approved” or “Ready to Submit”)

Question: Were these products all approved in a submission already? Are they already live? If it is live, are you experiencing this error there?

The sandbox environment is known to give some really weird errors. It’s not the most stable of environments. Since this error is coming directly from the App Store (seen by `ASDServerErrorDomain`), it seems like this is likely the case.

Things you could do:

  1. Try creating another monthly product and see if that one starts working. I don’t think there should be any real harm in maybe doing that 🤷‍♂️
  2. You could test using the StoreKit Config files instead of the sandbox since the sandbox environment is real buggy.

I don’t know if I was able to answer or help you fully here yet! Hopefully this can help you debug further into your some of your App Store stuff that I can’t see. But let me know the answer to some of the things above and we can go further from there.

Reply