IAP Badger test purchase on Android in Closed Beta Test, Google or IAP Badger Error?

Hello

i have uploaded my app to Google Play store in a closed beta test to allow me to check my IAP is working correctly.

i have set up a test account as per Google.  i installed my App on an android device using my test account, everything works fine.

I press the button to perform my IAP and again everything looks good, i get the message “Contacting Google …”.

But then i get a error message about “authentication is required, you need to sign into your google account.” 

But i am signed in to my Google account (with my closed beta test account ID) on my android test device.  i even set my account settings to “never ask for authentication” for purchases to see if that would help but it did not. 

I am just wondering, is this a Google Play Error, as the error message indicates it is coming form Google Play or is there some issue in the IAP Badger using closed beta testing?

My App is working in the Apple store with the same IAP Badger codes. So it is a bit frustrating that i cannot perform my IAP test in android before publishing to production.

Any ideas are welcome.

Hi Bruce. I can’t speak for IAPBadger, but this is a very common problem for Google IAP. See:

https://www.google.com/search?q=%22authentication+is+required%2C+you+need+to+sign+into+your+google+account.%22&oq=%22authentication+is+required%2C+you+need+to+sign+into+your+google+account.%22&aqs=chrome…69i57j0l5.870j0j7&sourceid=chrome&ie=UTF-8

You should try some of the solutions offered and see if that solves this.

Rob

There are a couple of common mistakes when setting up Google IAP:

  • Make sure you are using the product ID correctly (should be same as what you’ve put on developer console)
  • Make sure you’ve activated the product on developer console before testing. It may take a while, so wait till it’s ready.

There’s no issue with using IAP Badger in closed beta testing.

This looks like an issue with either:

  • Your product IDs
  • Your device or account set-up

Also, as Bektur said, don’t forget that there will be a delay between you publishing an app to alpha/beta and those changes percolating around servers across the world.  I believe it can take up to three hours.

Simon

hello

my app is “published” in the developer console.  I even uploaded a second beta version which I updated onto my android device using play store, all this seemed to work perfectly. 

I then tried some of the link ideas Rob sent above, regarding resetting my google account but after resetting my google account something funny happened.  My App defaulted back to the first beta version even though the second beta version was the one currently in the Play Store and no matter how many times I uninstalled and reinstalled the beta version it still showed up as the first beta version, even though I had removed or deactivated the first version. This was super frustrating.  I am now in the process of uploading a third version for beta testing.

Actually I did mean to make sure activate in-app product not the app. By default it’s created in Inactive state so people often forget to switch it on.

hello

yes my IAP is set to Active in the Google Play store console. Now I have managed to get my App beta version updated also, and I am trying to test my IAP. 

I have now got past the “Google authentication error” thanks to Rob’s links which got me to reset my Google account for my device.

But now I have another issue, I press my “Buy” button, the IAP Badger starts and shows me that I am trying to connect to Google Play Store, but then it just sits there spinning forever and nothing happens until I give up and stop my App.

Again this may be an issue of the name of the IAP in my code using IAP badger and the name in the Google play store for my IAP.

in my code I have :

–Information about the product on the app stores

