New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getProducts always return null #124
Comments
@companytest1206 This should not happen. Could you please share more information? Such as your codes, your products status, os, devices, and etc. For in-app products configuration, please refer to blog. |
Here is my code.. async componentDidMount() { } My app status is in alpha mode. Using nexus 6 for debugging. |
@companytest1206 Your code seems fine. What about your product configuration in |
I have the same issue. |
I have the same issue but I get an empty array (not a null array, whatever that is supposed to mean). I posted about it here. |
@systemride @sanilcgs Could you please share the platforms you are having trouble with using |
I'm having trouble with this on Android 7.0 (running on an LG G6), developing on MacOS 10.13.4 @dooboolab |
Created my app using create-react-native-app package. For integrating in-app purchase I have detached my app. After that I integrated react-native-iap into my app. For me the issue is happened in both iOS and android. I am using Android Studio 3.0.1 and Xcode 9.3. @dooboolab |
According to this README of another library it should be possible to get the available products when running in a debug environment (not an Alpha/Beta release), is that correct? (I'm thinking it should be the same for this library as that probably is dependant on how Google handles the IAP). |
Another related question; should the SKUs be prefixed with the package name? In other words; is "unlock_premium" or "com.kimer.unlock_premium" correct in my code when the ID I have specified in Google Play Console is "unlock_premium"? |
@axelkennedal The SKUS don´t have any format, are totally customizables. In few words: "unlock_premium" or "com.kimer.unlock_premium" are correct. |
I understand that you can name a product ID however you want, but what I asked is what should go in my code if I chose the ID "unlock_premium" in Google Play Console (not whether I'm "allowed" to prefix it both in Google Play Console and in my code). You're saying that choosing the ID "unlock_premium" in Google Play Console should work together with both "unlock_premium" and "com.kimer.unlock_premium", correct? I think this needs to be stated somewhere in the README, because it's confusing. |
UPDATEIt is now working for me 😄! I tried a couple of things but I'm not sure what was key to getting it to work 🤔 This is anyways what I did:
|
@axelkennedal you must use any name, but you must use on Google Play Console> your application > Google Play store> in app products. And the SAME name you must use on source code. |
@dooboolab When I am trying to execute RNIap.buyProduct('*****') with my productID, I got the error message That item is unavailable. Actually my managed product is in active state. What will be the issue? I can able to list the product details using RNIap.getProducts(itemSkus). Do I need to add the license key into my app?? |
@sanilcgs could you tell me which platform you are facing error? |
@dooboolab I am facing the issue in android platform and developing on MacOS High Sierra (10.13.4) |
@dooboolab Yes I'm using '0.3.23'. My problem is now with RNIap.buyProduct('*'). I got this error 'Error: That item is unavailable.'. Currently I have released my alpha version and published it to google play. I have already created my managed products and all are in active states. |
@sanilcgs I posted some help info for that in above issue. I will paste here again. Please check below.
1)Create sign apk for your application.
1)Don't use emulator for testing its does not support Billing Services. Read more: http://www.androidhub4you.com/2013/03/how-to-inegrate-in-app-purchase-billing.html#ixzz5DqRctVJp |
@dooboolab As I already said that my app is not released to production. Now I have released my alpha version only. So can I test this RNIap.buyProduct('****') with my alpha version or do I need to release my production for testing purchase??? |
@sanilcgs If you read above thoroughly, you should be aware that you do not need to release apk to production. Just alpha or beta is fine but your apk should be signed as explained. Check above once more and see what you are missing first. |
@dooboolab The do's and don'ts above are helpful. For noobs, this would be really helpful to explain in the documentation that you can only test this on an alpha/beta release and if you test this in a dev build on emulator, it will always return an empty array. I see no mention of that anywhere. I'm happy to add this in a pull request if you'd like? |
@systemride Any PR is appreciated! |
@axelkennedal did all those things, I'm still getting an empty array on iOS. Any ideas? |
@axelkennedal |
@JJMoon if you read my comments you would have known I'm on Android, not iOS. |
@axelkennedal being passive aggressive with the people who voluntarily spend their precious time trying to help you will not get you a long way. @JJMoon @dooboolab thank you for the great work |
@raduflp lol what are you talking about? I just pointed out that we are on different platforms |
@raduflp Thank you for your kind response and concern. I don't think @axelkennedal meant to be aggressive. He is just too overwhelmed using |
Try it. Work for me: "You need additionally add your testing account to another special list of accounts "Gmail accounts with testing access", you can find that on play account setting(not project!). On the page where you can see a list of your projects go to settings, and then on "Account details" page (scroll down, it's almost in the bottom of page) you will find the "Gmail accounts with testing access" list." Set up application licensing Go to your Play Console. |
I have integrated the react-native-iap and uploaded my signed apk to beta release on play store and also added one subscription plan. I am trying to get the list of subscription by subscription ID in debug mode which is always returning an empty array. Can I actually test the subscription in debug mode? |
@ShridharCodewave you use real device or simulator? |
@NarekChang I use real device and now somehow I am getting the subscriptions. |
are you able to get the subscriptions list in your debug build or you need to make a release build to test the subscription list |
getSubscriptions is returning an error right now on android "subscriptionOffers are required for Google Play Subscriptions" |
|
Did you figure out? I'm baffled by this. Why is so hard to retrieve a simple list of subscriptions? Do we need to publish the app, submitting a signed apk/aab, to TEST/IMPLEMENT our subscriptions? OMG, I almost can't believe it. btw, how you debug the apk from the play store? Am I confused or what..? |
I solved this problem, use hooks https://react-native-iap.dooboolab.com/docs/api-reference/hooks |
I just restarted the app and the issue got solved. |
@dooboolab I am receiving null array after calling getProducts method after prepare method.
The text was updated successfully, but these errors were encountered: