Google Play Services - Sign In results in absolutely nothing . .

Hey all,

So I have been recently trying to add Google Play Game Services to a project my buddy and I are working on.

I figured I would start with the sign in, as that is necessary for anything else that we wanted to add like achievements and leaderboards.
Anyway, I have published a closed Alpha to the google play store with my buddies dev and my own dev emails as the testers. I have set up my OAuth2 Client ID, SHA 1, AndroidManifest file, and other Game Services we are hoping for.

I then in Unity included the most recent Google Play Games Plugin (0.9.50), and set up the Resources and Client ID into our project. I of course have my Key and such for a Signed APK for our Closed Alpha test.

I then set up a button for Sign In within our scene, and have my code set up as follows:

    void Start ()
    {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
            .RequestEmail()
            .RequestServerAuthCode(false)
            .RequestIdToken()
            .Build();

        //DEBUGGING ONLY
        PlayGamesPlatform.DebugLogEnabled = true;

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.Activate();

        // Does nothing either . . . .
       Social.Instance.Authenticate((bool success) => { SignInCallback(success); }, false);
    }

    public void SignIn()
    {
        _signInNotification.text = "WARMER";

        if (!PlayGamesPlatform.Instance.localUser.authenticated)
        {
            _signInNotification.text = "SIGNING IN";
            Social.localUser.Authenticate((bool success) => { SignInCallback(success); });
        }
        else
        {
            PlayGamesPlatform.Instance.SignOut();

            _signInNotification.text = "OUT";
        }
    }

    private void SignInCallback(bool success)
    {
        if (success)
        {
            Debug.Log("(Something) Signed in!");

            _signInNotification.text = "Signed In as : " + Social.localUser.userName;
        }
        else
        {
            Debug.Log("(Something) Sign-In Failed!");

            _signInNotification.text = "Sign-In Failed!";
        }
    }

I have some text that lets me know what part of the code was accessed or run. The sign in button calls the SignIn() function, but only the text ā€˜WARMER’ is shown. The Social.localUser.Authenticate() function never seems to be called.

I have tried multiple solutions, changes, variations, etc. However when I click the SignIn button, absolutely nothing happens. No error, no warnings, no text saying Sign-In Failed, nothing.

Not quite sure what I am missing, any ideas would be greatly appreciated! :slight_smile:

Did you find a solution? I am at the same point. Did multiple restarts, following multiple tutorials multiple times. Seems like everywhere people point to either SDK problems, changing the API console certificate to the upload certificate, or adding testers. I have played with every possibility with the above. When running the alpha from build and run or through the app store, when I press connect, no google sign in pops up.

