React-native-iap: RefreshItems No Purchases Found

Created on 31 Jul 2020  ·  3Comments  ·  Source: dooboolab/react-native-iap

Version of react-native-iap

4.5.0

Version of react-native

0.62.2

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

Get Items

Actual behavior

throw excepton RefreshItems No Purchases Found

Tested environment (Emulator? Real Device?)

Real Device

Steps to reproduce the behavior

Just only run

🙏 help wanted 🚶🏻 stale 🤖 android

All 3 comments

I have the same problem,
I have even submitted a beta release in android studio and it has been approved for over 4 days but still it is showing no purchases found (iOS working as expected).
How do we resolve this?

``` const initilizeIAPConnection = async () => { await initConnection() .then(async (connection) => { consumeAllItemsAndroid(); await getItems(); console.log('IAP result', connection); }) .catch((error) => { console.warn(IAP ERROR ${error.code}`, error.message);
});
};

const getItems = async () => {
try {
const subscriptions = await getSubscriptions(itemSkus);
console.log('Products', subscriptions);
setSubscriptions(subscriptions);
} catch (err) {
console.warn(err.code, err.message);
}
};
useEffect(() => {
initilizeIAPConnection();
}, []);

````

Try this.

I was able to resolve my issue with the above code

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings