Closed paprikka closed 6 years ago
Seem to be running into the same issue, did you solve this?
I happen to have the same symptoms. When I try to start the app again, it crashes every time and I am unable to open my app.
02-17 12:27:05.040: D/CordovaPurchase(5484): Num SKUs Found: 1 02-17 12:27:05.040: D/CordovaPurchase(5484): Product SKU Added: andygreen.pro 02-17 12:27:05.040: D/CordovaPurchase(5484): init start 02-17 12:27:05.040: D/CordovaPurchase(5484): Creating IAB helper. 02-17 12:27:05.040: D/CordovaPurchase(5484): Starting setup. 02-17 12:27:05.040: D/IabHelper(5484): Starting in-app billing setup. 02-17 12:27:05.040: D/CordovaLog(5484): file:///android_asset/www/plugins/cc.fovea.cordova.purchase/www/store-android.js: Line 726 : InAppBilling[js]: setup ok 02-17 12:27:05.040: I/chromium(5484): [INFO:CONSOLE(726)] "InAppBilling[js]: setup ok", source: file:///android_asset/www/plugins/cc.fovea.cordova.purchase/www/store-android.js (726) 02-17 12:27:05.040: D/CordovaLog(5484): file:///android_asset/www/plugins/cc.fovea.cordova.purchase/www/store-android.js: Line 726 : InAppBilling[js]: load ["andygreen.pro"] 02-17 12:27:05.040: I/chromium(5484): [INFO:CONSOLE(726)] "InAppBilling[js]: load ["andygreen.pro"]", source: file:///android_asset/www/plugins/cc.fovea.cordova.purchase/www/store-android.js (726) 02-17 12:27:05.040: D/IabHelper(5484): Billing service connected. 02-17 12:27:05.050: D/IabHelper(5484): Checking for in-app billing 3 support. 02-17 12:27:05.050: D/IabHelper(5484): In-app billing version 3 supported for com.andygreen.AndyGreen 02-17 12:27:05.050: D/IabHelper(5484): Subscriptions AVAILABLE. 02-17 12:27:05.050: D/CordovaPurchase(5484): Setup finished. 02-17 12:27:05.050: D/CordovaPurchase(5484): Setup successful. Querying inventory w/ SKUs. 02-17 12:27:05.050: D/IabHelper(5484): Starting async operation: refresh inventory 02-17 12:27:05.050: D/IabHelper(5484): Querying owned items, item type: inapp 02-17 12:27:05.050: D/IabHelper(5484): Package name: com.andygreen.AndyGreen 02-17 12:27:05.050: D/IabHelper(5484): Calling getPurchases with continuation token: null 02-17 12:27:05.060: D/IabHelper(5484): Owned items response: 0 02-17 12:27:05.060: E/IABUtil/Security(5484): Base64 decoding failed. 02-17 12:27:05.060: W/dalvikvm(5484): threadid=29: thread exiting with uncaught exception (group=0x41590db8)
And then the crash itself:
02-17 12:27:05.070: E/AndroidRuntime(5484): FATAL EXCEPTION: Thread-24152 02-17 12:27:05.070: E/AndroidRuntime(5484): Process: com.andygreen.AndyGreen, PID: 5484 02-17 12:27:05.070: E/AndroidRuntime(5484): java.lang.IllegalArgumentException: com.smartmobilesoftware.util.Base64DecoderException: Bad Base64 input character at 0: 36(decimal) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.Security.generatePublicKey(Security.java:70) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.Security.verifyPurchase(Security.java:47) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.IabHelper.queryPurchases(IabHelper.java:864) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.IabHelper.queryInventory(IabHelper.java:562) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.IabHelper.queryInventory(IabHelper.java:540) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.IabHelper$2.run(IabHelper.java:635) 02-17 12:27:05.070: E/AndroidRuntime(5484): at java.lang.Thread.run(Thread.java:841) 02-17 12:27:05.070: E/AndroidRuntime(5484): Caused by: com.smartmobilesoftware.util.Base64DecoderException: Bad Base64 input character at 0: 36(decimal) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.Base64.decode(Base64.java:518) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.Base64.decode(Base64.java:446) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.Base64.decode(Base64.java:392) 02-17 12:27:05.070: E/AndroidRuntime(5484): at com.smartmobilesoftware.util.Security.generatePublicKey(Security.java:60) 02-17 12:27:05.070: E/AndroidRuntime(5484): ... 6 more
try some of the fixes in #103 it depends how you're compiling I think, i.e, eclipse, cordova cli, android studio. There seems to be a combination of fixes that works for each environment.
i too encounter the same error.. "Bad Base64 input character at 0: 36 ... " so it seems to be the same $BILLING_KEY problem :( [please fix this]
how can i try those workarounds suggested in this and all the other threads - i'm developing with intel XDK and i can't figure out how to add the downloaded repo as local plugin - do i have to compile it first or something like that? adding the plugin as it is throws an error when i try to build my game.
the only way for me to add the plugin is using the version from the "apache cordova plugin registry" but how would i apply one of those fixes then ?
thx in advance..
oke.. to add the custom (edited plugin) where i hardcoded my billing key i must not use the UI of intel XDK to add it (this will fail) i have to do it manually by creating a file named: intelxdk.config.additions.xml (it will automatically be included) and write the following code into it:
<intelxdk:plugin intelxdk:name="cc.fovea.cordova.purchase" intelxdk:value="cc.fovea.cordova.purchase" intelxdk:type="local">
<intelxdk:param intelxdk:name="BILLING_KEY" intelxdk:value="MIIBI.......DAQAB" />
</intelxdk:plugin>
now inapp purchases work
Have the issue of the app crashed after the a successful buy of a item. I have changed the billing_key are mentioned by valueerrorx.
Has anyone manage to solve this problem ? or is there any plugin that can works ?
I'm experiencing the same problem. Did anyone figure out a fix?
Hi Jacse, I fixed mine by editing the 'intelxdk:value=' to the package name or git repository representing the plugin intelxdk:value="https://github.com/j3k0/cordova-plugin-purchase"
Example: <intelxdk:plugin intelxdk:name="cc.fovea.cordova.purchase" intelxdk:value="https://github.com/j3k0/cordova-plugin-purchase"
/intelxdk:plugin
Hope this helps.
I found that you have to edit the billing_key_param.xml file inside the plugin folder with your billing key. I am using Visual Studio tools for apache cordova and this fixed a similar issue i had
I fixed mine by using the quick solution provided by @flexed in #123
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
After a successful purchase the app crashes (stack trace attached). We're using Cordova 3.6.3 with a Crosswalk template (crosswalk-cordova-10.39.235.15-arm).
It's a single item (non consumable) purchase. I'm using a separate test account, with real products (as opposed to static ones).