Google Play In-App Purchase returns error code -1008: null puchaseData or dataSignature

I am attempting to implement Google Play in-app purchase v3, after successfully implementing it in v2. However, every single time I attempt to purchase one of my real in-app products, I receive the following follow-up error:

IAB returned null purchaseData or dataSignature (response -1008:Unknown error)

This is coming from the class, line 452:

if (purchaseData == null || dataSignature == null) {
    logError("BUG: either purchaseData or dataSignature is null.");
    logDebug("Extras: " + data.getExtras().toString());
    result = new IabResult(IABHELPER_UNKNOWN_ERROR, "IAB returned null purchaseData or dataSignature");
    if (mPurchaseListener != null) mPurchaseListener.onIabPurchaseFinished(result, null);
    return true;

I have verified that a) my app is signed, b) the version of my app matches the draft version # on the Google Play store, and c) the user attempting the purchase has been added as a test user. I have tried this across 3 test accounts and 4 in-app purchase subscription types.

  • Should I be concerned about this error code?
  • Is this an issue confined only to non-production releases?
  • Will this affect my customers in the field if/when I release this version?
  • Can you really only test in-app purchase end-to-end once you actually published it live with IAB version 3? I realize I can use the android.test.purchased item type, and I have (it works), but I don't consider that a valid end-to-end test.

I had this problem myself. After a while I found what I did wrong. I was calling the wrong method on the IABHelper.

If you call mHelper.launchPurchaseFlow(...) with an SKU that is registered as a subscription on Google Developer Console it will result in the error: IAB returned null purchaseData or dataSignature (response -1008:Unknown error).

If you have a SKU that is registered as an subscription you have to use the method: mHelper.launchSubscriptionPurchaseFlow(...) instead.

Hope this helps.

I am developing Hybrid app using ionic-3. i'm attempting to implement Google Play in-app purchase using. However, every single time I attempt to purchase one of my real in-app products, Every time

error purchasing: iabResult: IAB returned null purchase Data or data Signature (response: -1008 unknown error)

if you get above error when you use launchPurchaseFlow() method and get this error check your product type. i was created subscriptions but i needed managed products for example Non-consumable product type. I mean be carefully about buying or subscriptions

E/IabHelper: In-app billing error: BUG: either purchaseData or dataSignature is null. D/google.payments: Error: Could not complete purchase D/CordovaActivity: Resumed the activity. I have added subscription products on google play console and I am testing it on android test version. When I call the buy method all the google play dialogs work fine.

For Cordova and Hybrid apps you need to use this.iap.subscribe(this.productId) method to subscription InAppPurchase.

Following are the code working fine for me:

 getProdutIAP() {
            .getProducts(['productID1']).then((products: any) => {
                // alert('getProdutIAP' + JSON.stringify(products));
            .catch((err) => {
                alert('Finished Purchase' + JSON.stringify(err));

    buy(products: any) {
        // this.getProdutIAP();
        // alert(products[0].productId);
        this.iap.subscribe(products[0].productId).then((buydata: any) => {
            alert('buy Purchase' + JSON.stringify(buydata));
            // this.sub();
        }).catch((err) => {
            // this.navCtrl.push('subscribeDialogPage');
            alert('buyError' + JSON.stringify(err));

    sub() {
        this.platform.ready().then(() => {
                .then((data) => {
                    console.log('subscribe Purchase' + JSON.stringify(data));
                    alert('subscribe Purchase' + JSON.stringify(data));
                }).catch((err) => {
                    alert('subscribeError' + JSON.stringify(err));

[Google.NTx86] ;SONY Sony Tipo %CompositeAdbInterface% = USB_Install, USB\VID_0FCE&PID_5170&MI_01 Finally I reconnected the Tipo to my PC, went for the manual driver search options during driver install, pointed it to the Google USB driver directory, and it installed the Google drivers successfully.

Stack Exchange network consists of 177 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

[ Natty] google-drive-sdk Google drive api read permission V3 By: user2251465 5.5; [ Natty ] windows Using port number in Windows host file By: aards 2.5 ; [ Natty ] php Make Request With PHP And Curl Using Proxy And Allow Cookies By: Atanas Atanasov 1.0 ;

Questions: I haven’t found an answer in my search, there are a few answers on SO but they didn’t work for me. I have 2 markers on the map and I am using LatLngBounds builder in order to let the camera zoom to the right zoom level to include them both.

  • THANK YOU! That was it. Google Play developer did reply but never got back to me with the solution. I owe you one (literally)!
  • I got the same error though i am using the correct item type and method. In-App purchases works, subscriptions not.
  • launchSubscriptionPurchaseFlow() method in turn calls launchPurchaseFlow() with itemType as 'IabHelper.ITEM_TYPE_INAPP'. So if you pass correct itemType in launchPurchaseFlow(), it makes no difference. I am using correct item type, but still getting the same error!!!!
  • Boom! So nice to see this answer, I was worried I'd be debugging this for hours.
  • Sree -- incorrect, launchSubscriptionPurchaseFlow() calls launchPurchaseFlow() with itemType IabHelper.ITEM_TYPE_SUBS.