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?

Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160
user922220
  • 921
  • 2
  • 7
  • 7
  • 1
    I get the same thing with my own app and the Dungeons test app. Wasn't happening last week. – Pooks Oct 10 '12 at 08:11
  • 1
    I have got the same with the Dungeon Example and our ComicApp. Looks like an issue with in-app Billing? – cyriana Oct 10 '12 at 10:10
  • Has it just started recently with you guys or is it a persistent problem? – user922220 Oct 10 '12 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 '12 at 18:10
  • Hmm It started happening when I changed my public key to my own and switched off debug – Vic Vuci Oct 11 '12 at 15:12
  • @user922220 Yes, it just started recently. I didn't have that problem last week. In my case it is still possible to continue testing because the error only affects the RESPONSE_CODE for the request REQUEST_PURCHASE. All the other broadcasts generated by the purchase request still seem to come in normally. (Note: I am using the reserved product ID android.test.purchased for static testing). – Pooks Oct 12 '12 at 02:26
  • I'm not seeing the problem anymore so I guess Google fixed it. – Pooks Nov 02 '12 at 04:24
  • 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. – Henry Tseng Dec 28 '17 at 04:45

14 Answers14

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"
Ehsan Sajjad
  • 61,834
  • 16
  • 105
  • 160
  • 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.) – Hunter-Orionnoir Mar 13 '15 at 23:14
  • 1
    @Hunter Clear Data clears application db and other app related stuff resets – Ehsan Sajjad Mar 14 '15 at 06:39
  • @EhsanSajjad: Brilliant! New phone wouldn't connect and it was driving me mad. Thanks. – SaxDaddy Mar 21 '15 at 23:30
  • Worked for HTC sprint phone – Edward Falk Apr 09 '15 at 02:17
  • Worked on Nexus 7 2013, Thanks! – Binoj Antony Apr 15 '15 at 17:54
  • Also Worked on ASUS Phone – MilanPanchal Jan 10 '16 at 08:29
  • It worked for me! However couldn't get any logic behind it. – Dhaval Mar 15 '16 at 14:57
  • @Dhaval sometimes the application process or cache has some issues which causes the play store not able to connect, so clearing data and cache kind of restes the google play to as it was when you first time ran google play store app., so it kind of factory reset of google play store app – Ehsan Sajjad Mar 15 '16 at 16:30
  • I have error [df-dla-15] and this does not resolve. Tried all i could think off (problem just started this week without any change to the phone) – marcolopes May 13 '16 at 06:53
  • @marcolopes: Ty this - Simply uninstall the app which is throwing this error and download it again from PlayStore. This worked for me – rahulthakur319 Sep 04 '16 at 15:30
  • For Samsung Devices `Settings > Apps > Google Play Store > Force Stop` then `Settings > Apps > Google Play Store > Storage > Clear Data` – Ryan Williams Jul 28 '17 at 04:35
  • To make this work, I also had to clear the data of Google Services Framework. – kol May 08 '19 at 11:10
  • Please also add "Method 3: Resetting Google Account" from https://appuals.com/google-play-store-error-df-dferh-01/ if the above steps fail (which they might). – ikaerom May 25 '19 at 07:49
  • 1
    Neither solution solved this issue on Samsung J6. :( – Rohit Singh Aug 04 '20 at 20:47
  • @RohitSingh What a crazy coincidence. It worked on my Pixel 4a but also didn't work on my Samsung J6. Did you remember if you ever got it to work? Update: Just as I typed that I got it working. Switched to a hotspot hosted by my Pixel 4a, didn't work. Switched back to WiFi, worked. This is insane... – jari Oct 01 '21 at 12:49
  • 1
    @LittleBoxOfChicken Honestly I don't remember how I got it working. But yes eventually it did work for me. – Rohit Singh Oct 01 '21 at 16:32
  • Doing above steps didn't solved the problem instead a new problem is created. I am getting product list empty now. – primo Nov 22 '22 at 06:56
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.

Ifrit
  • 6,791
  • 8
  • 50
  • 79
  • 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 '12 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 '12 at 02: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

Baum mit Augen
  • 49,044
  • 25
  • 144
  • 182
RaviPatidar
  • 1,438
  • 1
  • 18
  • 29
7

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

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

Maxwell
  • 6,532
  • 4
  • 37
  • 55
Geekarist
  • 787
  • 9
  • 8
3

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;
                }
            }
        }
tanni tanna
  • 544
  • 4
  • 12
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.
marcolopes
  • 9,232
  • 14
  • 54
  • 65
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.

dnana
  • 171
  • 1
  • 3
  • 14
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.

Esti
  • 3,677
  • 8
  • 35
  • 57
Kevin
  • 1
  • 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 '13 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. – Lindsay-Needs-Sleep May 01 '19 at 08: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á.

Paul S
  • 21
  • 1
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.

Boldijar Paul
  • 5,405
  • 9
  • 46
  • 94
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.

baptx
  • 3,428
  • 6
  • 33
  • 42
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.

user3187724
  • 218
  • 2
  • 12
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.

Priyanka
  • 1,791
  • 1
  • 7
  • 12
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
                                    }
                                }
                            });
                }
            }
        });
    }