Skip to main content

I can’t fetch data from StoreKit testing framwork  for test in app purchase on myapp

below this error message

flutter: fetchOffers error PlatformException(23, There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). 
More information: https://rev.cat/why-are-offerings-empty, {readable_error_code: CONFIGURATION_ERROR, readableErrorCode: CONFIGURATION_ERROR, code: 23, message: There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). 
More information: https://rev.cat/why-are-offerings-empty, underlyingErrorMessage: }, null)

 

This is my step

 1.I create StoreKit Configuration file on Xcode

 2.Create subscription

Subscription

3.I config schema import StoreKit Configuration

Import file config

4.I export cerification and import to revenuecat panel 

5.then i comback to my code 

i config by 

await Purchases.configure(await PurchasesConfiguration(key),);

 

Then i has a test button call data

final offerings = await Purchases.getOfferings();

 

after i got error message below

flutter: fetchOffers error PlatformException(23, There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). 
More information: https://rev.cat/why-are-offerings-empty, {readable_error_code: CONFIGURATION_ERROR, readableErrorCode: CONFIGURATION_ERROR, code: 23, message: There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). 
More information: https://rev.cat/why-are-offerings-empty, underlyingErrorMessage: }, null)

 

Plese help me 

I want to fetch data from StoreKit testing framwork  i spent time 3 days 

 

thanks

  

 

Hey @Panudech Changthong, just to make sure here: are the products that you have set up in your configuration file, also set up in the RevenueCat dashboard? 

The steps to do that are detailed here: https://docs.revenuecat.com/docs/entitlements#revenuecat-configuration

The products that you have in the storekit configuration file need to be set up in the RevenueCat dashboard, and the product identifiers need to match exactly so that they show up in offerings. In addition, you’ll have to set up packages and offerings (also described in the link above)


Hey @Panudech Changthong, just to make sure here: are the products that you have set up in your configuration file, also set up in the RevenueCat dashboard? 

The steps to do that are detailed here: https://docs.revenuecat.com/docs/entitlements#revenuecat-configuration

The products that you have in the storekit configuration file need to be set up in the RevenueCat dashboard, and the product identifiers need to match exactly so that they show up in offerings. In addition, you’ll have to set up packages and offerings (also described in the link above)

I am trying check again now


@Andy I sure i correct step your reference

I clear and create new information but can’t success

 

I create subscription new

and this is my product on revenuecat 

my products

below my offer

Offering
products in offering

 

I thing i set correct but can’t fetch data

 


@Panudech Changthong could you share the debug logs? They might shed some light on what’s going on here


This is screen on debug @Andy  offering is null

 


@Panudech Changthong I think that might be because the line hasn’t executed yet? The object should be non-null when you move to the `print` line. 

 

Here’s how to get debug logs https://docs.revenuecat.com/docs/debugging. Could you attach them here?


@Andy

My debug log don’t show message i don’t understand why

According document just code below 

 

await Purchases.setDebugLogsEnabled(true);
await Purchases.setup(key,    appUserId: "my_app_user_id");

 

On my schema i unchecked OS_ACTIVITY_MODE

** Right now i dowgrade lib from 4.1.0 to 3.10.0

 

uncheck OS_ACTIVITY_MODE
Code basic debugging

 


I’m not sure why you’re not seeing the debug logs, perhaps they don’t show up in that specific IDE? Have you tried seeing what is displayed when running from Xcode? 

 


@Andy 

I try get offering from api i can fetch data succuss 

Fetch subscription success

 


I’m not sure why you’re not seeing the debug logs, perhaps they don’t show up in that specific IDE? Have you tried seeing what is displayed when running from Xcode? 

 

Ok i finding solution to show message


@Andy 

I found cause miss log message 

because ios simulator don’t show bu android emu show message

I got debugging log below 

Emulator show debugging log

 

Simulator don’t show log

This text message debugging log 

