title: Android IAB 3 purchase signature verification failed
body: <p>I am getting this error: Failed to query inventory: IabResult: Error refreshing inventory (querying owned items). (Response: -1003:Purchase signature verification failed). Which is caused from result.isFailure() returning false:</p>
  
  <pre><code>// Listener that's called when we finish querying the items we own
      IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() {
          public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
              Log.d(TAG, "Query inventory finished.");
              if (result.isFailure()) {
                  complain("Failed to query inventory: " + result);
                  return;
              }
  
              Log.d(TAG, "Query inventory was successful.");
              MainActivity.this.inventory = inventory;
          }
      };
  </code></pre>
  
  <p>I am using the IabHelper from the sample code. I am using the license key for my application and I am using the new Developer Console Preview.  I have also waited about 4 hours.</p>
  
  <pre><code>02-05 16:16:18.158: D/IabHelper(7243): Billing service connected.
  02-05 16:16:18.158: D/IabHelper(7243): Checking for in-app billing 3 support.
  02-05 16:16:18.168: D/Finsky(7267): [3600] InAppBillingService.getPreferredAccount: com.onescreen.naturewindow: Account from first account - [NMkNGmwqV_NmltnM8wpDMymSozQ]
  02-05 16:16:18.168: D/IabHelper(7243): In-app billing version 3 supported for com.onescreen.naturewindow
  02-05 16:16:18.168: D/MainActivity(7243): Setup finished.
  02-05 16:16:18.168: D/MainActivity(7243): Setup successful. Querying inventory.
  02-05 16:16:18.168: D/IabHelper(7243): Starting async operation: refresh inventory
  02-05 16:16:18.168: D/IabHelper(7243): Querying owned items...
  02-05 16:16:18.168: D/IabHelper(7243): Package name: com.onescreen.naturewindow
  02-05 16:16:18.168: D/IabHelper(7243): Calling getPurchases with continuation token: null
  02-05 16:16:18.168: V/Wifi-Receiver(7243): You have wifi
  02-05 16:16:18.168: D/Finsky(7267): [3601] InAppBillingService.getPreferredAccount: com.onescreen.naturewindow: Account from first account - [NMkNGmwqV_NmltnM8wpDMymSozQ]
  02-05 16:16:18.168: D/Finsky(7267): [3601] InAppBillingService.getPreferredAccount: com.onescreen.naturewindow: Account from first account - [NMkNGmwqV_NmltnM8wpDMymSozQ]
  02-05 16:16:18.168: D/IabHelper(7243): Owned items response: 0
  02-05 16:16:18.178: E/IABUtil/Security(7243): Signature verification failed.
  02-05 16:16:18.178: W/IABUtil/Security(7243): signature does not match data.
  02-05 16:16:18.178: W/IabHelper(7243): In-app billing warning: Purchase signature verification **FAILED**. Not adding item.
  02-05 16:16:18.178: D/IabHelper(7243):    Purchase data: {"orderId":"968536977714379","packageName":"com.onescreen.naturewindow","productId":"4965353","purchaseTime":1352405691000,"purchaseState":0,"purchaseToken":"hzfiqciitiuwohxygvoiejxx.AO-J1OwDaTeQEtYrTcAX6SmSCNhrriCcBFUHqJHH-X3ILO0nXCBeoAP4NR1TA-4zbYwV5tCM7Apf5XtuVM5tYdD1Qa3v06sFdKlBXfTesZMPmA7v73hGEFdSvVoACzvVtKgbjtFAb_DQ"}
  02-05 16:16:18.178: D/IabHelper(7243):    Signature: J7BEM0slF+WjHcYtW4WPm8MQM3QHfloRFXPbkdQOaVaIuWRNcKohY8J46e1lVD/VAlzS/DQjhuVH+oH+YmSqYvTmUvtzoBRMiFejU+zs8zJ74MhPoz+TweZ0GLv5XIBViZi3YyKD3Ht/QJVk6gk4JmsMm88s27EZa/tZmA/09SJ1OiVYh9uXlENpX2U5wSUdd5VmLCdEmBwwGdZE/E3tN0ZTcewvcteukhl82XqIEt//Ag8sGcD/PPC1iNOT39h+ZxxExiMf4ds+G7IhEAHlxChCcAcCWbYbTMQSrrTMC40coxYfBh72wQkvWjMEDJaUc/YYTH0VjJ2qNh5PJuONLg==
  02-05 16:16:18.178: E/IABUtil/Security(7243): Signature verification failed.
  02-05 16:16:18.178: W/IABUtil/Security(7243): signature does not match data.
  02-05 16:16:18.178: W/IabHelper(7243): In-app billing warning: Purchase signature verification **FAILED**. Not adding item.
  02-05 16:16:18.178: D/IabHelper(7243):    Purchase data: {"orderId":"12999763169054705758.1340994679114311","packageName":"com.onescreen.naturewindow","productId":"4965354","purchaseTime":1354925460000,"purchaseState":0,"purchaseToken":"jdpbejopfmimosuoijjeqapb.AO-J1OwSnpLWGucDsEpQbO5ippAUS-HEiOJHCANVqH4iOCYv4h2J0xFWaNH2t3BntUKk9QQ7yc8PS8sGhJ19atZeB1_Lhf3BOCLbvUPPhJLQ6bAjexdDYUvk8JYDGhdqfgd8Z6ObKwkM"}
  02-05 16:16:18.178: D/IabHelper(7243):    Signature: d5v3Bxxc+e5k85f1PQAAExmwvu77P52o7mrG8Kw+VYmcxGSF/T77FziigKdx4bYQCHjO3nPJfQSjbh4r59mSH+X3G/GHrqRxqumpykFExDyQRl0c21beZBncZVAljMuW3hCs4Y7pcrsIalR8pZjDaZeOF9DdVxQAeQnd9ps5LutGjiSV6fjcetBd922mZErgUxE2AVo/q84wFcqckDjdG0WafsHkq4K/ax7IYENCvKD2yaVYMSagTMc8MzcghCOtBSrDSm0c1V4iZROt+13eYeLlAgJfQEluNMfq0FaqXWKoox0Ms3WV6gG73a883ixArrr8p68mOzhfStnXaxLlIw==
  02-05 16:16:18.178: D/IabHelper(7243): Continuation token: null
  02-05 16:16:18.178: D/IabHelper(7243): Ending async operation: refresh inventory
  02-05 16:16:18.248: V/PhoneStatusBar(544): setLightsOn(true)
  02-05 16:16:18.298: D/MainActivity(7243): Query inventory finished.
  02-05 16:16:18.298: E/MainActivity(7243): **** TrivialDrive Error: Failed to query inventory: IabResult: Error refreshing inventory (querying owned items). (response: -1003:Purchase signature verification failed)
  </code></pre>
  
  <p>Also when I try to purchase a managed item from the store, I get user is not allowed to purchase error.</p>
  
  <p>Edit. So I am looking through the code and was wondering if <code>String signature = signatureList.get(i)</code> was suppose to look like an array: <code>{"orderId":"968536977714379","packageName":"com.onescreen.naturewindow","productId":"4965353","purchaseTime":1352405691000,"purchaseState":0,"purchaseToken":"hzfiqciitiuwohxygvoiejxx.AO-J1OwDaTeQEtYrTcAX6SmSCNhrriCcBFUHqJHH-X3ILO0nXCBeoAP4NR1TA-4zbYwV5tCM7Apf5XtuVM5tYdD1Qa3v06sFdKlBXfTesZMPmA7v73hGEFdSvVoACzvVtKgbjtFAb_DQ"}</code></p>
  
  <p>Here is the line I am talking about. <a href="http://code.google.com/p/marketbilling/source/browse/v3/src/com/example/android/trivialdrivesample/util/IabHelper.java#758" rel="nofollow">http://code.google.com/p/marketbilling/source/browse/v3/src/com/example/android/trivialdrivesample/util/IabHelper.java#758</a></p>