SDK error · code 15

operationAlreadyInProgressForProductError (error code 15): Operation already in progress

What it means

operationAlreadyInProgressForProductError (code 15) means a purchase for the same product is already running, so the SDK refuses the second call. A double tap on the buy button is the usual cause. Disable the button until the first purchase finishes, and wait for its callback. On Android the enum name is OperationAlreadyInProgressError.

Code

15

iOS (Swift)

ErrorCode.operationAlreadyInProgressForProductError

Android (Kotlin)

PurchasesErrorCode.OperationAlreadyInProgressError

Causes

Why the SDK returns operationAlreadyInProgressForProductError

  • iOS: the SDK keeps one purchase callback per product ID. A second purchase for the same product before the first finishes gets this error (PurchasesOrchestrator.swift).
  • iOS Test Store: a second test purchase was started while the first dialog was still open.
  • Android: a purchase or a product change was called while another purchase callback was still waiting (PurchasesOrchestrator.kt).
  • The backend answered 7638 (request already in progress) or 7629 (subscriber attributes are being updated), which both SDKs map here (BackendErrorCode.swift).
Backend codeMeaning
7638Request already in progress.
7629Subscriber attributes are being updated.

Fix

How to fix operationAlreadyInProgressForProductError

  1. 01

    Disable the button during a purchase

    Set a loading state when the customer taps buy, and clear it in the completion callback. That also stops accidental double charges in the UI.

  2. 02

    Await the first call

    Do not start a second purchase for the same product, from a paywall and a banner for example, before the first one returns.

  3. 03

    Debounce taps and screen reloads

    A paywall that rebuilds itself while a purchase is open can fire the call twice. Keep purchase state outside the view.

  4. 04

    Retry a backend 7638 later

    If the cause is a backend 7638, wait a moment and try again.

In your app

How to handle it in code

  • Do not retry in a loop. Wait for the first purchase's result, then decide.
  • Show nothing to the customer in most cases. The first purchase is still running and will finish.
  • Do not grant access from this error. Grant it when the first purchase succeeds.
Match the errorSwift · Kotlin
// Swift
do {
  let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .operationAlreadyInProgressForProductError {
  // handle operation already in progress
}

// Kotlin
if (error.code == PurchasesErrorCode.OperationAlreadyInProgressError) { /* ... */ }

On RevenueDot: RevenueDot does not answer 7638 or 7629. This error comes from the SDK itself, before any request reaches the server.

FAQ

operationAlreadyInProgressForProductError: questions people ask

Why do I get "operation already in progress for this product"?

A purchase for the same product is still running. The usual cause is a double tap or a paywall that calls purchase twice. Disable the button until the first call returns.

Is OperationAlreadyInProgressError on Android the same error?

Yes. The Android enum member is OperationAlreadyInProgressError with code 15. It fires when a purchase callback is already waiting.

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

In React Native, compare error.code with PURCHASES_ERROR_CODE.OPERATION_ALREADY_IN_PROGRESS_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.operationAlreadyInProgressError. The Flutter and React Native names drop the "ForProduct" part.

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