Skip to main content

Hello,

 

`ERROR - The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit`.


I was recently rejected from app store review due to this weird RevenueCat bug ("react-native-purchases": "5.13.0") that I sometimes experience.

I believe that I have set up all of my code correctly, but when clicking on a subscription purchase (using the purchaseProduct method - `const purchase = await Purchases.purchaseProduct(identifier, null, Purchases.PURCHASE_TYPE.SUBS);`) the request can fail and throw the following error. “The receipt is not valid. The purchased product was missing in the receipt. This is typically due to a bug in StoreKit.” It seems that this error will happen in patches 5-10 times in a row, then once I see one success, they are all successful from there forward (the purchase modal shows up with the product, and the user can subscribe to my subscription). Now when I go back into the app, I cannot reproduce the bug as it will be successful once I get one success (if that makes sense). Eventually I will return to my app later and the bug will show up again. I have seen the bug show up in sandbox testing only, and have been unable to pass app store review due to this issue. Also I am trying to get more verbose debug logging in react native on iOS, I tried adding Purchases.setLogLevel(Purchases.LOG_LEVEL.DEBUG) in the setup before `configure`. It seems that the docs surrounding this are outdated - how can I get debug logging on a dev client (expo) with the react native SDK?

Please help.

Thanks,
Carl

 

I have been going crazy with this problem that suddenly caused my Flutter iOS app to be rejected by Apple for the first time in tens of versions over one year. I tried literally ALL the advice that helped people in ALL the many forums and pages on this darned error, and nothing helped until I saw this post. I created a new sandbox tester and the error went away immediately. Thank you Mike!

Hey Talicom,

I’m so glad I was able to help out a fellow developer in need! I feel like In-App Purchases are almost like voodoo. Even with RevenueCat greatly simplifying the process, there are still a lot of stars that need to align and magic incantations to invoke in order to get it working.


I hit this error today.  FWIW, I got around it in the (React Native) dev client by using a different (Apple) sandbox user for the purchase.  I think that after you use a sandbox user for enough purchases, Apple’s servers get confused after a while about which things that user has or hasn’t already purchased and they spit out errors.  This might not be the fix for everyone, but maybe it will help a few of you.

I have been going crazy with this problem that suddenly caused my Flutter iOS app to be rejected by Apple for the first time in tens of versions over one year. I tried literally ALL the advice that helped people in ALL the many forums and pages on this darned error, and nothing helped until I saw this post. I created a new sandbox tester and the error went away immediately. Thank you Mike!

P.S. This is a disgraceful situation for Apple to put developers in. A server going down temporarily (like what happened a year ago according to many posts) is one thing. But, rejecting apps on review repeatedly for no reason other than a bug in their sandbox testing, that can be easily avoided by using a new tester account, is inexcusable.​

 

I'm having the same problem in my Flutter iOS so I did this and deleted my sandbox user and created a new one (never used) and I'm still having the same issue and can't move forwards because of this error. Also, this is happening on my testing environment (on debug and on TestFlight), so it doesn't need apple's approve in this situation.

 

Using the flutter lib in version 8.1.1 and Apple's monitor service doesn't show anything down. 


Reply