SDK error · code 24

unsupportedError (error code 24): Unsupported operation

What it means

unsupportedError (code 24) means the operation is not supported in the current mode or on this backend: UI preview mode, a feature that needs an option you did not enable, or on Android a backend reply of 7662 for a receipt the server cannot handle. Read the message, because it names the unsupported thing. Use a supported path, and do not grant access.

Code

24

iOS (Swift)

ErrorCode.unsupportedError

Android (Kotlin)

PurchasesErrorCode.UnsupportedError

Causes

Why the SDK returns unsupportedError

  • iOS: an operation was called in UI preview mode, and the SDK answers "Operation not supported in UI preview mode" (ErrorUtils.swift).
  • iOS: a feature that needs an option that is off, for example spending virtual currencies or token login without iamEnabled (Purchases.swift).
  • Android: the same preview-mode refusal, and a subscription management request when no management URL exists for the current subscription.
  • Android: the backend answered 7662 (product IDs malformed), which the Android SDK maps to unsupportedError and handles by not consuming the purchase (errors.kt, Backend.kt).
Backend codeMeaning
7662Android mapping: the product IDs are malformed or the receipt is not supported. RevenueDot uses it for receipts from store types it does not support. iOS has no mapping for it and reports unknownBackendError.

Fix

How to fix unsupportedError

  1. 01

    Read the message

    The message or the underlying error says which operation is unsupported, and why.

  2. 02

    Leave preview mode

    UI preview mode, used for SwiftUI previews and similar, does not run purchases. Test the call in a real run.

  3. 03

    Enable the option the feature needs

    If the message names a configuration option, turn it on in the configuration builder.

  4. 04

    Use a supported store for the key

    On Android, check that the API key belongs to a supported store app on the server. See the RevenueDot note below for 7662.

In your app

How to handle it in code

  • Do not retry. The operation stays unsupported.
  • Hide the feature in the modes where it cannot work, instead of showing an error.
  • On Android, a 7662 receipt stays unconsumed on the device. Do not grant access.
Match the errorSwift · Kotlin
// Swift
do {
  let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .unsupportedError {
  // handle unsupported operation
}

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

On RevenueDot: RevenueDot answers HTTP 400 with code 7662 for receipts from app types it does not support yet (RevenueCat Billing, Paddle and Roku apps), and when an Android SDK asks for Amazon receipt details with a key that is not an Amazon app's. On Android that arrives as this error. Supported stores are the App Store, Mac App Store, Google Play, Amazon Appstore, Stripe and the Test Store. See 4xx or 5xx on a receipt.

FAQ

unsupportedError: questions people ask

What does RevenueCat error 7662 mean on RevenueDot?

RevenueDot answers 7662 when it does not support receipts for the app's store yet, for example a RevenueCat Billing, Paddle or Roku app. The Android SDK reports it as unsupportedError.

Why do I get unsupportedError in a SwiftUI preview?

The SDK runs in UI preview mode there and refuses operations that need a real store. Run the app on a simulator or device to test the call.

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

In React Native, compare error.code with PURCHASES_ERROR_CODE.UNSUPPORTED_ERROR. In Flutter, convert the PlatformException with PurchasesErrorHelper.getErrorCode(e) and compare the result with PurchasesErrorCode.unsupportedError.

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