products = {    

–unblockApp is the product identifier.

–Always use this identifier to talk to IAP Badger about the purchase.

buyTheApp = {

–A list of product names or identifiers specific to apple’s App Store or Google Play.

productNames = { apple=“xxx.UnblockApp”, google=“UnblockApp”, amazon=“UnblockApp”},

–The product type

productType = “non-consumable”,

Set for Google store as my IAP name,

Now in the Google Store I have my IAP set as

Name/ID.

UnblockApp (mudmate_unblock)

so my question is what do I need to set my App code to?

google=“UnblockApp”

OR

google=“mudmate_unblock”

regards

Bruce

From your description, it should be  mudmate_unblock.

Simon

Hello Simon

ok thanks for that, I was having the same issue on the iOS Store until I changed my code to match the IAP product ID, which was suggested on another thread. And the Apple Store now appears to be working, in that I complete a dummy but which I was not able to see before. So looks good on the Apple Store

Now I have modified the Google name as you suggest above and I have just updated my android device with the new code and all is correct until I try to purchase,  I get the message "Contacting Google Store … please wait " but then all that happens is the spinning wheel just spins and spins, until I stop it.

is there any timeout limit that IAP Badger will try for? or can it respond with an error about “unable to find the [item]” or something to alert the user to what possibly might be wrong.  maybe I am missing something, but from your examples it all looks so simple and easy.

regards

bruce.

There isn’t a timeout for purchases.

If I were you, I’d hook up your device to your computer by USB, and use adb logcat  to view any error messages Corona is sending to the console from Google Play (check the forums/Corona’s page on debugging for the proper syntax).

IAP is one of things where every little thing has to be perfectly set up - and this will give you some insight into what’s going on.

IAP Badger isn’t infallible, but it is in a fairly robust state* - so if you’ve given it the correct product IDs, then the problem is more likely related to your console, device or account setup.

Simon

* I’m touching wood as a type this…

Simon,

ok I will try the connect phone to computer idea.

But this is frustrating as there are only 2 words I can see that Google has in the play store for my IAP and that is “UnblockApp” and “mud mate_unblock” and so far both of them fail to produce a successful purchase on my android phone under beta test.

I am sure I am not the first person to have this issue so I am wondering why google and apple are not addressing this issue to make the setting of IAPs more clear and define better error messages to alert developers to the possible source of the error.

regards

bruce

simon

when you say connect to my computer do you mean to my PC or Mac? because on the PC in Corona there is no option to build and copy to device for android. But in my Mac if I choose build for android there is an option to copy to my device.  this seems odd to me, why the PC version does not offer, copy to device option for android build.

It’s up to you how you build your app and install it on your device (you can do this a number of ways).

Once your app is on your device, you can connect it to your computer (PC or Mac) by USB and use adb logcat to read console messages being output by your app.  This is anything that gets output using the print command, alongside some other Corona intiialisation and diagnostic stuff.

To use adb logcat, I think you need the Android SDK installed.  If you google it for instructions, it will come up.

Simon

Simon 

ok I got adb logcat working and I ran it using my phone while running the App, but I did not get any messages about the App and contacting Google errors.

is there anything else I can try to figure out why my App just sits and spins at the purchase part in the google store, I am using the same code and the Apple Store processes my buy command.

Bruce

Hi again,

I’m not sure I’m afraid - there must be one little thing not right with the IAP setup in the console, account or device setup.  IAP is infuriatingly exact :frowning:

Simon

@bruceG

Perhaps it’s not IAP problem. It could be something wrong with your test account or play store app.

Have you tried to add another test account, test on other device or ask someone to test?

When you said you got adb logcat working, did you just run “adb logcat” or did you run “adb logcat Corona:v *:s”? If you did the latter, run it without the Corona:v *:s parameters.

That extra parameter says “Only show me messages generated by the Corona activity”. IAP runs in it’s own activity and you would be filtering out IAP messages. Of course running “adb logcat” by itself generates a bunch of noise. 

Rob

hello

i ran it with just adb logcat, and as you say i got lots of messages but nothing that seemed to be about IAP.

i have since run the test again after building a new version, but with out changing anything in the IAP code, i made some small changes to display text in the hope of seeing any error messages.

Anyway i got past the google spinning at the contact stage and got as far as seeing the IAP message to buy the App for xxx $. so it seems to be working now in beta test.

Thanks for all the inputs.  if i have any other issues i will come back.

Hi Bruce. I can’t speak for IAPBadger, but this is a very common problem for Google IAP. See:

https://www.google.com/search?q=%22authentication+is+required%2C+you+need+to+sign+into+your+google+account.%22&oq=%22authentication+is+required%2C+you+need+to+sign+into+your+google+account.%22&aqs=chrome…69i57j0l5.870j0j7&sourceid=chrome&ie=UTF-8

You should try some of the solutions offered and see if that solves this.

Rob

There are a couple of common mistakes when setting up Google IAP:

  • Make sure you are using the product ID correctly (should be same as what you’ve put on developer console)
  • Make sure you’ve activated the product on developer console before testing. It may take a while, so wait till it’s ready.