Google Play Issues

0:10:00

Google Play configuration issues are among the most common problems when integrating RevenueCat with Android apps. This section covers product setup, service credentials, and testing challenges.

Issue 1: Product Not Found Errors

Error Message

text
BillingClient: Product not found
Error: The item you were attempting to purchase could not be found

Common Causes

  1. Product Not Published: Your product exists but isn't published in Google Play Console.
  2. Product ID Mismatch: The product ID in RevenueCat doesn't match Google Play.
  3. App Not Published: Your app isn't published (not even for internal testing).
  4. Wrong Package Name: The package name doesn't match your app.

Solution Steps

Step 1: Verify Product Status in Google Play Console

  1. Go to Google Play Console.
  2. Navigate to Monetize → Products → In-app products or Subscriptions.
  3. Check that your product status is "Active".
  4. If it shows "Inactive" or "Draft", you need to activate it.

Step 2: Verify Product IDs Match

  1. In Google Play Console, copy the exact Product ID.
  2. Go to your RevenueCat dashboard.
  3. Navigate to Product Catalog → Products.
  4. Verify the Google Play Product ID matches exactly (case-sensitive).
Important: Product IDs are case-sensitive. "premium_monthly" is different from "premium_Monthly".

Step 3: Publish Your App for Testing

  1. Your app must be published to at least Internal Testing track.
  2. In Google Play Console, go to Testing → Internal testing.
  3. Create a release and upload your APK/AAB.
  4. Add yourself as a tester.
  5. Wait 1-2 hours for Google Play to process the release.

Step 4: Verify Package Name

  1. Check your app's build.gradle for the applicationId.
  2. In RevenueCat dashboard, verify the App → Google Play package name matches.

Issue 2: Service Credentials / API Access Issues

Error Message

text
Error: Unable to fetch Google Play purchases
Google Play credentials are invalid or expired

Common Causes

  1. Service Account Not Created: You haven't set up a Google Cloud service account.
  2. Missing Permissions: Service account doesn't have the required permissions.
  3. Expired Credentials: Service account key has expired.
  4. Wrong Project Linked: Service account is from a different Google Cloud project.

Solution Steps

Step 1: Create Service Account (if not created)

  1. Go to Google Cloud Console.
  2. Select or create a project linked to your Google Play Console.
  3. Navigate to IAM & Admin → Service Accounts.
  4. Click Create Service Account.
  5. Name it "RevenueCat Service Account".
  6. Click Create and Continue.
  7. Skip role assignment (done in Google Play Console).
  8. Click Done.

Step 2: Grant Permissions in Google Play Console

  1. Go to Google Play Console.
  2. Navigate to Setup → API access.
  3. Link your Google Cloud project (if not already linked).
  4. Find your service account and click Grant access.
  5. Grant these permissions:
    • View financial data.
    • Manage orders and subscriptions.
  6. Click Invite user.

Step 3: Generate and Upload Service Account Key

  1. In Google Cloud Console.
  2. Go to IAM & Admin → Service Accounts.
  3. Click on your service account.
  4. Go to Keys tab.
  5. Click Add Key → Create new key.
  6. Choose JSON format.
  7. Download the key file.
  8. In RevenueCat dashboard:
    • Go to your project.
    • Navigate to Apps & providers → Google Play.
    • Upload the JSON key file.
Security Warning: Never commit service account JSON files to version control. Store them securely and rotate keys regularly.

Issue 3: Testing Issues and License Testers

Error Message

text
Error: This version of the application is not configured for billing through Google Play

Common Causes

  1. Not Added as License Tester: Your Google account isn't in the license testing list.
  2. Using Wrong Google Account: Testing with an account that's not a license tester.
  3. Testing on Emulator Without Proper Setup: Emulators need special configuration.
  4. App Not Downloaded from Play Store: Sideloaded apps can't make test purchases.

Solution Steps

Step 1: Add License Testers

  1. Go to Google Play Console.
  2. Navigate to Setup → License testing.
  3. Add Gmail addresses of testers.
  4. Set response to RESPOND_NORMALLY.
  5. Save changes.

Step 2: Add Internal Test Users

  1. Go to Testing → Internal testing.
  2. In the Testers tab, create a list or add email addresses.
  3. Testers must accept the opt-in link to join the program.

Step 3: Install App Correctly

  1. Testers must install via the Play Store opt-in link.
  2. Don't sideload APKs for testing purchases.
  3. Ensure the device is signed in with a license tester Google account.

Step 4: Verify Version Codes Match

  1. The version code in your uploaded APK/AAB must match your local build.
  2. Check versionCode in build.gradle.
  3. Verify it matches the version in Google Play Console.
Tip: Use the RevenueCat Test Store for faster, more reliable testing without Google Play setup hassles.

Issue 4: Cache and State Issues

Symptoms

  • Products that were working suddenly aren't available.
  • Purchase state doesn't update after successful purchase.
  • Old products still appear after being removed.

