Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Google play error: authentication required
Started by smithsun00 Mar 17 2015 10:43 PM

- - - - -
24 replies to this topic

Best Answer smithsun00 , 29 March 2015 - 07:15 PM

Ok, at last i manage to overcome this THING.

Rob, thanks for the help and sorry for the troubles, it was quite one of those things that are just easily overlooked, and it was

really a stupid thing of me to do so too. 

When adding items as an in-app purchases, I inserted only the id itself as the name of it, not including the package's name.

Meaning I wrote "fullversion" instead of "com.mydomain.myapp.fullversion".

I only realized it a moment ago after checking up on my former app i uploaded a year ago.

I do need to add one or two things:

-when trying to buy your own products the error given should be "the publisher can not make purchases~" and not "Authentication is required..." (I think it's important to notice that different)

-for other people who are having same error it is important to notice, most of the time it can be fixed by making sure:

       * to PUBLISH your app in an alpha mode.

       * to put the license given by the google developer console inside the config.lua, and insert the right permissions in build.settings.

       * to be patient. It takes several hours from when you publish your alpha version until everything is updated on googles servers.

       * to set all in-app purchases to "active" in the developer console, and write the exact FULL name of each of them.

-when checking errors on the 'adb logcat' we tend to think that many of the errors we see on the log are connected to the problem. well... they are not. almost 99% of them has nothing to do with the error. so it is very confusing, so try looking at your own code and upload to the console.

 

Again Rob, thank you for your time, very much appreciated.

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Hello

I am struggling pretty hard against a problem i came against about a month ago, and i still could not solve this.

Any help would be appreciated.

 

When using GOOGLE PLAY store plugin v3 (yes with all the necessary additional permissions in the build.setting page like :"android.permission.INTERNET", "com.android.vending.CHECK_LICENSE", "com.android.vending.BILLING", "android.permission.ACCESS_NETWORK_STATE", and more)

and with  this too:

 

 ["plugin.google.iap.v3"] =
        {
            publisherId = "com.coronalabs",
            supportedPlatforms = { android=true }
        },
        ["plugin.google.play.services"] =
        {
            publisherId = "com.coronalabs"
        },

 

I have several in-app purchases items the user can buy. Every time i am testing i get the following error on my device:

"Error: Authentication required..."

I tried almost everything, i just can't get passed this. I looked everywhere all over the internet and i saw things like: 'Publish your app as an alpha version', 'delete saved information that google play keeps on your phone and restart device'... Nothing works.

I tried later testing purchase using "google.testing.purchased", and this one returned the price and all, but still got my app stuck afterwards. I am using the simple code shown in corona's guide. what am i doing wrong? I tried changing corona daily builds, reinstall and nothing. still that authentication error.

 

Thanks ahead for reading this, I am desperate and my app is nearly ready. This is almost my last problem standing in my way.



[TOPIC: post.html]
#2

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @smithsun00,

You mention that you specified ".CHECK_LICENSE", but did you actually set up the licensing within your config.lua file?

 

Thanks,

Brent



[TOPIC: post.html]
#3

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Hey Brent

Yes I did. I followed carefully the guide for implementing the license check. in the config lua:

application = {
               
license =
       {
                    google =
                   {
                            key = "aVeryLongAppLicenseKeyHere", 
                    },
              },
        }
}
 
In the main.lua: (license check)
local licensing = require( "licensing" )
licensing.init( "google" )
 
local function licensingListener( event )
    local verified = event.isVerified
    if not event.isVerified then
        -- failed to verify the app
        print( "Pirates!!!" )
native.showAlert("Pirates!!! reported", {"Okay"});
else
native.showAlert("Ok you are a legitimate one", {"Okay"});
    end
end
 
licensing.verify( licensingListener )
 
I tried removing the license check (although i set the app on google to have a license key) from my app
and the same error message was shown.


[TOPIC: post.html]
#4

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Oh one more thing, you see the native.showAlert i used to check on device for confirmation...

well those alert never shown (not sure why...). Might it have something to do with that? 



[TOPIC: post.html]
#5

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @smithsun00,

The native alerts never show up, even for the "successful" Google test purchase? What do you mean by "my app stuck afterwards"? Do you see any error reports in the console/Terminal?

 

Brent



[TOPIC: post.html]
#6

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Thanks for your response Brent.

 

Here is a link of the screen capture of the logcat ( i dont know how else to upload it)

 

http://soriven.deviantart.com/art/test-521135707?ga_submit_new=10%253A1426752117

 

The app does not really get stuck, it is more that the error google play returns making some mess in the scene.

 

In short, it says something about purchase error(type=2 subtype=0) and

Unexpected response code 403 and untagSocket(74) failed with errno -22

 

