Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Receipt Validation status code 21009: What’s MZInAppCacheAccessException?

I’m validating receipts with the App Store. In very rare instances (~0,5‰), the JSON looks like this:

{
    "exception": "com.apple.jingle.commercelogic.inappcache.MZInAppCacheAccessException",
    "status": 21009,
    "environment": "Production"
}

Sadly, Apple does not mention this code in their status code table.

Searching for the exception’s name, there was merely a single reference web-wide, and that’s a denotative thread at Apple Developer Forums: What is Error code 21009? Aside from a few “me too” posts, there’s an Apple staff answer stating to “respond with more information when” there will be “concrete information”.

Regarding frequency: The thread’s dated 2016-03-15. I know of occurrences on these dates:

• 2015-10-08    • 2016-11-24    • 2017-01-09    • 2017-02-03 8× • 2017-04-04
• 2016-03-16    • 2016-12-06    • 2017-01-13    • 2017-03-07    • 2017-04-05
• 2016-06-06    • 2016-12-13    • 2017-01-17    • 2017-03-13    • 2017-04-06
• 2016-08-30    • 2017-01-04    • 2017-02-15    • 2017-03-17 2× • 2017-04-07
• 2016-09-08    • 2017-01-07    • 2017-02-18    • 2017-03-23 2× • …
• 2016-09-23    • 2017-01-08 2× • 2017-02-19    • 2017-03-27

While this exception seems rare enough to be negligible, I’d appreciate some light shed on it.

Has anyone figured out an appropriate way of handling this exception? (like revalidation)

What does this exception actually mean? (What’s “jingle”, “commercelogic” and “MZInAppCache”?)

like image 240
dakab Avatar asked Jun 07 '16 06:06

dakab


People also ask

How do I verify my Apple receipt?

Use the production URL https://buy.itunes.apple.com/verifyReceipt when your app is live in the App Store. For more information on these endpoints, see verifyReceipt. Verify your receipt first with the production URL; then verify with the sandbox URL if you receive a 21007 status code.

How do I verify my App Store?

Validating with the App Store requires a secure connection between your app and your server, and code on your server to validate the receipt with the App Store. Submit an HTTP POST request with the contents detailed in requestBody using the verifyReceipt endpoint to verify receipts with the App Store.


1 Answers

I faced the same issue. I got this about 50 times per day. It's internal receipt's server error. I process this case the same as status 21005 (Service not available). So, I just add receipt with status 21009 to queue of failed validations. And trying again later - it works.

UPDATED 2016-10-11: At the last 24 hours I got this status 140 times. So, it has sense to proceed this status as internal service error.

like image 111
Stafox Avatar answered Oct 19 '22 17:10

Stafox