react-native-purchases icon indicating copy to clipboard operation
react-native-purchases copied to clipboard

Purchases.getOfferings() performance issue

Open hatem-72 opened this issue 2 years ago • 13 comments

Describe the bug On IOS devices calling Purchases.getOfferings() is extremely slow. For exemple it takes up to 10 seconds on the Iphone 14 I have under my eyes. At least when called for the first time.

  1. Environment

    1. Platform: IOS
    2. SDK version: 7.1.0
    3. OS version: 16.4
    4. Xcode/Android Studio version: 14.3
    5. React Native version: 0.72.6
    6. SDK installation (CocoaPods + version or manual): CocoaPods ~> 1.13
  2. Debug logs that reproduce the issue

    Not relevant

  3. Steps to reproduce, with a description of expected vs. actual behavior

const startTs = Date.now();
const offerings = await Purchases.getOfferings();
const endTs = Date.now();
console.log(`⏰ Revenue Cat: getOfferings took ${endTs - startTs}ms`);
// output: ⏰ Revenue Cat: getOfferings took 9454ms
  1. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

    I must say that I have about fifteen different offerings. And I am calling this method right after SDK setup in order to display a paywall on app opening.

    Not tested on Android yet.

hatem-72 avatar Oct 23 '23 10:10 hatem-72

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

RCGitBot avatar Oct 23 '23 11:10 RCGitBot

Thanks for the report.

Could you please share logs when you reproduce this issue? Verbose logs would really help: Purchases.logLevel = LogLevel.VERBOSE;

Please make sure they include everything starting from SDK initialization.

Thanks!

NachoSoto avatar Oct 23 '23 14:10 NachoSoto

Sure! Here are the RC logs on app opening:

LOG  Running "<app name>" with {"rootTag":1,"initialProps":{"isHeadless":false}}
DEBUG  [Revenue Cat] Log: ℹ️ Configuring SDK using RevenueCat's UserDefaults suite.
DEBUG  [Revenue Cat] Log: 👤 Identifying App User ID
DEBUG  [Revenue Cat] Log: ℹ️ Debug logging enabled
DEBUG  [Revenue Cat] Log: ℹ️ SDK Version - 4.28.0
DEBUG  [Revenue Cat] Log: ℹ️ Bundle ID - com.<app id>
DEBUG  [Revenue Cat] Log: ℹ️ System Version - Version 16.4 (Build 20E247)
DEBUG  [Revenue Cat] Log: ℹ️ Using a simulator. Ensure you have a StoreKit Config file set up before trying to fetch products or make purchases.
See https://errors.rev.cat/testing-in-simulator for more details.
DEBUG  [Revenue Cat] Log: 👤 Initial App User ID set
DEBUG  [Revenue Cat] Log: ℹ️ Purchases is configured with response verification disabled
DEBUG  [Revenue Cat] Log: ℹ️ Delegate set
DEBUG  [Revenue Cat] Log: ℹ️ Offerings cache is stale, updating from network in foreground
DEBUG  [Revenue Cat] Log: ℹ️ GetOfferingsOperation: Started
DEBUG  [Revenue Cat] Log: ℹ️ There are no requests currently running, starting request GET /v1/subscribers/<user id>/offerings
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfa
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfv
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $ip
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfa
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfv
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $ip
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfa
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfv
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $ip
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $adjustId
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $mediaSource
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $campaign
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $adGroup
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $creative
DEBUG  [Revenue Cat] Log: ℹ️ API request started: GET '/v1/subscribers/<user id>/offerings'
LOG  🐣 Initializing Revenue Cat <-- My log here -->
WARN  [Revenue Cat] Log: ⚠️ The appUserID passed to logIn is the same as the one already cached. No action will be taken.
DEBUG  [Revenue Cat] Log: ℹ️ Vending CustomerInfo from cache.
DEBUG  [Revenue Cat] Log: ℹ️ CustomerInfo cache is stale, updating from network in foreground.
DEBUG  [Revenue Cat] Log: ℹ️ Network operation 'GetOfferingsOperation' found with the same cache key 'GetOfferingsOpe…'. Skipping request.
LOG  🐣 Initialized Revenue Cat in 129ms <-- My log here -->
DEBUG  [Revenue Cat] Log: ℹ️ API request completed: GET '/v1/subscribers/<user id>/offerings' (304)
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $firebaseAppInstanceId
DEBUG  [Revenue Cat] Log: ℹ️ No existing products cached, starting store products request for: [<list of 56 product ids>]
DEBUG  [Revenue Cat] Log: ℹ️ Found an existing request for products: [<list of 56 product ids>], appending to completion
DEBUG  [Revenue Cat] Log: ℹ️ GetOfferingsOperation: Finished
DEBUG  [Revenue Cat] Log: ℹ️ Serial request done: GET /v1/subscribers/<user id>/offerings, 0 requests left in the queue
DEBUG  [Revenue Cat] Log: ℹ️ GetCustomerInfoOperation: Started
DEBUG  [Revenue Cat] Log: ℹ️ There are no requests currently running, starting request GET /v1/subscribers/<user id>
DEBUG  [Revenue Cat] Log: ℹ️ API request started: GET '/v1/subscribers/<user id>'
DEBUG  [Revenue Cat] Log: ℹ️ Network operation 'GetCustomerInfoOperation' found with the same cache key 'GetCustomerInfo…'. Skipping request.
DEBUG  [Revenue Cat] Log: ℹ️ API request completed: GET '/v1/subscribers/<user id>' (304)
DEBUG  [Revenue Cat] Log: 😻 CustomerInfo updated from network.
DEBUG  [Revenue Cat] Log: 😻 CustomerInfo updated from network.
DEBUG  [Revenue Cat] Log: ℹ️ GetCustomerInfoOperation: Finished
DEBUG  [Revenue Cat] Log: ℹ️ Serial request done: GET /v1/subscribers/<user id>, 0 requests left in the queue
LOG  ⏳ Revenue Cat: Calling getOfferings... <-- My log here -->
DEBUG  [Revenue Cat] Log: ℹ️ No cached Offerings, fetching from network
DEBUG  [Revenue Cat] Log: ℹ️ Offerings cache is stale, updating from network in foreground
DEBUG  [Revenue Cat] Log: ℹ️ GetOfferingsOperation: Started
DEBUG  [Revenue Cat] Log: ℹ️ There are no requests currently running, starting request GET /v1/subscribers/<user id>/offerings
DEBUG  [Revenue Cat] Log: ℹ️ API request started: GET '/v1/subscribers/<user id>/offerings'
DEBUG  [Revenue Cat] Log: ℹ️ API request completed: GET '/v1/subscribers/<user id>/offerings' (304)
DEBUG  [Revenue Cat] Log: ℹ️ Found an existing request for products: [<list of 56 product ids>], appending to completion
DEBUG  [Revenue Cat] Log: ℹ️ GetOfferingsOperation: Finished
DEBUG  [Revenue Cat] Log: ℹ️ Serial request done: GET /v1/subscribers/<user id>/offerings, 0 requests left in the queue
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfa
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfv
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $ip
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfa
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfv
WARN  [Revenue Cat] Log: 🍎‼️ AdServices attribution token is not available in the simulator
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $ip
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfa
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $idfv
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $ip
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $adjustId
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $mediaSource
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $campaign
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $adGroup
DEBUG  [Revenue Cat] Log: ℹ️ setting reserved attribute: $creative
DEBUG  [Revenue Cat] Log: ℹ️ Vending CustomerInfo from cache.
DEBUG  [Device syncing] Successfully sync device with the server.
DEBUG  [Revenue Cat] Log: 😻 Store products request finished
DEBUG  [Revenue Cat] Log: 😻 Store products request received response
DEBUG  [Revenue Cat] Log: 😻 Offerings updated from network.
DEBUG  [Revenue Cat] Log: 😻 Offerings updated from network.
DEBUG  [Revenue Cat] Log: 😻 Offerings updated from network.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
DEBUG  [Revenue Cat] Log: ℹ️ This StoreProduct represents an SK1 product, the type of product cannot be determined, the value will be undefined. Use `StoreProduct.productCategory` instead.
LOG  ⏰ Revenue Cat: getOfferings took 6297ms <-- My log here -->

