Question

Empty list of products

  • 31 August 2022
  • 2 replies
  • 68 views

Badge +1

Hey guys, I’m getting empty list of products after following all the quick start tutorial and also the thread below:

 

Here is the logs I have:

2022-08-30 20:44:24.710 8209-22767/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Debug logging enabled
2022-08-30 20:44:24.711 8209-22767/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ SDK Version - 4.6.1
2022-08-30 20:44:24.711 8209-22767/com.crediswap.crediswap D/[Purchases] - DEBUG: 👤 Initial App User ID - null
2022-08-30 20:44:24.711 8209-22767/com.crediswap.crediswap D/[Purchases] - DEBUG: 👤 Identifying App User ID: $RCAnonymousID:36244bb505c14d0c8f5accb0d5a7f8a0
2022-08-30 20:44:24.713 8209-22767/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Deleting old synced subscriber attributes that don't belong to $RCAnonymousID:36244bb505c14d0c8f5accb0d5a7f8a0
2022-08-30 20:44:24.714 8209-22767/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Listener set
2022-08-30 20:44:24.714 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ App foregrounded
2022-08-30 20:44:24.714 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ PurchaserInfo cache is stale, updating from network in foreground.
2022-08-30 20:44:24.714 8209-22767/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Sending latest PurchaserInfo to listener.
2022-08-30 20:44:24.716 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Offerings cache is stale, updating from network in foreground
2022-08-30 20:44:24.716 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: 😻 Offerings updated from network.
2022-08-30 20:44:24.717 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Skipping updating pending purchase queue since BillingClient is not connected yet.
2022-08-30 20:44:24.717 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ No subscriber attributes to synchronize.
2022-08-30 20:44:24.719 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@f0ee011
2022-08-30 20:44:24.721 8209-22856/com.crediswap.crediswap D/TrafficStats: tagSocket(117) with statsTag=0xffffffff, statsUid=-1
2022-08-30 20:44:24.722 8209-22767/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Requesting products from the store with identifiers: test_coupom_1
2022-08-30 20:44:24.722 8209-22788/com.crediswap.crediswap D/TrafficStats: tagSocket(119) with statsTag=0xffffffff, statsUid=-1
2022-08-30 20:44:24.749 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@f0ee011
2022-08-30 20:44:24.749 8209-8209/com.crediswap.crediswap W/BillingClient: Client is already in the process of connecting to billing service.
2022-08-30 20:44:24.835 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Billing Service Setup finished for com.android.billingclient.api.BillingClientImpl@f0ee011
2022-08-30 20:44:24.835 8209-8209/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Updating pending purchase queue
2022-08-30 20:44:25.198 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3A36244bb505c14d0c8f5accb0d5a7f8a0
2022-08-30 20:44:25.199 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3A36244bb505c14d0c8f5accb0d5a7f8a0 304
2022-08-30 20:44:25.202 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ PurchaserInfo updated, sending to listener.
2022-08-30 20:44:25.250 8209-22868/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Products request finished for test_coupom_1
2022-08-30 20:44:25.250 8209-22868/com.crediswap.crediswap D/[Purchases] - DEBUG: 💰 Retrieved skuDetailsList:
2022-08-30 20:44:25.263 8209-22766/com.crediswap.crediswap I/ReactNativeJS: []
2022-08-30 20:44:25.267 8209-22766/com.crediswap.crediswap I/ReactNativeJS: finish products
2022-08-30 20:44:25.323 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3A36244bb505c14d0c8f5accb0d5a7f8a0/offerings
2022-08-30 20:44:25.323 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3A36244bb505c14d0c8f5accb0d5a7f8a0/offerings 304
2022-08-30 20:44:25.324 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ SKU list is empty, skipping querySkuDetailsAsync call
2022-08-30 20:44:25.325 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Querying purchases
2022-08-30 20:44:25.336 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Cleaning previously sent tokens
2022-08-30 20:44:25.336 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Tokens already posted: []
2022-08-30 20:44:25.336 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Saving tokens []
2022-08-30 20:44:25.337 8209-22856/com.crediswap.crediswap D/[Purchases] - DEBUG: ℹ️ Tokens already posted: []

I also got this when filtering by error only:

2022-08-30 20:44:02.434 8209-8209/com.crediswap.crediswap E/unknown:ReactNative: Tried to remove non-existent frame callback
2022-08-30 20:44:02.442 8209-8209/com.crediswap.crediswap E/unknown:ReactInstanceManager: destroyRootView called
2022-08-30 20:44:02.442 8209-8209/com.crediswap.crediswap E/unknown:ReactInstanceManager: destroyRootView called, unmountReactApplication
2022-08-30 20:44:02.718 8209-8417/com.crediswap.crediswap E/[Purchases] - ERROR: 😿‼️ Error performing request.
2022-08-30 20:44:02.718 8209-8417/com.crediswap.crediswap E/Purchases: Error fetching subscriber data: Error performing request.

Also, Here is the setup on play store for the product:

And here in RevenueCat

 Also here the package name in app json and play store:

{
"expo": {
"name": "crediswap",
"slug": "crediswap",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"versionCode": 2,
"package": "com.crediswap.crediswap",
"permissions": [
"com.android.vending.BILLING"
],
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/images/favicon.png"
},
"extra": {
"eas": {
"projectId": "0ee5007a-6158-4009-8d6a-72bc1cff029d"
}
}
}
}

 

 

The code I’m running is very simple:

export default function Products() {
const [product, setproduct] = useState<PurchasesProduct | null>(null);

useEffect(() => {
try{
const fetchData = async () => {
const products = await Purchases.getProducts(["test_coupom_1"]);
console.log(products)
setproduct(products[0] || null)
};

Purchases.setDebugLogsEnabled(true);
Purchases.setup(APIKeys.google);

fetchData()
} catch (error) {
console.log(error)
}
}, []);

if (!product) {
return <Text>"Loading..."</Text>;
} else {
return (
<View>
<Text>Identifier: {product.identifier}</Text>
<Text>Title: {product.title}</Text>
<Text>Description: {product.description}</Text>
<Text>Price: {product.price}</Text>
</View>
);
}
}

All I get is  this:
Array []

 

Ay help would be appreciate, I’ve tried everything over the past week and no luck so far


2 replies

Badge +1

Anyone any idea?

Badge +1

@Andy here is the new thread

Reply