App rejected because of potential bug on Apple's side

My app was rejected twice because of an error that occurs when the app tries to fetch In App Purchases from the App Store. This is the message I received from the App Store Review team:


Guideline 2.1 - Performance - App Completeness

We discovered one or more bugs in your app when reviewed on iPad running iOS 13.2.3 on Wi-Fi.

Specifically, network error message is displayed after launch.


Next Steps

To resolve this issue, please run your app on a device to identify any issues, then revise and resubmit your app for review.


If we misunderstood the intended behavior of your app, please reply to this message in Resolution Center to provide information on how these features were intended to work.


For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce the issue. For updates, install the new version as an update to the previous version, then follow the steps to reproduce the issue.


Resources

For information about testing your app and preparing it for review, please see Technical Note TN2431: App Testing Guide.

For a networking overview, please review About Networking.



This error has never appeared in our internal test team and but we managed to reproduce it on a simulated iPad running iOS 13.2.2, after erasing all content and settings. The version of Xcode used is Version 11.2.1 (11B500). The call to the App Store then results in the following error:


Error Domain=ASDErrorDomain Code=507 "Error decoding object" UserInfo={NSLocalizedDescription=Error decoding object, NSLocalizedFailureReason=Attempted to decode store response}


I have noticed that the error only occurs with auto-renewable subscriptions.

When I restart the simualtor and Xcode and run again, the products are loaded succesfully.


The error is also reported on StackOverflow here:

https://stackoverflow.com/questions/58020258/requesting-an-in-app-purchase-in-ios-13-fails


And there is a reddit post about the issue here:

https://www.reddit.com/r/iOSProgramming/comments/dbw5b8/my_experience_on_having_my_app_rejected_twice/


Unfortunately, the suggested fixes don't work for me.


I created a demo project that use can use to reproduce the issue here:

https://github.com/Kukiwon/in-app-purchase-productsrequest-error


So here are my questions:


- Should I try to explain this bug to the App Review team? Hoping that they let the app pass and treat it as a bug internally.

- Do you think it's better if I first submit a TSI before proceeding with the app review?

- Does anyone know of this issue and how to solve it? Is there any workaround for this?


Any help is greatly appreciated!

Replies

App Review wrote 'network error is displayed after launch'. Why do you interact with StoreKit after launch?

So here are my questions:


- Should I try to explain this bug to the App Review team? Hoping that they let the app pass and treat it as a bug internally.


Not a bad idea, but it may depend on if you've already involved a running dialog, I think, in which case, it depends.


- Do you think it's better if I first submit a TSI before proceeding with the app review?


Perhaps not, at least at this point. DTS isn't App Review, after all and you want something that duplicates their process.


I'd like to know more about the two rejections, and timeline, and what happened/what you did/changed between the first one and the second.

  • Did you already appeal once?
  • If so, what did you say?
  • Were both rejections identical?


Are you using any 3rd party tools/SDK?


>we managed to reproduce it on a simulated iPad running iOS 13.2.2, after erasing all content and settings


Sim testing rejections makes me nervous. If you can do an ad-hoc deployment to an actual device, those sometimes better replicate store installs.

The error is not displayed after launch. In the screenshot they attached, I can see that they opened the "premium" screen after launching and then tapping on an item in the list. So the network error is not displayed after launch.

The problem seems to be with an app that is just launched and, presumably, has not yet purchased an IAP.

Help me understand this comment by you:


........we managed to reproduce it on a simulated iPad running iOS 13.2.2, after erasing all content and settings. The call to the App Store then results in the following error:

Error Domain=ASDErrorDomain Code=507 "Error decoding object" UserInfo={NSLocalizedDescription=Error decoding object, NSLocalizedFailureReason=Attempted to decode store response}

.....When I restart the simualtor and Xcode and run again, the products are loaded succesfully.



What call to the app store are you referring to? And where in your code is this error thrown?

If this is a first launch on a new install, why are there 'products...loaded succesfully'?

The app we're releasing is a meditation app and allows users to listen to sessions. Here's the (reconstructed) flow based on the screenshot Apple provided:


1. App launch -> Sessions Overview screen -> Tap on "Hierbas" session collection

https://www.icloud.com/iclouddrive/0XGvzjLQ0Ln1ntEt2HTOsRyoA#IMG_0777


2. Session Collection screen -> Tap on "Balsamo", which is a premium session

https://www.icloud.com/iclouddrive/0i_ojrB77QS58j2gpiR12p55g#IMG_0778


3. Premium screen is opened, products are loaded from the App Store

https://www.icloud.com/iclouddrive/0OnmZlt_M6PT2fuloDzxagwjg#IMG_0779


What I mean by loading products is the following code:


let productsRequest = SKProductsRequest(productIdentifiers: ["hodr_yearly_membership", "hodr_monthly_membership", "hodr_lifetime_membership"])
productsRequest.delegate = self
productsRequest.start()


This call then triggers:

func request(_ request: SKRequest, didFailWithError error: Error) {}


With the error I described above.