Solution Steps

Step 1: Clear Google Play Store Cache

  1. Go to device Settings → Apps.
  2. Find Google Play Store.
  3. Tap Storage → Clear Cache.
  4. Restart your device.

Step 2: Clear Your App's Cache

kotlin
// Force refresh customer info
Purchases.sharedInstance.invalidateCustomerInfoCache()

Step 3: Reinstall the App

  1. Uninstall the app completely.
  2. Reinstall from the Play Store opt-in link.
  3. This ensures a clean state.

Common Issues Quick Reference

ProblemPossible CauseSolution
Products not found in RevenueCat Product ID mismatch between Google Play Console and RevenueCat dashboard. Copy the exact Product ID from Google Play Console → Monetize → Products. Paste it in RevenueCat → Product Catalog → Products. IDs are case-sensitive and must match character-for-character.
Products not found in RevenueCat Products are in "Draft" or "Inactive" state in Google Play Console. In Google Play Console → Monetize → Products, ensure each product status shows Active. Activate any draft products and wait a few minutes for changes to propagate.
Products not found in RevenueCat App not published to any testing track. Your app must be published to at least the Internal Testing track with a signed APK/AAB. Go to Google Play Console → Testing → Internal testing → Create a new release.
"Billing unavailable" error Testing on an emulator without Google Play Services. Use a physical device or an emulator image that includes Google Play Store (not just Google APIs). In Android Studio, select a system image with the "Google Play" column marked.
"Billing unavailable" error App is sideloaded, not installed via Play Store. Testers must install the app through the Play Store opt-in link from the Internal Testing track. Sideloaded APKs cannot make test purchases.
Service credentials error Service account JSON key not uploaded or expired. In RevenueCat dashboard → Apps & providers → Google Play, upload a valid JSON key file. Generate a new key in Google Cloud Console → IAM & Admin → Service Accounts → Keys if needed.
Service credentials error Service account missing required permissions. In Google Play Console → Setup → API access, grant the service account View financial data and Manage orders and subscriptions permissions. Wait up to 36 hours for propagation.
Service credentials error Google Cloud project not linked to Play Console. In Google Play Console → Setup → API access, link the correct Google Cloud project that contains your service account. Only one project can be linked at a time.
"This version is not configured for billing" Version code mismatch between local build and Play Store. Ensure the versionCode in your build.gradle matches the version uploaded to the testing track. Upload a new build if they differ.
Test purchases charged real money Google account not added as a license tester. Go to Google Play Console → Setup → License testing. Add the Gmail address of each tester. Set license response to RESPOND_NORMALLY. Changes take effect within 15 minutes.
Products still showing old data Google Play Store cache on device is stale. On the device, go to Settings → Apps → Google Play Store → Storage → Clear Cache. Then force-stop the Play Store and reopen your app.
Purchase succeeds but entitlement not granted Entitlement not linked to product in RevenueCat. In RevenueCat dashboard → Product Catalog → Entitlements, verify your entitlement exists and the product is attached. Each product must be linked to at least one entitlement.
Subscription renewal not detected Google Real-Time Developer Notifications not configured. Set up Google Real-Time Developer Notifications to ensure RevenueCat receives subscription status updates immediately.
Subscription not fetched (new Play model) Base plan not marked as "Backwards compatible". In Google Play Console, open your subscription and click the base plan. Ensure the "Backwards compatible" tag is enabled. Only one base plan per subscription should be backwards compatible. Use the format subscriptionId:basePlanId in RevenueCat. See community discussion.
"You already own this item" Previous test purchase not consumed or refunded. For non-consumables, refund and revoke the purchase via Google Play Console. Delete the test user in RevenueCat dashboard to clear sandbox state. For consumables, ensure the purchase is properly consumed by the SDK. See community discussion.
"The item you requested is not available for purchase" App run locally via flutter run or sideloaded. Upload the signed app to a Google Play testing track and have it approved. Testers must install via the opt-in link. Local debug builds without Play Store distribution cannot support purchases. See community discussion.
SERVICE_UNAVAILABLE when fetching products BillingClient has not finished connecting. Ensure Google Play Services is installed and up to date on the device. The SDK retries automatically. Do not fetch offerings immediately after configure(). Update to the latest RevenueCat SDK version. See community discussion.

Quick Checklist for Google Play Setup

Use this checklist to verify your Google Play configuration:

  • ☐ Products are Active in Google Play Console.
  • ☐ Product IDs match exactly between Google Play and RevenueCat.
  • ☐ App is published to at least Internal Testing track.
  • ☐ Package name matches in build.gradle and RevenueCat.
  • ☐ Service account created with JSON key uploaded to RevenueCat.
  • ☐ Service account has correct permissions in Google Play Console.
  • ☐ License testers added in Google Play Console.
  • ☐ Testing with correct Google account on physical device.
  • ☐ App installed via Play Store opt-in link (not sideloaded).