What does storeProblemError (code 2) mean in the purchases SDK?
The purchases SDK raises storeProblemError (code 2) when the App Store or Google Play fails a request or the backend reports a store problem.
Quick facts#
| Error | ErrorCode.storeProblemError (iOS), PurchasesErrorCode.StoreProblemError (Android), code 2 |
| Where | Purchases SDK (iOS, Android and the hybrid SDKs built on them) |
| What the vendor says | There was a problem with the store. |
Cause#
- StoreKit 2:
StoreKitError.systemError,.notEntitledand.unknown, andProduct.PurchaseError.invalidQuantityall map here. - Android: Play Billing
ERROR,SERVICE_UNAVAILABLE,SERVICE_DISCONNECTEDandSERVICE_TIMEOUTmap here. Google describesERRORas an internal Play problem andSERVICE_DISCONNECTEDas a severed connection (Google docs). - The backend answered 7101 (store problem), or on Android 7229 (Play quota exceeded) or 7231 (Play generic error).
Fix#
- Read the underlying error:
NSUnderlyingErrorKeyandrc_backend_error_codeon iOS,underlyingErrorMessageon Android. They tell a StoreKit failure from a backend 7101. - Retry once after a short pause. Google recommends retries with backoff for
ERRORand service disconnects. - Check that the store account on the device works: open the App Store or Google Play once and try again.
- If the backend sent 7101, fix the store key or service account the message names, using Verify credentials on the app page.
Example#
Swift
// The purchases SDK throws `ErrorCode` values; match the one you handle and let the rest fall through.
func handle(_ error: Error) {
guard let code = error as? ErrorCode else {
print("Not a purchases SDK error: \(error)")
return
}
switch code {
case .storeProblemError:
// Retrying once is reasonable; never unlock until customer info shows the entitlement.
print("The store had a problem; read the underlying error")
default:
print("Other purchases error: \(code.description)")
}
}Compile-checked: npm run check:snippets type-checks this snippet with swiftc together with the ErrorCode.swift file of the RevenueDot purchases-ios fork (checked 2026-10-03).
How the RevenueDot SDK reports it#
A burst of storeProblemError usually means a store outage or a broken store credential on the server. See the server error codes for 7101. Deep dive: revenuedot.app/errors/store-problem-error.
Related#
- What does StoreKitError.systemError mean?
- What does Play Billing SERVICE_DISCONNECTED (-1) mean?
- What does Play Billing ERROR (6) mean?
- What RevenueDot's API errors mean (server codes)
Source#
- RevenueDot purchases-ios: ErrorCode.swift (the iOS ErrorCode enum)
- RevenueDot purchases-android: PurchasesErrorCode.kt (the Android enum)
- RevenueDot purchases-ios: StoreKitError+Extensions.swift
- RevenueDot purchases-android: google/errors.kt (Play Billing mapping)
- RevenueDot purchases-ios: BackendErrorCode.swift (backend code mapping)
Checked: 2026-10-03