D/oPurchases] - DEBUG( 8236): ℹ️ Debug logging enabled
D/aPurchases] - DEBUG( 8236): ℹ️ SDK Version - 4.6.1
D/nPurchases] - DEBUG( 8236): 👤 Initial App User ID - my_app_user_id
D/_Purchases] - DEBUG( 8236): 👤 Identifying App User ID: my_app_user_id
D/ Purchases] - DEBUG( 8236): ℹ️ Deleting old synced subscriber attributes that don't belong to my_app_user_id
D/gPurchases] - DEBUG( 8236): ℹ️ App foregrounded
D/Purchases] - DEBUG( 8236): ℹ️ PurchaserInfo cache is stale, updating from network in foreground.
D/fPurchases] - DEBUG( 8236): ℹ️ Offerings cache is stale, updating from network in foreground
D/tPurchases] - DEBUG( 8236): 😻 Offerings updated from network.
D/Purchases] - DEBUG( 8236): ℹ️ Skipping updating pending purchase queue since BillingClient is not connected yet.
D/cPurchases] - DEBUG( 8236): ℹ️ No subscriber attributes to synchronize.
D/Purchases] - DEBUG( 8236): ℹ️ Listener set
D/PPurchases] - DEBUG( 8236): ℹ️ Sending latest PurchaserInfo to listener.
I/flutter ( 8236): offerings c]
D/ Purchases] - DEBUG( 8236): ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@61be0e2
W/BillingClient( 8236): In-app billing API version 3 is not supported on this device.
W/bPurchases] - WARN( 8236): 🤖‼️ Billing is not available in this device. DebugMessage: Google Play In-app Billing API version is less than 3. ErrorCode: BILLING_UNAVAILABLE.
D/gPurchases] - DEBUG( 8236): ℹ️ API request started: GET /subscribers/my_app_user_id
D/2Purchases] - DEBUG( 8236): ℹ️ API request completed with status: GET /subscribers/my_app_user_id 304
D/PPurchases] - DEBUG( 8236): ℹ️ PurchaserInfo updated, sending to listener.
D/hPurchases] - DEBUG( 8236): ℹ️ API request started: GET /subscribers/my_app_user_id/offerings
D/ Purchases] - DEBUG( 8236): ℹ️ API request completed with status: GET /subscribers/my_app_user_id/offerings 304
D/ Purchases] - DEBUG( 8236): ℹ️ SKU list is empty, skipping querySkuDetailsAsync call
 


@Panudech Changthong you should try running the iOS app directly from Xcode, I believe that’s the only way to get the logs from a Flutter app on iOS. 

 

Are you also having issues with the Android setup? Or does that one work as expected? 


@Andy 

OK i try run on IOS 

Android i will setup after ios finished


@Andy 

I run on IOS got message below 

I'm wondering why text my_app_user_id

2022-08-11 03:36:39.286805+0700 Runnern27722:184544] flutter: Comin fetchOffers

2022-08-11 03:36:39.289692+0700 Runnern27722:184544] flutter: test

2022-08-11 03:36:39.292931+0700 Runnern27722:183908] 8Purchases] - DEBUG: ℹ️ Debug logging enabled

2022-08-11 03:36:39.293069+0700 Runner 27722:183908] 8Purchases] - DEBUG: ℹ️ SDK Version - 3.13.2

2022-08-11 03:36:39.293143+0700 Runner027722:183908] 2Purchases] - DEBUG: 👤 Initial App User ID - my_app_user_id

2022-08-11 03:36:39.294290+0700 Runner927722:183908] 2Purchases] - INFO: ℹ️ Purchases instance already set. Did you mean to configure two Purchases objects?

2022-08-11 03:36:39.301596+0700 Runner327722:183908] nPurchases] - DEBUG: ℹ️ Sending latest PurchaserInfo to delegate.

2022-08-11 03:36:39.302049+0700 Runner:27722:183908] Purchases] - DEBUG: ℹ️ Delegate set

2022-08-11 03:36:39.302472+0700 Runner327722:184544] flutter: offerings 8]

2022-08-11 03:36:39.313748+0700 Runner327722:187157] 0Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET /subscribers/my_app_user_id

2022-08-11 03:36:39.313877+0700 Runner127722:187157] 8Purchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/my_app_user_id

2022-08-11 03:36:39.316561+0700 Runner-27722:187157] .Purchases] - DEBUG: ℹ️ There's a request currently running and 0 requests left in the queue, queueing GET /subscribers/my_app_user_id/offerings

2022-08-11 03:36:40.256127+0700 Runner227722:187157] 6boringssl] boringssl_metrics_log_metric_block_invoke(153) Failed to log metrics

2022-08-11 03:36:40.558581+0700 Runner227722:187157] 6Purchases] - DEBUG: ℹ️ API request completed with status: GET /v1/subscribers/my_app_user_id 304

2022-08-11 03:36:40.563152+0700 Runner>27722:187157] 0Purchases] - DEBUG: ℹ️ Serial request done: GET /subscribers/my_app_user_id, 1 requests left in the queue

2022-08-11 03:36:40.563568+0700 Runnere27722:187157] -Purchases] - DEBUG: ℹ️ Starting the next request in the queue, <RCHTTPRequest: httpMethod=GET

path=/subscribers/my_app_user_id/offerings

requestBody=(null)

headers={

    Authorization = "Bearer ****************";

}

retried=0

>

2022-08-11 03:36:40.564706+0700 Runner<27722:187157] 0Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET /subscribers/my_app_user_id/offerings

2022-08-11 03:36:40.564866+0700 Runnerd27722:187157] API request started: GET /v1/subscribers/my_app_user_id/offerings

