RevenueCat/purchases-android

Synching of purchases despite observer-mode and disabling autoSyncPurchases

Maradox opened this issue · 4 comments

Describe the bug

We use RevenueCat in observerMode and set autoSyncPurchases to false. We don't call syncPurchases(). For purchasing a product the billing-library is used.

Though when purchasing a product, revenuecat updates the customerInfo object and the purchase is also shown on the website.

The documentation for autoSyncPurchases states:

Disable or enable syncing purchases automatically. If this is disabled, RevenueCat will not sync any purchase automatically, and you will have to call syncPurchases whenever a new purchase is completed in order to send it to the RevenueCat's backend. Auto syncing of purchases is enabled by default.

The documentation for Observer-Mode states:

On Android with Google Play (including cross-platform SDKs running on Android), any time a purchase or restore occurs in your app you should call the syncPurchases method to record it in RevenueCat. Failure to do so will result in no purchases being recorded.

We don't want RevenueCat to pickup these purchases, but despite setting .observerMode(true) and .dangerousSettings(DangerousSettings(autoSyncPurchases = false)) and not calling syncPurchases RevenueCat still syncs purchases.

  1. Environment
    1. Platform: Android
    2. SDK version: 5.7.1
    3. OS version: Likely affects all Android versions
    4. Android Studio version: Dolphin
    5. How widespread is the issue. Percentage of devices affected. happened on all three devices I tested this on
  2. Debug logs that reproduce the issue

After purchasing via billing-library:

processPurchase with Purchase. Json: ....
query purchases
queryPurchases result: ....
ℹ️ Products request finished for SKU_ID
💰 Retrieved skuDetailsList: SkuDetails: ....
💰 SKU_ID - SkuDetails: ....
ℹ️ Found 0 unsynced attributes for App User ID: ....

Additional context

We use observerMode since RevenueCat otherwise automatically consumes purchases, which we don't want.
We disable autoSyncPurchases since we want to use RevenueCat only for logged-in users and want to handle logged-out users ourselves.

👀 SDKONCALL-221 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

Just letting you know the team is looking into this, we will update you with our findings

Hi, would you be able to provide full debug logs of the entire app lifecycle? Additionally, could you let me know how you are handling logged-out users in terms of configuring our SDK?