-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Android - Some devices unable to get product info, unable to place orders. #1613
Comments
Hi @EEETA, Im facing the same issue on android since Im using the cordova-plugin-purchase v13.11.1 only on android because for iOS it works well. The error that Im getting when I try to register products is “Product with this id not found” and it is very weird. The products are undefined everytime. I did all needed steps:
I use React Js and capacitor. |
I did research for many days, but I didn’t find anything to fix it. 😕 |
@john290n
CdvPurchase.store.register([{
type: CdvPurchase.ProductType.CONSUMABLE,
id: 'test-consumable',
platform: CdvPurchase.Platform.TEST,
}]);
const product = CdvPurchase.store.get('test-consumable, CdvPurchase.Platform.TEST);
alert(JSON.stringify(product)) You can try the final step,
As for my Redmi k50 being unable to retrieve products, I currently suspect it may be due to an update to Google services or require further iteration of the plugin. I still have not found a solution and am waiting for answers. |
Many thanks @EEETA, I will try to do all steps above! |
@EEETA I tried your steps but it is not working. These are the logs that Im getting on Android Studio:
The subscription seems to be active in Google Play Console And here is my code in React Js: |
Im testing it locally with Android physical device, by connecting it with Wifi on Android studio |
@john290n |
@EEETA I tried with TEST on web browser by running the React Js on web and Im getting these results: |
@john290n Don't forget to modify the id in store.get() as well after modifying the id in store.register(). |
@EEETA Yes, you're right, it worked on the web. However, how can I be sure that in-app purchases with subscriptions will work in production? When I tried using the product IDs I set up in the Google Play Console with the platform set to GOOGLE_PLAY, it wasn’t working. |
@john290n |
@EEETA So it means that my code is okay? Now if I want to try it out in Android physical device with Android studio locally I can just change the Platform.GOOGLE_PLAY, and the id of product? |
@EEETA Could you please provide me with a screenshot or an explanation of the steps you took to set up the Products/Subscriptions on your Google Play Console? |
@john290n
|
@EEETA Aha, so you created the product in the In-app products section and not under the Subscription tab. How do I use the license testing user when testing locally? Currently, I'm just logged in with this user on my Samsung Galaxy account. |
@john290n |
@EEETA, have you checked the logs? Are your logs similar to mine when the product with this ID is not found? I just want to make sure we’re experiencing the same issue. |
@john290n It's the same issue(unable to retrieve GooglePlay product information on Android), and the logs are similar as well, but I am using web chrome debugging, the only difference is that our product IDs and types are different. |
@EEETA, do you have any idea if this issue is going to persist? Are you considering switching to a different library? |
@john290n I'm not sure when this issue will be resolved. I'm trying to communicate with the plugin author but haven't received a response yet. I will continue waiting. |
@EEETA how can we verify that the products in the Google Play Console are OK and valid to use? |
@john290n It should be that after store.register, if you can get the product information and the status is normal, then it indicates it's available. But in the documentation for plugin v13, I didn't see any relevant description for the register part, I feel the documentation description is somewhat lacking. I confirmed this by setting the correct and incorrect ids. If the id is different from GooglePlay, it will be unable to get the product or prompt other errors. As for whether to verify the product is available, I can only initiate store.order(), there may be other methods provided by the plugin but I'm not very clear, this is also what I'm currently trying to figure out. |
@EEETA Yes, but I just set up the merchant account in the Monetize tab, and I created the in-app products. I’m not sure if there are any other steps needed. My app is in production, and all other steps are complete. |
@EEETA, I just noticed that my payment profile on the Google Play Console is not set up yet. Could this be the issue with the undefined products? |
@john290n Sorry, I'm not certain if you definitely need to fill in this information. But based on my search results and viewing previous issues, I found that many people said it's necessary to fill in the GooglePlay & AppStore information (including the original author) properly. So it's best if you configure it as well. |
@EEETA thank you, please let me know if you find something to fix the issue! |
@EEETA did you find any solution? |
You have to fill the Company Informations, the Financial Informations and have the App Version published as alpha/beta to the Stores. Then for development, you should keep the version that is released to alpha/beta for local development and testing. Once your Profile on Google and Apple Side are complete filled and accepted, you can "test" your in app purchases. Not before your have don it completely. And AGAIN: Fill all Documents that are required by Google and Apple - if not your will never be able to test your IAP. |
Hi @Dexus, I have completed the Payment Profile in Google Play console but Im still getting the same error 😕 (Product with id "1_month_premium" not found") |
Only on a specific phone or at all? Build system Cordova? PhoneGap? Ionic / Capcitorjs? |
@Dexus It is happening at all phones, yes Im using cordova-plugin-purchase v13.11.1, and I think that my app identifier is correct! |
@Dexus, are you available for a quick meeting? Your help would be greatly appreciated. 🙏 |
I’ve been trying to fix it for more than two weeks without success. |
@john290n Sorry, I've been busy with tasks these past few days. I have already completed the entire purchase process and made it compatible with Android and iOS phones, preparing to launch the product. Here are some thoughts that may help you:
|
Hi, @j3k0
I'm migrating my plugin from v11.x to v13.11.1 due to Google Play requirements (upgrading Play Billing from v4 to v7). I modified my old code based on the migration doc after upgrading the plugin library.
Observed behavior
For iPhone, product info can be obtained normally. However, for Android devices, some are able to get the info while others cannot.
Devices info and issues:
In China, phones cannot use Google services without rooting. But rooting may also remove some features and not be as full-featured as the original system.
I confirmed using same apk and product IDs. I don't understand why on the same phone(Redmi k50), the old version using the plugin v11 could get product and support placing orders, while the migrated new version can't get product info. If it's about product registration failure, then why the other two Android phones can get products normally?
Code
This issue has puzzled me for days. Please offer your help and answer my questions.Thanks.
The text was updated successfully, but these errors were encountered: