SDK error · code 25

emptySubscriberAttributes (error code 25): Empty subscriber attributes

What it means

emptySubscriberAttributes (code 25) means the SDK tried to sync customer attributes but had none to send. It is not a failure of the purchase or of the server, and no request is made. Catch it, ignore it, and do not show the customer anything. It usually means you called a sync with nothing set.

Code

25

iOS (Swift)

ErrorCode.emptySubscriberAttributes

Android (Kotlin)

PurchasesErrorCode.EmptySubscriberAttributesError

Causes

Why the SDK returns emptySubscriberAttributes

  • The attribute-posting operation found an empty set of attributes and returned this error instead of sending a request (PostSubscriberAttributesOperation.swift).
  • The SDK logs a warning and returns this error without sending a request, so nothing reaches the server.
  • Your code triggered a sync before any attribute was set.
  • The Android SDK enum has EmptySubscriberAttributesError (code 25), but nothing in the Android source raises it.

Fix

How to fix emptySubscriberAttributes

  1. 01

    Set attributes before syncing

    Call setAttributes, setEmail and the other setters first. The SDK syncs them for you, so you rarely need a manual sync.

  2. 02

    Treat the code as success

    In a completion handler, ignore this code. There was nothing to do.

  3. 03

    Remove manual sync calls

    If you call a sync by hand after every launch, delete it. The SDK syncs attributes on its own.

In your app

How to handle it in code

  • Do not retry. Nothing is pending.
  • Show nothing to customers. Log at debug level.
  • No effect on access or purchases.
Match the errorSwift · Kotlin
// Swift
do {
  let result = try await Purchases.shared.purchase(package: package)
} catch let error as ErrorCode where error == .emptySubscriberAttributes {
  // handle empty subscriber attributes
}

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

On RevenueDot: RevenueDot is not involved, because the SDK sends no request when there are no attributes.

FAQ

emptySubscriberAttributes: questions people ask

Is emptySubscriberAttributes an error I need to fix?

No. It says an attribute sync found nothing to send. Ignore it.

Why does Android have a constant for emptySubscriberAttributes if it never fires?

The shared error list defines the code for every platform. The Android source does not raise it today.

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

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

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