4

I have an app that uses in-app purchasses. I have integrated all the code from the Dungeons example except for the UI components. I have submitted my draft apk, activated it, created my in-app purchases, all of which are managed, and published them.

I am successfully able to purchase my in-app items and unlock the corresponding content without issue. The problem I am running into is that whenever I call to restore transactions, I get back the error code RESULT_SERVICE_UNAVAILABLE. I know that the result code means that the app can't access the store, but that makes no sense seeing as I can purchase items just fine.

I am running on an HTC Nexus One with Android v2.3.6 and Google Play v3.5.16. I am connecting over WiFi because there is no data plan for the device. The apk installed is exactly the same as the draft apk submitted. I am installing the apk via adb -d install command.

Any suggestions of what might cause this or where to look would be greatly appreciated.

Thanks

4 Answers4

4

if you find similar message in the log:

05-30 09:28:23.760: E/Volley(4636): [13] BasicNetwork.performRequest: Unexpected response code 429 for https://android.clients.google.com/vending/api/ApiRequest

it can mean that you've send too much RESTORE_TRANSACTIONS request in certain amount of time. Google has clearly some throttling on request. It happened to me during testing in-app billing, approx. 20-30 restore transactions request went ok, and then - exactly the same problem - service unavailable response.

Hox
  • 600
  • 6
  • 9
  • 1
    I had that problem. this morning for an error i issued many restore_transaction (i thinkt 50/100 in few seconds, and after half a day i still receive that error. How i can solve that problem? It is a temporary lock, or a definitive lock? And i need to create another item? – Ivan Jun 13 '12 at 15:00
  • Same question as Ivan ... any information about how long it will take for this error to go away? or what steps I can take to reset my API limit, or something? – Joel Martinez Jun 29 '12 at 15:49
  • It is temporary, only I can only tell that lockout is longer than 2-3 days and shorter than three weeks... I put it aside for some time and didn't test. Only solution is propably to wait, although request to google support may help or clear the matter. – Hox Jun 29 '12 at 16:52
1

Check logcat output, maybe there are some warnings there. Other than that, not 100% sure that RESTORE_TRANSACTIONS works with unpublished apps and test accounts. Maybe 'service unavailable' simply means 'not supported' in this case?

Nikolay Elenkov
  • 52,576
  • 10
  • 84
  • 84
1

I had this same problem, and it turned out that the password on the primary gmail account on the device was wrong. So when I checked if billing was supported, I got RESULT_OK, but for restore purchases, I got RESULT_SERVICE_UNAVAILABLE.

Go into your gmail or any google apps and refresh. Double check that the account password is correct and try again.

This problem also shows up in logcat as

NotifyingErrorListener.onErrorResponse: Server error on InAppPurchaseInformationRequest: com.android.AuthFailureError: User needs to (re)enter credentials

M Dapp
  • 1,453
  • 16
  • 31
1

This does mean that you've done too many RESTORE_TRANSACTIONS and the service won't be available for X number of days unfortunately, as I hit the same issue.

BUT... It is device specific, so if you start testing again on another device or factory reset your device, you should be able to avoid it.

Eurig Jones
  • 8,226
  • 7
  • 52
  • 74
  • I can confirm that doing a factory reset will stop this from happening. – dell116 Oct 23 '13 at 18:34
  • I can also confirm that calling RESTORE_TRANSACTIONS with an unsigned apk will cause RESULT_SERVICE_UNAVAILABLE to be returned to the BillingReceiver as well. – dell116 Oct 23 '13 at 19:10