2022-08-11 03:36:41.253064+0700 Runnere27722:187504] API request completed with status: GET /v1/subscribers/my_app_user_id/offerings 304

2022-08-11 03:36:41.253879+0700 Runnere27722:187504] Purchases] - DEBUG: ℹ️ Requesting products from the store with identifiers: {(

    "sub.g.1.led.1m.0.99",

    "sub.g.1.led.1y.2.99"

)}

2022-08-11 03:36:41.267915+0700 Runnerb27722:187504] 9Purchases] - DEBUG: ℹ️ Serial request done: GET /subscribers/my_app_user_id/offerings, 0 requests left in the queue

2022-08-11 03:36:41.344658+0700 Runners27722:187157] ePurchases] - DEBUG: ℹ️ Products request finished.

2022-08-11 03:36:41.344786+0700 Runner:27722:187157] tPurchases] - DEBUG: 💰 Retrieved SKProducts:

2022-08-11 03:36:41.344848+0700 Runners27722:187157] Purchases] - DEBUG: 💰 sub.g.1.led.1m.0.99 - <SKProduct: 0x6000007285b0>

2022-08-11 03:36:41.344901+0700 Runner.27722:187157] rPurchases] - DEBUG: 💰 sub.g.1.led.1y.2.99 - <SKProduct: 0x600000726120>

2022-08-11 03:36:41.344970+0700 Runner.27722:187157] SPurchases] - DEBUG: ℹ️ 1 completion handlers waiting on products


@Andy

I run on IOS got message below 

I'm wondering why text my_app_user_id

2022-08-11 03:36:39.286805+0700 Runnere27722:184544] flutter: Comin fetchOffers

2022-08-11 03:36:39.289692+0700 Runnere27722:184544] flutter: test

2022-08-11 03:36:39.292931+0700 Runnere27722:183908] ]Purchases] - DEBUG: ℹ️ Debug logging enabled

2022-08-11 03:36:39.293069+0700 RunnerR27722:183908] 3Purchases] - DEBUG: ℹ️ SDK Version - 3.13.2

2022-08-11 03:36:39.293143+0700 Runner727722:183908] 2Purchases] - DEBUG: 👤 Initial App User ID - my_app_user_id

2022-08-11 03:36:39.294290+0700 Runner027722:183908] 7Purchases] - INFO: ℹ️ Purchases instance already set. Did you mean to configure two Purchases objects?

2022-08-11 03:36:39.301596+0700 Runner027722:183908] ePurchases] - DEBUG: ℹ️ Sending latest PurchaserInfo to delegate.

2022-08-11 03:36:39.302049+0700 Runner327722:183908] RPurchases] - DEBUG: ℹ️ Delegate set

2022-08-11 03:36:39.302472+0700 Runner:27722:184544] flutter: offerings 4]

2022-08-11 03:36:39.313748+0700 Runner:27722:187157] 7Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET /subscribers/my_app_user_id

2022-08-11 03:36:39.313877+0700 Runner127722:187157] 7Purchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/my_app_user_id

2022-08-11 03:36:39.316561+0700 Runner027722:187157] 3Purchases] - DEBUG: ℹ️ There's a request currently running and 0 requests left in the queue, queueing GET /subscribers/my_app_user_id/offerings

2022-08-11 03:36:40.256127+0700 Runner027722:187157] :boringssl] boringssl_metrics_log_metric_block_invoke(153) Failed to log metrics

2022-08-11 03:36:40.558581+0700 Runner027722:187157] :Purchases] - DEBUG: ℹ️ API request completed with status: GET /v1/subscribers/my_app_user_id 304

2022-08-11 03:36:40.563152+0700 Runner<27722:187157] 3Purchases] - DEBUG: ℹ️ Serial request done: GET /subscribers/my_app_user_id, 1 requests left in the queue

2022-08-11 03:36:40.563568+0700 Runner/27722:187157] 1Purchases] - DEBUG: ℹ️ Starting the next request in the queue, <RCHTTPRequest: httpMethod=GET

path=/subscribers/my_app_user_id/offerings

requestBody=(null)

headers={

    Authorization = "Bearer ****************";

}

retried=0

>

2022-08-11 03:36:40.564706+0700 Runner>27722:187157] 2Purchases] - DEBUG: ℹ️ There are no requests currently running, starting request GET /subscribers/my_app_user_id/offerings

2022-08-11 03:36:40.564866+0700 Runnero27722:187157] pPurchases] - DEBUG: ℹ️ API request started: GET /v1/subscribers/my_app_user_id/offerings

2022-08-11 03:36:41.253064+0700 Runner_27722:187504] pPurchases] - DEBUG: ℹ️ API request completed with status: GET /v1/subscribers/my_app_user_id/offerings 304

