68

I'm just finishing a game for android and I'm testing out the in app purchase functions. I'm sending testing using android.test.purchased

It was working fine until a few hours ago. But now when I click the "accept and buy" in google play, the store gives the error.

Google play error "Error while retrieving information from server [DF-DFERH-01]"

Does anyone know what this error means?

8
  • I get the same thing with my own app and the Dungeons test app. Wasn't happening last week.
    – Pooks
    Oct 10, 2012 at 8:11
  • I have got the same with the Dungeon Example and our ComicApp. Looks like an issue with in-app Billing?
    – cyriana
    Oct 10, 2012 at 10:10
  • Has it just started recently with you guys or is it a persistent problem?
    – user922220
    Oct 10, 2012 at 10:35
  • I'm using in-app billing as well and have been getting this error since yesterday. It was working just fine before then, and I haven't made any changes.
    – Kalina
    Oct 10, 2012 at 18:10
  • 1
    My wife is still seeing this issue and it looks like these posts were from 2012 but she has the 2017 Google Pixel 2. Removing the account or application cache did not work. Dec 28, 2017 at 4:45

14 Answers 14

51

Try this, as it solved in my case on a Samsung mobile phone:

1. Open the "Google Play" app and press the home button to return

2. Go to Settings → Applications → Manage Applications

3. Select the "ALL" tab, Search for "Google Play Store" and press it to open.

4. Press "Force stop"

5. Press "Clear cache"

6. Press "Clear Data"

7. Now Open Play Store and it will work normally.

If the above steps does not help then try the following as well:

1. Go to Settings → Applications → Manage Applications

2. Select the "ALL" tab, Search for "Google Services Framework" and press it to open.

3. Press "Force stop"

4. Press "Clear cache"

5. Press "Clear Data"
17
  • Worked! Adding these steps to our official in app troubleshooting guide... ;) This kept popping up now and again in early testing... I have to go look up exactly what the clearing data does. My cache was empty at the time (brand new device, Google Play never worked on it yet.) Mar 13, 2015 at 23:14
  • 1
    @Hunter Clear Data clears application db and other app related stuff resets Mar 14, 2015 at 6:39
  • @EhsanSajjad: Brilliant! New phone wouldn't connect and it was driving me mad. Thanks.
    – SaxDaddy
    Mar 21, 2015 at 23:30
  • 1
    Neither solution solved this issue on Samsung J6. :( Aug 4, 2020 at 20:47
  • 1
    @LittleBoxOfChicken Honestly I don't remember how I got it working. But yes eventually it did work for me. Oct 1, 2021 at 16:32
8

This is a reported bug with Google: Bug Report. It seems to be related with Google's servers and is very intermittent. IE, you'll notice how all the comments revolve around a few specific days. Haven't been able to fix it myself, but the one comment suggests trying the following:

  1. Shutdown your device.
  2. Remove your sim card.
  3. Turn on your device.
  4. Connect your device to a non-local (PR) server, like ATT, TMobile, Spring. If you have a friend ask for a wifi thetering.
  5. Open the Play Store.
  6. Shutdown and re-install the sim card.
  7. Turn on.

It seems this error is only related to the static responses from Google. Using real product IDs don't suffer from this problem.

Update: My answer here is pretty old and the InApp purchase library has changed quite a bit since. Refer to @Ehsan Sajjad answer instead.

2
  • 3
    Seems this error is only related to the static responses from Google. One things for sure, they sure do make this whole InApp purchasing system a pain in the butt to test with.
    – Ifrit
    Oct 16, 2012 at 18:41
  • 1
    I confirm that the problem was not observed when I switched to testing with the actual product ID instead of the static response test items.
    – Pooks
    Oct 17, 2012 at 2:34
8

It works for me.....

I went to the settings on my phone and deleted my gmail account then re-added and synced the account and it worked for me.

settings>accounts>delete account settings>accounts>add account>sync and follow screen prompts

hope it works for you, i was receiving the df-dferh-01 error as well and couldnt buy in app purchases and this did the trick

1
  • No luck with error [df-dla-15]. Deleted account manually, re-added, no luck :-\
    – marcolopes
    May 13, 2016 at 6:53
7

I had the same issue because of an incorrect product sku.

I was using android.test.purchase instead of android.test.purchased.

2
  • These kind of bugs can be the hardest bugs to solve. :)
    – Maxwell
    Mar 14, 2017 at 15:56
  • 1
    I facepalmed myself sometimes after your solution worked. Sep 16, 2017 at 14:26
2

Issue resolved after installing Google Play Services (NEVER needed them until now, removed because used too many resources on my Android 2.3), and do the following steps:

From Ryan Lestage on Google+:

  1. Clear data for the following apps:

    • Play Store
    • Download Manager
    • Google Services Framework
  2. Restart your phone.

  3. Fire up the Play Store app.
  4. Wait for the device to show again on the web Play Store. It will appear under Settings > Devices. It may take a half-hour to several hours to appear.

When your phone has shown up in the Play Store with the date registered as today's date, proceed with the next steps, but not before.

  1. Open Google Settings from your device's apps menu.
  2. Touch Android Device Manager.
  3. Uncheck Allow remote factory reset.
  4. Go to your device's main Settings menu, then touch Apps > All > Google Play services.
  5. Touch Clear Data. Note that this action doesn't remove personal data.
  6. Go back to Google Settings and select Allow remote factory reset.
  7. Restart your device.
2

