AndroidInAppBilling icon indicating copy to clipboard operation
AndroidInAppBilling copied to clipboard

inappbilling.init() fails with a -1003 status code

Open muszek opened this issue 10 years ago • 2 comments

Update: solved (look at the bottom).

I'm running my app on two accounts on the same device: wife's (W) and my own (M).

Right now, I'm trying to run

inappbilling.init(
    function(resp) {
        console.log(resp);
    },
    function(resp) {
        console.log(resp);
    }
);

on W and this is what appears in the console:

Failed to query inventory: IabResult: Error refreshing inventory (querying owned items). (response: -1003:Purchase signature verification failed)

At the same time, with the same device and the same codebase, it works ok on the M account. It simply returns

OK

Additional notes:

  1. I have ran this code on W yesterday and it worked ok. I made a test purchase (and cancelled it in the google merchant panel).
  2. I'm trying to make a purchase on the W account in some other app and it seems to be working fine (I don't make the actual purchase, but I do get to see IAP billing popup window, so it's working).
  3. W is a test account (listed under "Gmail accounts with testing access" in Google Play Developer Console's settings page)
  4. Update #1: Tablet reboot didn't help.
  5. Update #2: Factory reset didn't help.
  6. Update #3: I tried a 3rd gmail account. Everything but the device (Nexus 7, 1st gen, Android 4.4.2) is different. I added this account to the list of test accounts. Everything was working fine until I made the first purchase... then got the same error - "Failed to query inventory: IabResult: Error refreshing inventory (querying owned items). (response: -1003:Purchase signature verification failed)" and wasn't able to init the plugin again.
  7. Update #4. I tried on another device (had to wipe my phone for that :/ ). Wouldn't init.

** Solved it! ** Turns out I forgot to re-insert my base64 key after I reinstalled the plugin. I went throught 10 hours of frustrating searching and trying everything, 2 wiped devices, 1 bucket of hair pulled from my head. I hope my daughter won't find out why I'm not with her on Sunday :/

@poiuytrez please consider moving the key outside of the code. For example, a competing plugin, Google's https://github.com/MobileChromeApps/mobile-chrome-apps/tree/master/chrome-cordova/plugins/google.payments keeps it as a key in www/manifest.json.

Any clue what might be the problem?

muszek avatar Apr 05 '14 14:04 muszek

Hi, what do you mean with "re-insert my base64 key after I reinstalled the plugin".

Which plugin? I added the base64 key from the app inside the google play console, and been able to buy one of my test items, until I buy one item and then...

Failed to query inventory: IabResult: Error refreshing inventory (querying owned items). (response: -1003:Purchase signature verification failed)

This is happening to me too.

danielgomezrico avatar Sep 19 '14 00:09 danielgomezrico

See http://stackoverflow.com/questions/14600664/android-in-app-purchase-signature-verification-failed

The solution from Robert works for me. Basically clearing the Google Play data.

sydneyhenrard avatar Feb 27 '15 20:02 sydneyhenrard