Note:

  • I have anonymized some references in logs (app name, user id, product ids)
  • I was using a simulator to make debugging easier, but the problem is the same on a real device and in production.

hatem-72 avatar Oct 23 '23 18:10 hatem-72

Thanks for that!

I just realized that with StoreKit 1 product requests we weren't correctly logging a warning if the product request takes too long. I fixed that in https://github.com/RevenueCat/purchases-ios/pull/3327.

Unfortunately there isn't much we can do to optimize fetching products from StoreKit. 56 products is indeed a lot of products.

We'll make a new release with those logs so we can confirm that indeed this slowness is coming from there.

Can you explain your setup? We'd love to understand your motivation and use case for having ~15 offerings and 56 products to be able to think about how to best address this.

Thanks!

NachoSoto avatar Oct 23 '23 19:10 NachoSoto

Thank you for your response!

We have multiple offerings segmented by gender and age since we're working on a dating app. On top of that, we occasionally conduct in-house A/B testing, which accounts for the extensive number of products.

The issue I'm facing is that I already know which offering I intend to display in the paywall, thanks to a specific route on our server (GET /paywall/config). Therefore, I don’t need to access all 15 offerings or 56 products. However, I haven't found a way to directly retrieve a single offering from Revenue Cat, other than fetching products by their IDs. I'm hesitant to use the latter approach because it somewhat undermines the concept of offerings and would significantly complicate our paywall configuration.

Currently, my code looks like this:

const offeringId = await getOfferingFromServer(userId);
const offerings = await Purchases.getOfferings();
return offerings.all[offeringId];

Ideally, I'd prefer something more efficient like the following to reduce the data fetch overhead:

const offeringId = await getOfferingFromServer(userId);
const offering = await Purchases.getOffering(offeringId);
return offering;

hatem-72 avatar Oct 24 '23 08:10 hatem-72

That makes sense 👍🏻 Adding a new API to fetch a single Offering to optimize this use case is something we can do, but I can't promise anything about the timeframe right now. We'll keep this ticket open and update it when we add this API.

NachoSoto avatar Oct 26 '23 18:10 NachoSoto

Same issues, hope we can make it faster ASAP. Thanks for every effort!

nguyentuanit97 avatar Oct 30 '23 03:10 nguyentuanit97

Same issue

erwannbst avatar Nov 11 '23 14:11 erwannbst

Same issue!

qalqi avatar Nov 13 '23 18:11 qalqi

Any news?

alexnguyen98 avatar Aug 27 '24 08:08 alexnguyen98

Any updates on this? I’m still facing the same issue, and it's not working properly even after updating to the latest version.

snwshivani avatar May 16 '25 11:05 snwshivani

If you fetch too many products at the same time, it'll be slow no matter what. Fetch them in priority

Mustafax06 avatar Nov 07 '25 11:11 Mustafax06

I have 4 products and the fetching is invisibly slow. CDN something?

qalqi avatar Nov 07 '25 17:11 qalqi