hakimrie / marketbilling

Automatically exported from code.google.com/p/marketbilling
0 stars 0 forks source link

queryInventoryAsync fails with "Purchase signature verification failed" #187

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The problem is that now I'm getting queryInventoryAsync fails with "Purchase 
signature verification failed" after some real purchase tests worked OK (test 
purchase without actually paying for the purchase).

Steps to reproduce:
1. Create an apk with billing support in manifest xml.
2. Save the apk as Draft on Google Play Developer Console (I'll use GPDC for 
short).
3. Create a product list (product type managed) with any number of products 
permitted by the GPDC.
4. Purchase the product items and consume them - purchase flow works fine until 
now.
5. Delete the apk from GPDC and all of the products from the list.
6. Create a new app in GPDC and upload the same apk (or same package name) and 
save it as Draft on GPDC.
7. Create a new product list for this app (Do not use any of the old SKUs from 
the previous product list.
8. Try to purchase any new items - purchase flow working OK after waiting for 
3-6 hours so that Google Play finishes processing the apk otherwise you will 
receive "product unavailable" errors.
9. Try to query inventory with `queryInventoryAsync` - ERROR: "Purchase 
signature verification failed".

In the LogCat from Eclipse ADT, one can see that queryInventoryAsync tries to 
return one of the old product items that was deleted, but it seems that the 
product is stuck at purchaseState:0 - purchased and can't be deleted/consumed 
so that is goes away forever (I do not need it anymore).
I already tried clearing the cache and data for Google Play Store and my app 
cache and data but the error still pops up as soon as I run the billing API 
code again.
The error in NOT related to the fact that the apk is saved as Draft in Beta tab 
on GPDC. The purchase works if you activate the products from the apk's product 
list, which I've done.
Does anybody know what can I do to avoid this error and to fix it?
A possible fix is changing the package name of the apk and republish it to 
GPDC, but this is out of the question because if the problem occurs for a 
published apk, this isn't a viable fix since all the users that already 
purchased the old app will be stuck with a malfunctioning app.

EXPECTED OUTPUT: ability to remove this SKU that causes issues which is no 
longer in the products list.

ACTUAL OUTPUT: ERROR query owned items failed.

AFFECTED ORDER IDS (IF RELEVANT): all new and valid SKUs

OS VERSION: 4.1.2

MARKET/MYAPPS VERSION: 4.6.17/1.0.0

DEVICE: Samsung Galaxy S II I9100

OUTPUT FROM ADB BUGREPORT ATTACHED:
(Note: The output from "adb bugreport" is required for all bug reports.)

NOTES:

Original issue reported on code.google.com by radian.d...@gmail.com on 26 May 2014 at 7:52