This repository was archived by the owner on Aug 4, 2026. It is now read-only.
Repository navigation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have a little problem. When I call fetchProducts to obtain the subscription product, an Error is prompted: "[RN-IAP] [fetchProducts] Failed: Error:" Unknown facebook::jni::JniException error.”
The following is the code
`
const {connected, subscriptions, fetchProducts, requestPurchase, finishTransaction} =
useIAP({
onPurchaseSuccess: async (purchase) => {
// Validate on your server, then finish
await finishTransaction({purchase});
},
onPurchaseError: (error) => {
if (error.code !== ErrorCode.UserCancelled) {
Alert.alert('Error', error.message);
}
},
});
....
const getPriceStepList = async () => {
const payId = 'premium_monthly'
console.log('intiBlb subs', payId, connected)
try {
const data = await fetchProducts({skus: [payId], type: 'subs'});
console.log(data);
} catch (error) {
Alert.alert('Error');
console.log(error);
}
}
`
it is the Dependency
All reactions