Solved

ERROR: šŸŽā€¼ļø There was a problem with the App Store - Apple TV

  • 9 December 2021
  • 3 replies
  • 405 views

Badge +2

When trying to make a purchase in the sandbox for Apple TV I receiveĀ ERROR: šŸŽā€¼ļø There was a problem with the App Store. To get around this problem I have to log out of my sandbox account on the TV and immediately log back in. This resolves the issue for 10 minutes or so when I then have to do the same thing again. Rinse and repeat. Outside of continually logging out and back in again, what can be done to more permanently solve this issue? This does not give me confidence to put something in production.Ā 

Ā 

Full error details:

Ā 

Optional(Error Domain=RCPurchasesErrorDomain Code=2 "There was a problem with the App Store." UserInfo={readable_error_code=STORE_PROBLEM, NSLocalizedDescription=There was a problem with the App Store., NSUnderlyingError=0x280058810 {Error Domain=SKErrorDomain Code=0 "An unknown error occurred" UserInfo={NSLocalizedDescription=An unknown error occurred, NSUnderlyingError=0x28007ba20 {Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x280078c00 {Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo=0x281bdbe80 (not displayed)}, NSLocalizedFailureReason=An unknown error occurred, NSLocalizedDescription=Unhandled exception}}}}})

icon

Best answer by ryan 10 December 2021, 23:57

View original

3 replies

Userlevel 5
Badge +9

Hey @Scott!

Weā€™ve got some docs documenting the Apple errors that would trigger it here:Ā https://docs.revenuecat.com/docs/errors#--store_problem

If logging out / logging in solves it, sounds like it an SKError.Code.unknown from Apple:Ā https://developer.apple.com/documentation/storekit/skerror/code/unknown

According to their docs:

For more information about the underlying cause of the error, see theĀ localizedDescriptionĀ property of the error object.

When this error occurs during testing, it can often be resolved by logging out of iTunes and/or the App Store and creating a new test user account in App Store Connect. This approach only works when running the app on a device, not the simulator.

When this error occurs in production, it may indicate a problem with the userā€™s iTunes account.

Ā 

When inspecting the localized description property you shared I seeĀ "Invalid Status Code". I did some Googling and youā€™re definitely not alone with other developers that have run into this error over the years. I couldnā€™t find a single solution that worked for everyone and it honestly sounds like general sandbox flakiness.Ā 

A good debugging step for the store problem errors is to try creating a new sandbox account in app store connect and using that.Ā 

RevenueCat tries to abstract as much away from the App Stores as possible but these pesky sandbox problems still poke through - the environment is so unreliable.Ā 

Ā 

Badge +2

Thanks for the reply @ryan. I have tried a different sandbox account which exhibited the same issue. I donā€™t think we can chalk this up to simply the sandbox on Apple. This is an easily and consistently repeatable problem that I have encountered for over a month. Itā€™s also a problem that I have never experienced when using Storekit directly.Ā 

Userlevel 5
Badge +9

That is an error from StoreKit being returned directly on the device before any interaction with RevenueCat servers, so weā€™re at the mercy of the Apple docs and what weā€™ve heard/seen from other developers, which can be frustratingly vague. (thereā€™s a ton of non-RevenueCat developers hitting this error as well)

I would try going through new sandbox accounts, uninstalling/reinstalling the app, and clearing derived data to see if that helps.Ā 

Reply