- Home /
Google Play Games plugin for Unity Not Authenticating
Using this plugin for my android game. https://github.com/playgameservices/play-games-plugin-for-unity
This is supposed to be simple enough >>>
Authentication
Score Submission
Show LeaderBoard UI
For some unknown reasons player can't authenticate. Authentication process neither fails nor succeeds. Just stuck in the 'authenticating' phase. Authentication UI doesn't show up. Did everything required from the Google Developer Console (like... adding tester ids, linking app, creating leaderboards and all that...)
Did this a month ago, worked then perfectly. Anyone else having this issue or it's just me doing something wrong.
I'm having the exact same issue. Just stuck in limbo, never returns as authenticated or not.
Update: Tried using PlayGamesPlatform.Instance ins$$anonymous$$d of the Social override and it doesn't help. Tried a bunch of other little things (like forcing a signout) and still have the same non-result (never returns a positive or negative result).
$$anonymous$$ake sure you're not trying to authenticate from the Editor. I did had the described issue to begin with, maybe this will help.
void On$$anonymous$$ouseDown()
{
if (playAudio)
{
this.audio.Play();
}
_stateObject.GetComponent<SpriteRenderer>().sprite = _loadingSprite;
//Social.localUser.Authenticate(ProcessAuthentiation);
Social.Active.localUser.Authenticate(ProcessAuthentiation);
}
void ProcessAuthentiation(bool success)
{
if (success)
{
_stat$$anonymous$$anager.usingGoogle = true;
Application.LoadLevel(levelToLoad);
}
else
{
Application.LoadLevel(levelToLoad);
}
}
udk_lethal_dose: Not seeing anything different using that. Doesn't matter how I call Authenticate, it always ignores the request on a device (no negative or positive result). In the editor, it at least responds (negatively).
I am currently facing this same issue. Any news on the topic? I get response while on unity editor but as soon as I take it to the android device Authentication seems to get stuck with no positive or negative values :S
Haven't checked recently, but they fixed this issue long ago as I was able to work it out back then. $$anonymous$$aybe it's broken again???
Answer by LOK · Sep 10, 2016 at 08:52 AM
Maybe you did not done one of next important but no obvious things):
1. Sign apk with key
2. Do not ".EnableSavedGames()" if you dont use it
3. Don't forget to add testers emails in google play console!
4. Install all required fatures from Android SDK Manager (Google Play Services, Android Support Library, Android Support Repository, Google Repository)
Wow thank you! Your step 3 helped me. I was so confused, because the login authentication kept popping up, but no message or error would happen, it just wouldn't log me in or let me choose an account to use. Turns out, since I use a different email for my personal Google Play account than I do for my developer console, I hadn't added the correct email to the list of testers. You helped a ton!
I love you bro. That 3 step $$anonymous$$df**ked me for 2 days!
$$anonymous$$ost people have this problem coz they have separate mail id for developer account and id with which they are logged in on android device Thanks Again!
Answer by MapuHoB · May 10, 2015 at 10:32 AM
CONDUCT UPDATES AT SDK MANAGER
The simplest and most stable solution in my opinion is go to SDK manager and conduct all the updates available. This worked for me after trying more than 30 solutions from all the forums available.
I have tried this, updated almost everything in SD$$anonymous$$ $$anonymous$$anager, but I still cannot authenticate. Please help me out. Thanks
Answer by Furry McTank · Jan 31, 2015 at 05:37 PM
I just used this plugin for my most recent Google Play game and the leaderboard works great:
(360 Samurai by Chunky Games, check it out --> it's free :)!
See a trailer here -- > https://www.youtube.com/watch?v=SVI2mwecU_w)
After importing the most recent package from the link in the question I simply added my Google Play Games ID in the menu option at the top and then wrote a script, something like the following, and attached it to a Gameobject in my first scene. I could then call the various functions using 'GPG.gpgInstance.{function_name()}' from the rest of my code.
using UnityEngine;
using System.Collections;
using GooglePlayGames;
public class GPG : MonoBehaviour {
static public GPG gpgInstance;
public bool signInTried; // Call this using if(GPG.gpgInstance.singInTried) ... to test whether or not user is signed in to GPG
void Awake(){
DontDestroyOnLoad (this.gameObject);
if (gpgInstance != null){
Debug.LogError("Multiple instances of GPG!");
}
gpgInstance = this;
}
void Start ()
{
PlayGamesPlatform.Activate ();
}
public void GPGSignIn()
{
Social.localUser.Authenticate ((bool success) => {
if(success){
signInTried = true;
}else{
signInTried = false;
}
});
}
public void ScoreToLeaderboard(long lscore)
{
Social.ReportScore (lscore, lboard, (bool success)=>{
if(success){
ShowScoreLeaderboard();
}
});
}
public void ShowScoreLeaderboard()
{
PlayGamesPlatform.Instance.ShowLeaderboardUI(lboard);
}
public void GPGSignOut()
{
if (signInTried) {
((PlayGamesPlatform)Social.Active).SignOut ();
signInTried = false;
}
}
}
Answer by Jun Hin · Apr 04, 2014 at 01:40 AM
https://github.com/playgameservices/play-games-plugin-for-unity/issues/81
I was having the same problems and the solution in this thread fixed it. The google-play-services-lib was updated recently and the classes in the jar files are looking for the old version.
They've provided an updated plugin here http://www.filedropper.com/googleplaygamesplugin-0901
Just FYI: This is still far from a plug-and-play solution. I still had to update various Android$$anonymous$$anifest.xml files to all say the same SD$$anonymous$$ number (worried that will cause problems on certain devices) and download android-support-v4.jar to put that in my Plugins/Android folder. Then after that, I still couldn't figure out what Android$$anonymous$$anifest.xml file voodoo I had to do to get get GPG to recognize the version number. At that point, I gave up. No GPG for my current game.
What steps did you go through when updating to the newer version of the plugin? And would you be able to post your main Android $$anonymous$$anifest for me? I still might be able to help.
Jun: I cleared all the GPG files from my assets folder, then re-imported the whole plug-in. That's when I got the manifest target sdk conflicts. Then I had to add android-support-v4.jar to the Plugins/Android folder (logcat showed something about that). Then it said it couldn't find a tag for the gpg version number (don't remember the exact name), but it was definitely in one of the 3 or so Android$$anonymous$$anifest.xml files. Also bear in $$anonymous$$d I also have the GameCircle plugin in the project (and that has its own Android$$anonymous$$anifest.xml that I had to use).
Still... they didn't update the plugin officially...
Yeah I know it's a bit of a pain that they haven't updated the plugin officially but at least someone has gone to the trouble of doing it.
Radiangames, would you be able to post the contents of your Android$$anonymous$$anifest.xml files as I requested, it would be easier for me to see the problem that way.
I'm not familiar with GameCircle, but if it's like other plugins you should be able to copy the activities from its Android$$anonymous$$anifest.xml and put them into the main manifest (the one in the root Android Plugins folder) and get rid of the GameCircle manifest file to help with any conflicts that might occur (just make sure to make a backup first).
Answer by dege · Jan 09, 2015 at 02:24 PM
For others that ended up with the same problem than me, having always returned loggin fail this issue had the solution that was to had my account as tester in Google Play Developer Console -> Game Services -> Testing.
https://github.com/playgameservices/play-games-plugin-for-unity/issues/225
hope it helps someone
Your answer
Follow this Question
Related Questions
Google Play Services Working, but not Working? 2 Answers
Unable to merge android manifests Google Play Games Services 23 Answers
Player is not authenticating - Google Play Games plugin for Unity not authenticating for android 2 Answers
Google Play Services Crashes Multiple Scene Game 0 Answers
Google Games plugin for Unity time synchronization 0 Answers