Skip to main content

Purchases.getOfferings() is working fine on ios but not on android, there are no errors in Logcat.

I’m using Capacitor Js. 

I checked the implementation for google play console and revenuecat dashboard and everything checks out:

  • Credentials are valid with 3 check marks,
  • Package name is matching.
  • The subscription is active and imported to revenuecat in products, offerings, and entitlements.
  • There is an active closed testing track with testers
  • Tested on a real device
  • Added the same testing emails list to License testing

when calling Purchases.getOfferings() nothing happens, no errors or callback, nothing, it just hangs.

I cant find where the issue is as there are no errors to look into, i’ve beed struggling for a week now, can anyone help me?

 

 

I got the same issue and settings revenuecat is a nightmare.

I tested with Rest API and it is ok. 

hang in android too, no error, just hang


Ditto and once again this company is incapable of responding here, githuib or issuing fixes.

I reported this bug months ago, its still not been fixed.


Indeed this is frustrating!! 

I managed to get all products with Purchases.getProducts method, and got into another issue,

can’t get customerInfo now… it wont resolve as well


Hi all,

Apologies for the experience here, I’ll help everyone out.

@asali can you share the debug logs all the way up until getting customer info hangs?

@hoang-ngoc-thach-2ec2fa this sounds like a different issue since you’re using the API. Can you open a new community post with debug logs so we can investigate that one separately?

@Thruday can you share where you reported the bug? A github or community post link or a support ticket number would allow me to look it up and check the status.


Hello @sharif ,

I’m calling Purchases.getOfferings() When the app loads

Here are the logs:

ℹ️ Debug logging enabled

ℹ️ SDK Version - 7.12.0

ℹ️ Package name - <Package_Name>

👤 Initial App User ID - <APP_USER_ID>

ℹ️ Purchases configured with response verification: DISABLED

👤 Identifying App User ID: <APP_USER_ID>

ℹ️ Deleting old synced subscriber attributes that don't belong to <APP_USER_ID>

ℹ️ Listener set

ℹ️ No cached Offerings, fetching from network

😻 Start Offerings update from network.

ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@6410703

ℹ️ App foregrounded

ℹ️ CustomerInfo cache is stale, updating from network in foreground.

Retrieving customer info with policy: FETCH_CURRENT

ℹ️ Updating pending purchase queue

ℹ️ Offerings cache is stale, updating from network in foreground

😻 Start Offerings update from network.

Request already scheduled with jitter delay, adding existing callbacks to unjittered request with key: BackgroundAwareCallbackCacheKey(cacheKey=[/subscribers/<APP_USER_ID>/offerings], appInBackground=false)

ℹ️ Updating pending purchase queue

ℹ️ Querying purchases

ℹ️ Querying purchases

ℹ️ No subscriber attributes to synchronize.

Product entitlement mappings are stale. Updating.

ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@6410703

ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@6410703

ℹ️ Billing Service Setup finished for com.android.billingclient.api.BillingClientImpl@6410703

ℹ️ Updating pending purchase queue

ℹ️ Querying purchases

ℹ️ Cleaning previously sent tokens

ℹ️ Tokens already posted: /]

ℹ️ Saving tokens i]

ℹ️ Tokens already posted: e]

ℹ️ No pending purchases to sync

ℹ️ Cleaning previously sent tokens

ℹ️ Tokens already posted: g]

ℹ️ Saving tokens ]

ℹ️ Tokens already posted: >]

ℹ️ No pending purchases to sync

ℹ️ Cleaning previously sent tokens

ℹ️ Tokens already posted: o]

ℹ️ Saving tokens <]

ℹ️ Tokens already posted: e]

ℹ️ No pending purchases to sync

Request already scheduled with jitter delay, adding existing callbacks to unjittered request with key: BackgroundAwareCallbackCacheKey(cacheKey=[/subscribers/<APP_USER_ID>], appInBackground=false)

Billing connected with country code: JO


Hey bud,

Go back over your commits and look for changes with firebase plugins OR, take any pubspec changes and rewind them, try again and let me know if it works.

Ive had this happening on and off for 12 months and yesterday I figured the cause for me; I was changing firebase plugins (adding / removing) without running flutterfire configuire…. the result was this exact problem.

I suspect revenuecat is expecting a plugin to exist but doesnt there for it just fails silently. 

For me, I had removed firebase_performance without rerunning flutterfire configure.


When i fetch the products on android using

await Purchases.getProducts({ productIdentifiers: ['Produc_id'], type: 'subs' })

it works, then using purchaseStoreProduct() it will make a purchase but wont fulfill the promise that the purchase is successful and just hangs,

and Purchases.addCustomerInfoUpdateListener just hangs, same issue when using Purchases.getOfferings()

 

 


@Thruday Everything worked after disabling Firebase Performance Monitoring!!

Thank you


There we go, I had the same problem in reverse, it was when I REMOVED firebase_performance. For now, I have just left the plugin in my pubspec so everything works - I suspect this maybe has something to do with flutterfire internals however, I don’t see any changes when running flutterfire configure.

I (andy) still need to investigate this further; I know firebase_performance is the core issue but what I need to figure out is how can people add / remove it without breaking RC in the process.

@revenuecat - this has caused me HUGE problems, multiple late nights and atleast 2 weeks in lost time over the course; You need to figure this problem out, issue a fix and document the problem as to why this is happening.

I have an issue open from 9 months ago on GitHub untouched on this and I end up diagnosing the issue.

Can you please tell us why firebase_performance is causing this issue?

Why is it that Asali had to remove / disable his monitoring while I had to add the removed dependency back?