You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2026. It is now read-only.
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
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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
Beta Was this translation helpful? Give feedback.
All reactions