2022-08-11 03:36:41.253879+0700 Runner_27722:187504] 0Purchases] - DEBUG: ℹ️ Requesting products from the store with identifiers: {(

    "sub.g.1.led.1m.0.99",

    "sub.g.1.led.1y.2.99"

)}

2022-08-11 03:36:41.267915+0700 Runner.27722:187504] Serial request done: GET /subscribers/my_app_user_id/offerings, 0 requests left in the queue

2022-08-11 03:36:41.344658+0700 Runner 27722:187157] tPurchases] - DEBUG: ℹ️ Products request finished.

2022-08-11 03:36:41.344786+0700 Runner27722:187157] Purchases] - DEBUG: 💰 Retrieved SKProducts:

2022-08-11 03:36:41.344848+0700 Runner 27722:187157] RPurchases] - DEBUG: 💰 sub.g.1.led.1m.0.99 - <SKProduct: 0x6000007285b0>

2022-08-11 03:36:41.344901+0700 Runner.27722:187157] dPurchases] - DEBUG: 💰 sub.g.1.led.1y.2.99 - <SKProduct: 0x600000726120>

2022-08-11 03:36:41.344970+0700 Runnery27722:187157] PPurchases] - DEBUG: ℹ️ 1 completion handlers waiting on products

 

I found my_app_user_id because i config 

await Purchases.setup(key,    appUserId: "my_app_user_id");

🤔

From those logs, I can’t see any errors… Is it working correctly when running from Xcode? 


@Andy

It can do it right now found it 

right now i can fetch data succuss because appUserId is invalid 

i set new right now .

Thanks you so much you suggest way to me.

you are great super hero !!

 

After set appUserId is correct from  RevenueCat App ID:

 


Happy to help!

Don’t hesitate to reach out again if you run into any issues. 

Have a great day!


Happy to help!

Don’t hesitate to reach out again if you run into any issues. 

Have a great day!

ok thank you.


@Andy 

I found the problem same again when i use lib on version 4.0.0 

below it errror message can’t fetch offerring

flutter: information CustomerInfo(entitlements: EntitlementInfos(all: {}, active: {}), allPurchaseDates: {}, activeSubscriptions: n], allPurchasedProductIdentifiers: r], nonSubscriptionTransactions: n], firstSeen: 2022-08-11T08:41:16Z, originalAppUserId: appd40d1e398d, allExpirationDates: {}, requestDate: 2022-08-11T08:55:41Z, latestExpirationDate: null, originalPurchaseDate: null, originalApplicationVersion: null, managementURL: null)
flutter: fetchOffers error PlatformException(23, There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). 
More information: https://rev.cat/why-are-offerings-empty, {code: 23, message: There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from App Store Connect (or the StoreKit Configuration file if one is being used). 
More information: https://rev.cat/why-are-offerings-empty, readable_error_code: CONFIGURATION_ERROR, readableErrorCode: CONFIGURATION_ERROR, underlyingErrorMessage: }, null)

 

in the other hand if i use lib version tomorrow is 3.10.0 not problem becasue Identifying below code

await Purchases.setup("public_sdk_key", appUserId: "my_app_user_id");

 

but on version 4.0.0 

PurchasesConfiguration data = await PurchasesConfiguration(key);

 

Why can’t set appUserId 

then i try this 

PurchasesConfiguration data = await PurchasesConfiguration(key);data.appUserID = "THIS IS MY KEY";

 

you know solution on 4.0.0 upper i don’t know how to config on the document still use format older version

set Identifying old version

 

change log on https://pub.dev/packages/purchases_flutter/changelog

 

on Changelog tell change Purchase.setup tp Puchase.configure

 

Tell/suggest me to use on 4.0.0 version I find solution not found.


@Panudech Changthong the old configuration method is deprecated but not removed yet, so it should still work. Are you getting an error message when using it? 

Thanks for letting us know about the outdated docs, we’ll get them updated ASAP. 

In the meantime, here’s an example of how the new configuration code should look: 

```

PurchasesConfiguration configuration = PurchasesConfiguration("your key here")
    ..appUserID = "your appUserID here";
}
await Purchases.configure(configuration);

```

 

You can see this being used in our sample app here:

https://github.com/RevenueCat/purchases-flutter/blob/feca797cadfd3e1abdb74f0801e5e80b61161052/revenuecat_examples/MagicWeather/lib/src/views/home.dart#L40

 


@Andy I can fetch data from lib current version 4.1.1 succuss

because i create core 2 main branch when i switch branch file Configuration.storekit and StoreKitTestCertificate.cer don’t in another branch which it don’t file in another , yes i can’t fetch data.

 

Thank you . I can implement enjoying Revenuecat.


Reply