Code
2
SDK error · code 2
What it means
storeProblemError (code 2) means the App Store, Google Play or the payment system failed the request: a StoreKit system error, a lost store connection, a Play Billing service failure, or a backend reply with code 7101. It is usually temporary. Retry once, tell the customer the store had a problem, and do not grant access until customer info shows the purchase.
Code
2
iOS (Swift)
ErrorCode.store
Android (Kotlin)
PurchasesErrorCode.Store
Causes
StoreKitError.systemError, .notEntitled and .unknown, and Product.PurchaseError.invalidQuantity, all map here (source, Apple: StoreKitError).SKError codes cloudServiceNetworkConnectionFailed, cloudServiceRevoked, overlayTimeout, overlayPresentedInBackgroundScene and plain unknown (source, Apple: SKError.Code).ERROR, SERVICE_UNAVAILABLE, SERVICE_DISCONNECTED and SERVICE_TIMEOUT (errors.kt). Google describes ERROR as an internal Play problem and SERVICE_DISCONNECTED as a severed connection to the Play Store service (Google docs).| Backend code | Meaning |
|---|---|
| 7101 | Store problem. The backend could not get what it needed from the store. |
| 7229 | Play Store quota exceeded. Android maps it to storeProblemError; iOS reports it as unknownBackendError. |
| 7231 | Play Store generic error. Android maps it to storeProblemError; iOS reports it as unknownBackendError. |
Fix
On iOS read NSUnderlyingErrorKey and rc_backend_error_code in userInfo. On Android read underlyingErrorMessage. They tell a StoreKit failure from a backend 7101.
Wait a few seconds and let the customer try again. Google recommends retries with backoff for ERROR and for service disconnects (Google docs).
Open the App Store or Google Play app once and confirm the account works and the store is up to date, then retry the purchase.
The message names the store problem. For a self-hosted or Cloud RevenueDot server, use Verify credentials on the app page and fix the store key or service account it flags.
In your app
// Swift
do {
let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .storeProblemError {
// handle store problem
}
// Kotlin
if (error.code == PurchasesErrorCode.StoreProblemError) { /* ... */ } On RevenueDot: When Apple, Google, Amazon or Stripe cannot be reached, answers 429 or 5xx, or a Google purchase is still pending payment, RevenueDot answers POST /v1/receipts with HTTP 503 and code 7101. A missing or rejected Amazon or Stripe key answers 500 with 7101. A 5xx makes the SDK keep the purchase and post it again, so fixing the credential is enough. See 4xx or 5xx on a receipt.
FAQ
It is the message of storeProblemError (code 2). StoreKit or the backend reported a failure that is not the customer's fault, such as a system error, a lost connection to Apple, or a backend 7101 reply. Retry once, then check the underlying error.
Mostly yes. StoreKit system errors, Play service disconnects and 7101 replies from a store outage clear up on their own. A 7101 caused by a wrong store credential stays until you fix the credential.
Not necessarily. If the store charged the customer and only the receipt post failed, the SDK keeps the transaction and posts it again later. Tell the customer to tap Restore purchases if access does not appear.
In React Native, compare error.code with PURCHASES_ERROR_CODE.STORE_PROBLEM_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.storeProblemError.
Get started
RevenueDot answers the same SDK calls with the same error codes. Start free on RevenueDot Cloud, free up to $10,000 a month in tracked revenue.
Already have an account? Sign in · Prefer your own servers? Self-host free