j3k0 / cordova-plugin-purchase

In-App Purchase for Cordova on iOS, Android and Windows
https://purchase.cordova.fovea.cc
1.29k stars 529 forks source link

Ionic says plugin not installed when it is installed #934

Closed jkrysakowski closed 4 years ago

jkrysakowski commented 4 years ago

Hi,

I try to use the plugin in Ionic 5 but I'm getting warnings:

[ng] [console.warn]: "Native: tried calling InAppPurchase2.order, but the InAppPurchase2 plugin is not installed."
[ng] [console.warn]: "Install the InAppPurchase2 plugin: 'ionic cordova plugin add cc.fovea.cordova.purchase'"

Of course I installed the plugin.

$ cordova plugin list
cc.fovea.cordova.purchase 8.1.1 "Purchase"

I added some debug logs to node_modules/@ionic-native/core/decorators/common.js before the lines that prints warnings and I see that plugin reference is "store" and plugin instance created by calling pluginInstance = getPlugin(pluginRef) returns null.

Any ideas how to fix it?

jkrysakowski commented 4 years ago

Fixed by installing cordova-support-google-services plugin and putting google-services.json in platforms/android/app/src.

Here is an instruction how to get google-services.json: https://support.google.com/firebase/answer/7015592?hl=en

jrdmcgr commented 3 years ago

I am also having this problem, but when I tried to install the cordova-support-google-services plugin it says:

> cordova plugin add cordova-support-google-services
Installing "cordova-support-google-services" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 9.0.0, failed version requirement: <9.0.0
Skipping 'cordova-support-google-services' for android
Adding cordova-support-google-services to package.json

Also, it seems that this repo is deprecated: https://github.com/chemerisuk/cordova-support-google-services.

Is there a way to fix this for android >9.0.0?

ska-lbit commented 1 year ago

Any updates? when I use cc.fovea.cordova.purchase plugin, all are working perfectly. But after using cordova-plugin-purchase, plugin not installed error is firing.

mkeology commented 1 year ago

Hello, under the same spell on Android with the cordova-plugin-purchase :13.1.5

Native: tried calling InAppPurchase2.when, but the InAppPurchase2 plugin is not installed. Install the InAppPurchase2 plugin: 'ionic cordova plugin add cordova-plugin-purchase' error: "plugin_not_installed"

luarfaria commented 1 year ago

Same here:

[capacitor] [info] Found 4 Cordova plugins for android: [capacitor] cordova-plugin-facebook-connect@3.2.0 [capacitor] cordova-plugin-googleplus@8.5.2 [capacitor] cordova-plugin-purchase@13.1.5 [capacitor] cordova-plugin-vibration@3.1.1

Msg: Native: tried calling InAppPurchase2.register, but the InAppPurchase2 plugin is not installed.

ska-lbit commented 1 year ago

@luarfaria @mkeology I have resolved my issue by installing version 11 (cordova-plugin-purchase)

luarfaria commented 1 year ago

@ska-lbit It worked with version 11, thanks for the tip. Have a great new year! @mkeology please take a look with:
"cordova-plugin-purchase": "^11.0.0",

mkeology commented 1 year ago

Thank you for your replies and suggestion ;-)

I confirm "cordova-plugin-purchase": "^11.0.0" works, and with the lastest in-app-purchase-2 lib "@awesome-cordova-plugins/in-app-purchase-2": "^6.2.0". It just implies using the underlying com.android.billingclient:billing:4.0.0 for the moment.

Dev-Demons commented 1 year ago

"cordova-plugin-purchase": "^11.0.0" works well. Thank you everybody.

kurtiev commented 11 months ago

Seems like version 11 of "cordova-plugin-purchase" cannot be used on Android for the next 2 months. Play Market refers to deprecated billing API, take a look message from issue #1425, so this is not a solution anymore... =(

timenengwerda commented 10 months ago

Seems like version 11 of "cordova-plugin-purchase" cannot be used on Android for the next 2 months. Play Market refers to deprecated billing API, take a look message from issue #1425, so this is not a solution anymore... =(

Is there any update on this since Google's Billing Library 4.0.0 will be deprecated from 1 nov 2023 on

kurtiev commented 10 months ago

@timenengwerda Yeah, as you can see in version 13, it's using billing v5 https://github.com/j3k0/cordova-plugin-purchase/blob/master/plugin.xml#L127, So just use a newer version.

kgkg commented 10 months ago

@timenengwerda Yeah, as you can see in version 13, it's using billing v5 https://github.com/j3k0/cordova-plugin-purchase/blob/master/plugin.xml#L127, So just use a newer version.

@kurtiev Yeah, but the main issue with version 13 is that it's not working as you can read in this very thread.

kurtiev commented 10 months ago

https://github.com/j3k0/cordova-plugin-purchase/issues/1428#issuecomment-1598208196

bevinGithub commented 5 months ago

Hi guys lm on IOS and still using old version 11 which is not working anymore "cordova-plugin-purchase": "^11.0.0", "@awesome-cordova-plugins/in-app-purchase-2": "^5.45.0",

How can l resolve this in app purchase 2 on IOS with the version 13?. Yourr assistance will be much appreciated.

ShaneJohnsonCC commented 3 months ago

Has anyone solved this issue? @bevinGithub did you find a solution?

ska-lbit commented 3 months ago

Has anyone solved this issue? @bevinGithub did you find a solution?

https://github.com/j3k0/cordova-plugin-purchase/issues/934#issuecomment-1368220590

ShaneJohnsonCC commented 3 months ago

Has anyone solved this issue? @bevinGithub did you find a solution?

#934 (comment)

So your response is to downgrade to something from 2022?.... This plugin is still supported and kept up to date. How is there not a current solution?