CyberedElf
CyberedElf

Reputation: 539

“The item you were attempting to purchase could not be found” Android in-app billing

I am receiving this error while testing my app.

The app is signed and uploaded to the alpha testing portion of the developer console.

The in-app item has the status "Active".

I have entered an account other than my developer account in "testing access".

I am using a device with the primary account in the "testing access" and not the developer account.

I have double checked the spelling of my SKU.

The exact same .apk was uploaded to Developer Console and installed on the test device.

I have double checked the license key.

I have waited more than 12 hours for SKU and testing accounts to be propagated.

Everything appears to work when I use android.test.purchased.

There are multiple questions concerning this error. Related links that got me this far include: https://groups.google.com/forum/#!topic/android-developers/A2RM4P34zo0

How to resolve “The item you were attempting to purchase could not be found”

"the item you were attempting to purchase could not be found" after following instructions

"the item you were attempting to purchase could not be found"

http://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test

Testing Android In-App purchases with unpublished apps

Android in-app purchase for alpha test mode

Error: the item you were attemping to purchase could not be found

https://stackoverflow.com/questions/23917264/item-could-not-be-found-in-app-billing-issue

In App Billing - product not found

Android billing - item not found

http://developer.android.com/training/in-app-billing/list-iab-products.html

http://www.techotopia.com/index.php/Integrating_Google_Play_In-app_Billing_into_an_Android_Application_%E2%80%93_A_Tutorial

Do test accounts require real credit card to purchase via In-app Billing?

What else can be causing this error?

One time I got past this point. My wife's phone and account are used for testing. It appeared to work after including her account to have testing access and waiting 3 hours. The item was found and it asked to verify her account password. I handed her the device, she entered the password, she said there was an error and closed the dialog. I do not know what that error was, and I have not been able to get back to that point. I am certain that the item was not purchased, because it does not show up on the owned list. After this, I used another device with another account and another 3 hours. The new device never gets anything other than the item not found error while using the active SKU.

Upvotes: 42

Views: 31367

Answers (5)

voytez
voytez

Reputation: 1842

In my case I didnt accept alpha tester invitation after adding my email address. You need to go to generated link in google play console and accept invitation.

Upvotes: 5

user3788120
user3788120

Reputation: 607

I am having significant trouble with the in-app-billing as well, but I found some pointer's from Stefan's blog here: https://www.gaffga.de/implementing-in-app-billing-for-android/ and found that he was using a special prefix "android.test" So for example, I create an sku in the developer console called "purchased" And then, use "android.test.purchased" in referencing it.

This worked for me to at least get the error message to go away. However, it may still be stuck in a test mode limbo.

Upvotes: 0

elt0r0
elt0r0

Reputation: 179

I was experiencing this issue and just chatted with Google's support via https://support.google.com/googleplay/android-developer/?hl=en#contact=1

and they said that I needed to publish the app. That meant adding screenshots, a description etc and then publishing (Clicking on the publish button in the upper right corner of the developer console). If your app is in the draft state, that could be the issue.

edit: This is now spelled out in the developer docs here:

http://developer.android.com/google/play/billing/billing_testing.html#draft_apps

Draft Apps are No Longer Supported

Previously, you could publish a "draft" version of your app for testing. This functionality is no longer supported. Instead, there are two ways you can test how a pre-release app functions on the Google Play store:

You can publish an app to the alpha or beta distribution channels. This makes the app available on the Google Play store, but only to the testers you put on a "whitelist". In a few cases, you can test Google Play functionality with an unpublished app. For example, you can test an unpublished app's in-app billing support by using static responses, special reserved product IDs that always return a specific result (like "purchased" or "refunded").

Upvotes: 14

A. Adam
A. Adam

Reputation: 3134

Had spend hours trying to test IAB, though few days ago it worked.

Here is the change ....

"Draft Apps are No Longer Supported Previously, you could publish a "draft" version of your app for testing. This functionality is no longer supported. Instead, there are two ways you can test how a pre-release app functions on the Google Play store:

You can publish an app to the alpha or beta distribution channels. This makes the app available on the Google Play store, but only to the testers you put on a "whitelist"."

@ http://developer.android.com/google/play/billing/billing_testing.html#draft_apps

Hope these crucial changes are emailed to developers saving hours..

Upvotes: 6

skullthug
skullthug

Reputation: 651

Had the same problem. I contacted as well and got this response from Google


Thank you for contacting Google Play Developer Support and reporting the behavior you're seeing with in-app billing.

We recently made some changes to our systems and we are now requiring an app to be published before testing. We are currently recommending to publish your APK to the Alpha channel in order to test licensing, in-app billing, and expansion files. There is no need to create a special testing group in the Alpha channel to test these features, however the app must be published and not in draft mode.

We apologize for the inconvenience and are working to update our documentation to reflect these changes.


After publishing my APK to Alpha (as I haven't launched yet) and waiting an hour or so, my IAP test purchases started working again.

Upvotes: 60

Related Questions