In case of V5 Billing, the purchase must include setOfferToken(selectedOfferToken)

ImmutableList productDetailsParamsList =
    ImmutableList.of(
        ProductDetailsParams.newBuilder()
             // retrieve a value for "productDetails" by calling queryProductDetailsAsync()
            .setProductDetails(productDetails)
            // to get an offer token, call ProductDetails.getSubscriptionOfferDetails()
            // for a list of offers that are available to the user
            .setOfferToken(selectedOfferToken)
            .build()
    );

BillingFlowParams billingFlowParams = BillingFlowParams.newBuilder()
    .setProductDetailsParamsList(productDetailsParamsList)
    .build();

// Launch the billing flow
BillingResult billingResult = billingClient.launchBillingFlow(activity, billingFlowParams);

if selectedOfferToken is invalid we get the error mentioned.

https://developer.android.com/google/play/billing/integrate

To get the token one could use below code

ProductDetails productDetails;
String offerToken = "";
        if (productDetails.getSubscriptionOfferDetails() != null) {
            for(int i = 0; i < productDetails.getSubscriptionOfferDetails().size();i++) {
                offerToken =  productDetails.getSubscriptionOfferDetails().get(i).getOfferToken();
                if(!offerToken.isEmpty()){
                    break;
                }
            }
        }
1

suggestions of solving this problem is, If you already had installed app in your phone before downloading from google play.(obviously run from your code ) then first uninstal it. and then download and install app from google play . it worked for me .Thanks and regards.

1
  • This worked for me! Simply uninstall the app which is throwing this error and download it again from PlayStore Sep 4, 2016 at 15:29
0

It has to do with the new Play Store update.

Go to:

settings/apps/all/Google Play Store

Select Google Play Store and select uninstall updates - that should solve your issue. Open up play store and purchase your app or game select bill to Verizon or whatever phone provider you use then accept. Log in to your Google account and you're done. When you close out the play store it will update again to the latest version and will allow you to bill to account.

2
  • after uninstalling update Google Play Store goes and install them back again. The setting about auto-updating apps doesn't have any effect. Looks like the update already downloaded on the device so Google Play updates itself without asking. Could be a good thing to try otherwise, the problem definitely appeared after one of the updates
    – Leo
    Dec 10, 2013 at 17:07
  • Uninstalling the google play store updates does indeed work for me. For the few seconds until it updates again. Version 14.6.15-all [0] is the troublesome version for me. May 1, 2019 at 8:07
0

I had the same issue. Solved it simply; I have (2) google accounts linked to my Play Store. It just so happens that I installed "an" app from "account B", and I was trying to rate it from "account A". So, switched accounts, and voilá.

0

Nothing above made it work for me. The thing for me is that I was testing a subscription and i forgot SkuType.SUBS, changing it to INAPP for the reserved google test product fixed it.

0

In my case, this error message was displayed when I tried downloading an app from Google Play Store using a VPN. The download only worked when I disabled the VPN. Using a VPN, downloads were only working for the apps I downloaded previously.

This looks like a censorship from Google, which is really bad for the user experience and I hope they will stop this.

Fortunately I don't use Android on my smartphone, it was on my Linux laptop using Anbox or Android x86 in VirtualBox.

0

Tested on a Huawei P20:

  1. Uninstall (or disable) Play Store.
  2. Reinstall Google Play: (Source)

    1. Download the latest version of Google Play Store from APK Mirror.
    2. Install the app simply by opening the APK file.
  3. Restart device.

Note: before finding this solution, I followed the instructions from some of the other answers here: removed my Google account from my device and added it again, cleared data and cache from various google play apps. This may or may not be necessary; feedback is welcome.

0

Long press on Google play application

  • Select App info
  • Click on Clear Cache
  • Click on Clear app data

Now again click on Google Play app, It will work now.

0

Version 5, The error is caused because the OldPurchaseToken is invalid or the subscription has expired.

You need to check if the user has an active subscription and return the Purchase to get the OldPurchaseToken using the .queryPurchasesAsync(....) from the billingClient

Here's an example to restore the purchase.

  void restorePurchases() {

        billingClient = BillingClient.newBuilder(this)
                .enablePendingPurchases()
                .setListener((billingResult, list) -> {}).build();


        final BillingClient finalBillingClient = billingClient;
        billingClient.startConnection(new BillingClientStateListener() {
            @Override
            public void onBillingServiceDisconnected() {
            }

            @Override
            public void onBillingSetupFinished(@NonNull BillingResult billingResult) {

                if (billingResult.getResponseCode() == BillingClient.BillingResponseCode.OK) {
                    finalBillingClient.queryPurchasesAsync(
                            QueryPurchasesParams.newBuilder().setProductType(BillingClient.ProductType.SUBS).build(), (billingResult1, list) -> {
                                if (billingResult1.getResponseCode() == BillingClient.BillingResponseCode.OK) {
                                    if (list.size() > 0) {
                                        Log.d("Test1234",list.get(0).getPurchaseToken()); // This is the OldPurchaseToken
                                        prefs.setPremium(1); // set 1 to activate premium feature
                                        showSnackBar(btn_restore_fab, "Successfully restored");
                                    } else {
                                        showSnackBar(btn_restore_fab, "Oops, No purchase found.");
                                        prefs.setPremium(0); // set 0 to de-activate premium feature
                                    }
                                }
                            });
                }
            }
        });
    }

Not the answer you're looking for? Browse other questions tagged or ask your own question.