Same here
Im tired:(

Do find any sloution

hey same problem here i am about to dieeeee
nothing happens not even a glimpse of something someone pls find soln

jeez, is this just broken?

I’ve been at this for three weeks.

is there anyone out there with a successful Saved Game with google play?

I’m ready to punt. This is impacting our bottom line, where’s the instruction or even error messages?

Same thing here.

Even if I do something like this:

try
        {
            Social.localUser.Authenticate((bool success) =>
            {
                if (success)
                    ((PlayGamesPlatform)Social.Active).SetGravityForPopups(Gravity.TOP);
            });
        }
        catch (Exception e)
        {
            UIPrimeController.Instance.GoWarning(e.ToString(), 30f);
        }

where ā€œGoWarningā€ is my own tool for showing text on a mobile it shows nothing. It’s never called, so it’s not an exception. Something inside Authenticate method fails to even call an authentication routine and quits without ever calling a callback action :frowning:

I ran to the same problem. Plz help

Try to update your Google Play Games and Google Play Services (I mean on your device, the one you use to test your application).

When i use admob and googleplaygames service plugin i got error while buliding
I got this mssage
Win32 error pipe broken path

Try update your JDK

  • PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
  • .RequestEmail()
  • .RequestServerAuthCode(false)
  • .RequestIdToken()
  • .Build();
    • //DEBUGGING ONLY
  • PlayGamesPlatform.DebugLogEnabled = true;
    • PlayGamesPlatform.InitializeInstance(config);
  • PlayGamesPlatform.Activate();

Change to:
PlayGamesPlatform.Activate();

Just it, it works for me.

1 Like

I exported the project in to android studio and built from there. Now it is working fine. I dont know what causes the problem.May be something wrong with the unity gradle build.
BTW thanks for the reply

Hi,

I’m reviving this old topic because I am having the exact same issue OP is having and I have done everything OP has mentioned. And also there does not seem to be any solution posted yet.

I have the signin functionality attached to a button but clicking on it does absolutely nothing… the OAth box doesnt show up, nothing happens.

does anyone know how to fix this?

Thanks

I had exactly same issue on last year.
After call authenticate function, nothing happened, even no error log.

And now it’s solved!
But I don’t know what was the problem exactly bcuz I tried many things together.
There is just what i did.

1. Updated Unity version to 2019.2.12f1
I started my project with 2017.3.1. My problem started here.
To try to fix it, I updated to 2018.2.3 but still not solved (It was last year)
Few days ago, I suddenly wanna try to fix it again so I updated to 2019.2.12 again. (Current version)
version 2019.2 recommend you to include JDK, SDK, NDK, Gradle in Unity then I did.
It takes long time to install everything again.

2. Updated GPGS version to 0.10.6
I deleted old one and imported new one.
https://github.com/playgameservices/play-games-plugin-for-unity

3. Linked app twice and Create Three of OAuth 2.0 client IDs
On Google Play Console - Game Service - Linked Apps page,
I linked my app twice using ā€œApp signing certificateā€ and ā€œUpload certificateā€.
(So created two of different OAuth 2.0 client IDs)
and in the Google API Console(https://console.developers.google.com/), I created credentials type of web application too.
I used it for Web Application ID (optional) in Google Play Game Setup in Unity.
So I got totally three of OAuth 2.0 client IDs.
I’m not sure if it’s right way to do but I just wanted to do everything what I can do to fix.

When I did until here, my problem still happened. Nothing changed yet.

4. Build APK when GPGSUpgrader error is not happened.
When I play my game in Unity debug mode, Sometimes GPGSUpgrader error appeared but not always.
This error occurred on ā€œAssetDatabase.Refresh();ā€ in GPGSUpgrader.cs
It happens sometimes and it disappears when I restart Unity.
After I restart Unity, I play my game to check if any error log appear.
When there is no error log, I build APK. Then it works!!

I’m not sure what is right way exactly but my problem solved with them.
I hope it can work for you too.

2 Likes

I seem to have issues with this:

PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
            .RequestServerAuthCode(false)
            .Build();
PlayGamesPlatform.InitializeInstance(config);
PlayGamesPlatform.Activate();

But this seems to work partially:

PlayGamesPlatform.Activate();
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
            .RequestServerAuthCode(false)
            .Build();
        PlayGamesPlatform.InitializeInstance(config);

But I guess because I call.Activate() before the config its not configured to return Server Authentication Codes and so it always returns null on

authCode = PlayGamesPlatform.Instance.GetServerAuthCode();

Has anybody an idea on how to solve this. Tried updating all libraries, force rebuild all dependencies …

I would appreciate any help.

Thx.

So, after around 6 hours trying to solve this I could connect and request the auth code (using RequestServerAuthCode on the builder) by changing the Client ID on the Google Play Games Setup plugin window in Unity for the one I created on the APIs page, the Client ID inserted there was the one for the Android Client instead of Web Client which was wrong. Using the Client ID of the Web Client credential (created on Google APIs page) and hitting Setup did the trick.

3 Likes

I am in a similar problem, When ever I build and run the app, it shows Connecting to Google Play Games but then nothing happens, neither it connects to PlayGames

After this, nothing happens.
I tried many tutorials but nothing works.

Did you check out adb logcat for more precise error messages?

I think this happens when you forgot to add your email account (used on your android phone) to the tester accounts on google play developer console and google play games services section