SDK error · code 2

storeProblemError (error code 2): Store problem

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.storeProblemError

Android (Kotlin)

PurchasesErrorCode.StoreProblemError

Causes

Why the SDK returns storeProblemError

  • StoreKit 2: StoreKitError.systemError, .notEntitled and .unknown, and Product.PurchaseError.invalidQuantity, all map here (source, Apple: StoreKitError).
  • StoreKit 1: the SKError codes cloudServiceNetworkConnectionFailed, cloudServiceRevoked, overlayTimeout, overlayPresentedInBackgroundScene and plain unknown (source, Apple: SKError.Code).
  • Android: Play Billing 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).
  • The backend answered 7101 (store problem). On Android, 7229 (Play quota exceeded) and 7231 (Play generic error) map here too (BackendErrorCode.swift, errors.kt).
  • iOS: the app asked to buy a product with an empty product ID.
Backend codeMeaning
7101Store problem. The backend could not get what it needed from the store.
7229Play Store quota exceeded. Android maps it to storeProblemError; iOS reports it as unknownBackendError.
7231Play Store generic error. Android maps it to storeProblemError; iOS reports it as unknownBackendError.

Fix

How to fix storeProblemError

  1. 01

    Read the underlying error

    On iOS read NSUnderlyingErrorKey and rc_backend_error_code in userInfo. On Android read underlyingErrorMessage. They tell a StoreKit failure from a backend 7101.

  2. 02

    Retry once after a pause

    Wait a few seconds and let the customer try again. Google recommends retries with backoff for ERROR and for service disconnects (Google docs).

  3. 03

    Check the store account on the device

    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.

  4. 04

    If the backend sent 7101, read its message

    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

How to handle it in code

  • Retrying once is reasonable. The failures behind this error are mostly temporary, and the customer confirms every purchase in the store sheet again.
  • Tell the customer the store had a problem and to try again. If they were charged, tell them to use Restore purchases.
  • Do not grant access. Grant it only when customer info shows an active entitlement.
  • Log the underlying error. A burst of storeProblemError usually means a store outage or a broken store credential.
Match the errorSwift · Kotlin
// 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

storeProblemError: questions people ask

What does "There was a problem with the App Store" mean?

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.

Is storeProblemError temporary?

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.

Does storeProblemError mean the customer was charged?

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.

How do I check for storeProblemError in React Native and Flutter?

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

Keep the RevenueCat SDK. Change the backend.

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