question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty Array after using getSubscriptions or getProducts (IOS)

See original GitHub issue

I’m currently having a problem when using this library related to the getProducts() and getSubscriptions() functions. They are not loading not products nor subscriptions. All in-apps has ready to submit status. It’s more than 24h since in-apps configured and got ready to submit status. In-App purchases capability enabled

Version of react-native-iap

I’m using version 6.0.6

upd. latest version (7.5.0) showing same behaviour

Version of react-native

I’m using version 0.66.1

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

Faced this problem on IOS. Android works well.

Expected behavior

initConnection(): Showing true as a result.

getProducts(): Getting the list of all active products registered on App Store Connect getSubscriptions(): Getting the list of all active subscriptions registered on App Store Connect

getProducts([id]) : Getting the requested product getSubscriptions([id]): Getting the requested subscription

Actual behavior

initConnection(): Showing true as a result.

getProducts(): Getting an empty array getSubscriptions(): Getting an empty array

getProducts([id]): Getting an empty array getSubscriptions([id]): Getting an empty array

Tested environment (Emulator? Real Device?)

I’ve tested both: Emulator and real device (including TestFlight app version)

Steps to reproduce the behavior

for 6.0.6:

  1. clearTransactionIOS()
  2. initConnection()
  3. flushFailedPurchasesCachedAsPendingAndroid() // used for android
  4. getSubscriptions([id]) or getProducts([id]) // with or without id array

for 7.5.0:

  1. initConnection()
  2. clearTransactionIOS() // also tested withoud this call
  3. getSubscriptions([id]) or getProducts([id])

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
Desintegratorcommented, Nov 8, 2021

the problem was due to not submitted tax form

1reaction
jblancohcommented, Oct 27, 2021

If you use iOS 15 update to the latest version (15.1), this worked for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

getProducts and getSubscriptions returns empty array #723
My code: const subscriptionSKUs = Platform.select({ ios: ['artistmonthly', 'artistannual'], android: [''], }); class Upsell ...
Read more >
React Native IAP getSubscriptions returns empty array for iOS
I am following this library to implement In App ...
Read more >
getSubscription method returns empty. - Apple Developer
I am creating an app with weekly subscription and trying to test it in my device and in iPhone 13 emulator. I am...
Read more >
How to use the react-native-iap.getSubscriptions function in ...
To help you get started, we've selected a few react-native-iap.getSubscriptions examples, based on popular ways it is used in public projects.
Read more >
Cannot get array of products / subscriptions #651 - Issuehunt
Platforms you faced the error (IOS or Android or both?) iOS and Android ... getProducts and RNIap.getSubscriptions always return empty arrays.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found