General Debugging Tips

0:04:00

Beyond specific error messages, these general debugging techniques will help you diagnose and resolve issues faster.

1. Use the RevenueCat Dashboard

The dashboard is your first debugging tool. It shows real-time data about your configuration and user activity.

Customer History

  1. Go to RevenueCat dashboard.
  2. Navigate to Customer lists.
  3. Search for a user by:
    • App User ID.
    • Email (if set).
    • Transaction ID.
  4. View their complete purchase history, active entitlements, and subscription status.

This helps you verify:

  • Did the purchase actually process?
  • What entitlements does the user have?
  • When did their subscription expire?
  • Any failed transactions?

Configuration Validation

The dashboard shows warnings for configuration issues:

  • Missing service credentials.
  • Products not found in stores.
  • Offerings with no packages.
  • Paywalls not published.

2. Test in Sandbox vs Production

Always test in both environments to catch environment-specific issues.

Sandbox Testing (iOS)

Pros:

  • No real charges.
  • Faster subscription renewals (5 minutes = 1 month).
  • Easy to test subscription lifecycle.

Cons:

  • Requires sandbox account setup.
  • Sometimes flaky/slow.
  • Different behavior than production.

Production Testing

For iOS: Use TestFlight with sandbox accounts or create a separate "testing" build

For Android: Use Internal Testing track with license testers

When to test in production:

  • Before major releases.
  • After significant configuration changes.
  • To verify the complete end-to-end flow.

3. Use Test Store for Faster Testing

RevenueCat Test Store eliminates many sandbox headaches:

  • No real store dependencies: Works without App Store Connect or Google Play.
  • Deterministic outcomes: Control whether purchases succeed/fail.
  • Works in Simulator/Emulator: No device needed.
  • CI/CD friendly: Perfect for automated tests.

Learn more:

4. Clear Caches When Things Get Weird

Sometimes cached data causes strange behavior.

Clear RevenueCat Customer Info Cache

iOS:

swift
// Force SDK to fetch fresh data
Purchases.shared.invalidateCustomerInfoCache()

Android:

kotlin
// Force SDK to fetch fresh data
Purchases.sharedInstance.invalidateCustomerInfoCache()

Clear Device/App Cache

iOS:

  1. Delete the app.
  2. Restart the device.
  3. Reinstall the app.

Android:

  1. Go to Settings → Apps.
  2. Find your app.
  3. Tap Storage → Clear Cache.
  4. Also clear Google Play Store cache.

5. Check the RevenueCat Community

Chances are someone has encountered your issue before.

6. Network Debugging with Proxies

Use Charles Proxy or similar tools to inspect network traffic:

What to Look For:

  • API requests to api.revenuecat.com.
  • HTTP status codes (200 = success, 401 = auth issue, etc.).
  • Request/response payloads.
  • Request timing (slow requests indicate network issues).

Setup Charles Proxy:

  1. Download Charles Proxy.
  2. Configure device to use Charles as proxy.
  3. Install Charles certificate on device.
  4. Run your app and watch requests.
Note: Network inspection is advanced and usually only needed for complex issues. Start with SDK logs first.

7. Isolate the Problem

When debugging, try to narrow down what's causing the issue:

Create a Minimal Test Case

swift
// Test just SDK initialization
Purchases.logLevel = .debug
Purchases.configure(withAPIKey: "appl_xxx")
print("SDK initialized")

// Test just fetching offerings
Task {
    do {
        let offerings = try await Purchases.shared.offerings()
        print("Offerings fetched: \(offerings.all.count)")
    } catch {
        print("Error: \(error)")
    }
}

This helps you determine if the issue is with:

  • SDK initialization.
  • Network/API access.
  • Product configuration.
  • Your app's UI/logic.

8. Compare with Sample Apps

RevenueCat provides official sample apps that are known to work:

Clone them and:

  1. Replace the API key with yours.
  2. See if they work with your configuration.
  3. Compare your implementation with the sample code.

Common Debugging Scenarios Quick Reference

ScenarioLikely Root CauseRecommended Approach
Everything works in sandbox but not production Products or agreements not finalized for production. Verify all products are approved (iOS) or active (Android). Check that the Paid Applications Agreement is active. Ensure you're using the correct (non-sandbox) API key. Check RevenueCat dashboard for configuration warnings.
Purchases work once but fail on reinstall App User ID changes between installs, creating a new anonymous user. Use Purchases.logIn() with a stable user ID (e.g., from your auth system) to persist identity across installs. Or call restorePurchases() after reinstall to link the store account.
Entitlement granted in dashboard but SDK says inactive SDK cache not yet refreshed with latest server data. Call Purchases.shared.invalidateCustomerInfoCache() then fetch customer info again. The SDK caches customer info for 5 minutes. For granted entitlements, a cache clear is needed. See community discussion.
User has active subscription but no entitlement Product not linked to entitlement in RevenueCat. In RevenueCat dashboard → Product Catalog → Entitlements, verify the product is attached to the correct entitlement. Each product must be explicitly linked. Check the customer's page in the dashboard for transaction details.
Multiple user accounts for same person Anonymous IDs created before login, or different app user IDs used. Use Purchases.logIn() as early as possible in the app lifecycle. RevenueCat can transfer purchases between anonymous and identified users. Check the user identification docs.
Restore purchases not working on Android App installed from different Google account than the purchaser. The user must be signed into the Google account that made the original purchase. If multiple accounts are on the device, the primary account (used to install the app) must be the purchaser. See community discussion.
Works locally but fails in CI/CD CI environment lacks store configuration or network access. Use the RevenueCat Test Store for CI/CD pipelines. Test Store doesn't require real store credentials, works in emulators, and provides deterministic outcomes. See the Test Store codelabs.
Webhook events not arriving Server notifications URL not configured or unreachable. In RevenueCat dashboard → Integrations → Webhooks, verify the URL is correct and your server is publicly accessible. Check your server logs for incoming requests. Test with a tool like webhook.site first.
Revenue showing $0 in dashboard All purchases are from sandbox/test environment. Sandbox purchases don't generate real revenue. The dashboard filters by environment. Switch the dashboard view to "Sandbox" to see test purchase data. Production revenue only appears after real store purchases.
App crashes on Purchases.configure() SDK initialization on wrong thread or duplicate configuration. Call Purchases.configure() on the main thread and only once. On iOS, use AppDelegate.application(_:didFinishLaunchingWithOptions:). On Android, use Application.onCreate(). Never configure in a background thread.
Transfer ownership between accounts User wants to move subscription to a different account. RevenueCat supports transfer behavior settings. In dashboard → Project Settings → General, configure the Transfer Behavior to control how purchases transfer between user accounts. See transfer behavior docs.
Offerings different between platforms Products attached to packages are platform-specific. Each package in an offering can have separate iOS and Android products. In the offering editor, ensure both platform products are attached to each package. A package with only iOS products will appear empty on Android.
"Invalid Play Store credentials" persists after 72+ hours Service account permissions changed or incomplete after initial setup. Re-verify the service account has Financial Data, Manage Orders, and Monetization permissions in Play Console → Users and Permissions. Re-download and re-upload the JSON credentials file. Log the complete error object for full details. See community discussion.
Dashboard shows "Credentials need attention" Google requires up to 36 hours for credential propagation. Wait at least 36-48 hours after creating credentials. Verify the service account email appears in Google Cloud Console under IAM & Admin. Don't repeatedly re-upload during the propagation window. See community discussion.
"Credentials validation" error in dashboard Shared secret, IAP Key, or JSON credentials file is invalid. For App Store: re-generate the Shared Secret or re-download the IAP Key. Double-check Key ID and Issuer ID from App Store Connect. For Play Store: re-create the service account JSON key file. See community discussion.

Debugging Checklist

Before asking for help, verify you've done these steps:

  • Enabled debug logging (Purchases.logLevel = .debug).
  • Checked RevenueCat dashboard for configuration warnings.
  • Verified customer in dashboard (if applicable).
  • Checked product IDs match between store and RevenueCat.
  • Verified API key is correct for platform.
  • Tested in both sandbox and production (if possible).
  • Cleared caches and restarted app.
  • Searched community forum for similar issues.
  • Created minimal test case to isolate problem.
  • Checked official documentation.