It does not say anything to me, I hope you can make something out of it.



[TOPIC: post.html]
#7

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @smithsun00,

This error report does not seem to be related to Corona or its code, but then, I'm not an expert on diagnosing Android console dumps. :/

 

By chance, do you have another Android device to test this on? Perhaps there's some weird setting on that particular device which is causing a hangup?

 

You mentioned that it works with a test product, but that you still get this error report? But then, you say the app actually proceeds as normal (doesn't crash)?

 

Thanks,

Brent



[TOPIC: post.html]
#8

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

It does work, at least partially with test products, i mean it shows me the price window and when i buy or not, it does not do much and when i press it again it tells me i already own it.

 

We tried using the app and testing the purchases with real ID's but the same error happened there too.

I saw another Post regarding this exact error here on the forums, where someone said the problem just solved on it's own, because there was a delay from the time you publish the app to the time the app is fully functional through the google account, but I have tried it now for at least a month. Nothing changes. Here is the link:

http://forums.coronalabs.com/topic/53854-google-iap-error-authentication-is-required-huh/



[TOPIC: post.html]
#9

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @smithsun00,

I wish I had a better answer for you, but I'm not sure what is going on. Is your app actually published to market? Did you confirm that every product is set up correctly on Google's side? It certainly shouldn't take a month for something to change... perhaps a couple days at most.

 

Brent



[TOPIC: post.html]
#10

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Yeah I know. It is published but not on the market just as an alpha version right now so iI am testing everything.

However I am going to try checking this problem by publishing one simpler version of another app with no adds on. Just a plane and simple code with no licensing or ads or something that might be interrupting with the store's code.



[TOPIC: post.html]
#11

bgmadclown

[GLOBAL: userInfoPane.html]
bgmadclown
  • Contributor

  • 706 posts
  • Corona SDK

As far as I know, IAP v3 have problems working with the Google test items. You should publish an alpha version, give access to some test accounts (different than your developer account) and send them the alpha version link of your app (/testing/yourapp link).



[TOPIC: post.html]
#12

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Thanks bgmadclown, but I already done so.

It showed the same error, and besides the error I should be getting if the purchases worked is one like "the owner/publisher of the game can not make purchases", which is the exact error i get on mu other app running the earlier version of google play store plugin.

I will do some test with another basic app i made to see what might be the problem. I will let you know how it went when i am done.



[TOPIC: post.html]
#13

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Ok, so after so many problems working this out, nothing has changed.

Same error. I removed the license check, then returned it, I reinstall corona, tried talking to google support (which they told me it was a problem with my code probably, I don't buy it though...).

I did some digging through the internet and come up with a few of explanations:

- The build I make in corona somewhat turns out to have bugs due to java/android adk/sdk files problem on the computer. (which the solution for is try this in another computer).

- Using files or functions inside the code that are placed within an invalid folder or under unrecognized name. (I try solving this with a different simple app which gave the same error.)

- I have a problem on my phone regarding the owner user identity which the app or google can not determine, although i am logged in with my only e-mail account and the store works fine by itself.

- another app I have on google play using the old corona's store library, has start showing error in transaction when trying to buy the full version, which about a week ago worked just fine. (Does the old library going to lose it's support? should I upgrade?), so maybe there is a problem with my account? could it be?

 

So i have a couple of questions:

1- Is any of the possibilities i mentioned above, able to cause this kind of error ("authentication is required..."), when everything else works just fine, and the license is verified and the store is been called properly with no seemingly error before i press the buy button?

 

2- If I upload the project files to github, can anyone of you try building it and check if he gets the same error? This is the only way I can find out if The error is with some bad files on my pc, or the corona files just went bad?



[TOPIC: post.html]
#14

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,393 posts
  • Enterprise

Are you using your developer account to test or a different account?

 

Did you watch the video and check the links in my post here: 

 

http://forums.coronalabs.com/topic/53854-google-iap-error-authentication-is-required-huh/?p=280388

 

Rob



[TOPIC: post.html]
#15

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Yes Rob, I followed the video and did the same thing for like 3-4 times with no good results.

The account I am using is my own (developer account). That should give me error cause i can not buy my own products, but a different kind of error (the owner of the game can't make purchases~), no the one i am facing (authentication is required...).

Besides I made a friend of mine a tester (included his email in the google group which is connected to the game, he accepted and downloaded the game using the link), he got the same error as i did.

I tried making a build using my laptop, cause i thought that corrupted files may have some kind of influence over the build, but the results were the same.

I am really at a lose, and this put my whole project on a halt. 

I really can use someone who I can send the test project I made (really a simple one - just 2 scenes and 1 button that just make purchase) so he can test it himself. 

I doubt it has anything to do with the code, cause it just has the most simple code possible. 

 

the only Things with the code I did different compare with another app i uploaded a year ago are:

- using the old "store", library from corona. (is it possible that the new one is causing the problem?)

- moved from director to composer.

 

that old app i made worked fine until a few days ago when I could see the error ~"the owner can not make purchases...", and now all of a sudden it shows me no error but gives me the native.showDialog with (~error, there seem to be an error, please try again later), which is from the results: 'failed'.



[TOPIC: post.html]
#16

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,393 posts
  • Enterprise

Can you zip up your project, in particular if you have a simple test project and put it somewhere.  I'll look at it and compare it to code that was working and I'll rebuild an app of mine that does IAP  with Google 3 and see if I'm having the error.  I was but I did what the video said and it solved it using my test account, not my developer account. 

 

If you google that error, you will see many native developers get it too.  This isn't a Corona phenomena. 

 

Rob



[TOPIC: post.html]
#17

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Ok Rob, i zipped the project's files. You can find them here:

http://www.filedropper.com/myapp

thank you for your help.

Yes i saw many native developers ran into some sort of the same problem, but their error was temporary for some reason, due to google play publishing time, or they forgot to publish an alpha version of their app or something like that.

Say is there a chance that the problem lies whithin the build itself? i mean , does building in corona has any dependency on the java/android sdk/adk that is intalled on my computer?

Another thought would be, can there be a problem with my keystore file?



[TOPIC: post.html]
#18

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,393 posts
  • Enterprise

It's always possible that it could be your keystore or an issue with the build like licensing, keys and such.

 

EDIT:  I can't deal with a .RAR file.  Please use .zip.

 

Rob



[TOPIC: post.html]
#19

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

[TOPIC: post.html]
#20

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,393 posts
  • Enterprise

I didn't see anything obviously wrong with your code.  You do things a bit differently that I would, as I tend to put all my IAP initialization in main.lua and then have my purchase button do its work.  I can't really test your code.  But what I did is take a game of mine that's in development that has Google IAP v3 in it to see if there is an issue with the plugin.  My code worked as expected, so the plugin is functioning as expected.

 

This leaves either a setup circumstance with what's on your Google Play account, or perhaps a keystore issue, or you're running an older version code on your device than what Google Play expects.   I would suggest that just for fun you also try a test account and not your developer account.  Add some more print statements in and watch your "adb logcat".  I know it will be noisy, but your looking for Corona messages and Finsky messages.

 

I'm curious at what point your getting that message.



[TOPIC: post.html]
#21

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Thanks, I will try doing so, do you also use google 'licensing'? or do you just use their key to verify purchases?

I will be posting once I have somthing



[TOPIC: post.html]
#22

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Say Rob, can this error occur if for some reason java updated its version and corona is not using the 6th version anymore?



[TOPIC: post.html]
#23

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,393 posts
  • Enterprise

I suppose there is an outside chance this could happen, but I don't think this is the issue.  If anything, your app wouldn't install since the main impact is signing.  I'll ask engineering about it.

 

Rob



[TOPIC: post.html]
#24

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

Thanks, I appreciate it.



[TOPIC: post.html]
#25

smithsun00

[GLOBAL: userInfoPane.html]
smithsun00
  • Enthusiast

  • 87 posts
  • Corona SDK

  Best Answer

Ok, at last i manage to overcome this THING.

Rob, thanks for the help and sorry for the troubles, it was quite one of those things that are just easily overlooked, and it was

really a stupid thing of me to do so too. 

When adding items as an in-app purchases, I inserted only the id itself as the name of it, not including the package's name.

Meaning I wrote "fullversion" instead of "com.mydomain.myapp.fullversion".

I only realized it a moment ago after checking up on my former app i uploaded a year ago.

I do need to add one or two things:

-when trying to buy your own products the error given should be "the publisher can not make purchases~" and not "Authentication is required..." (I think it's important to notice that different)

-for other people who are having same error it is important to notice, most of the time it can be fixed by making sure:

       * to PUBLISH your app in an alpha mode.

       * to put the license given by the google developer console inside the config.lua, and insert the right permissions in build.settings.

       * to be patient. It takes several hours from when you publish your alpha version until everything is updated on googles servers.

       * to set all in-app purchases to "active" in the developer console, and write the exact FULL name of each of them.

-when checking errors on the 'adb logcat' we tend to think that many of the errors we see on the log are connected to the problem. well... they are not. almost 99% of them has nothing to do with the error. so it is very confusing, so try looking at your own code and upload to the console.

 

Again Rob, thank you for your time, very much appreciated.




[topic_controls]
[/topic_controls]