Loging in with Google Play Services

Hi

I’ve been trying to get Google services up and running on a test build, but I’m having problems signing in.
When I push the button running the signin code for the first time I’m prompted if I want to allow access etc. but the sign in still fails.

I’m following this guide:

Any ideas as to whats causing this?

Login code:

public void SignInAndStartMPGame() {
        if (! PlayGamesPlatform.Instance.localUser.authenticated) {
            PlayGamesPlatform.Instance.localUser.Authenticate((bool success) => {
                if (success) {
                    Debug.Log ("We're signed in! Welcome " + PlayGamesPlatform.Instance.localUser.userName);
                    // We could start our game now
                } else {
                    Debug.Log ("Oh... we're not signed in.");
                }
            });
        } else {
            Debug.Log ("You're already signed in.");
            // We could also start our game now
        }
    }

Excerpt from debug.log:

I/Unity   ( 3237):  [Play Games Plugin DLL] 10/21/15 18:15:04 +02:00 DEBUG: Appl
ication is pausing, which disconnects the RTMP  client.  Leaving room.
I/Unity   ( 3237):
I/Unity   ( 3237): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bugBindings.gen.cpp Line: 64)
I/Unity   ( 3237):
I/Unity   ( 3237):  [Play Games Plugin DLL] 10/21/15 18:16:54 +02:00 DEBUG: Appl
ication is pausing, which disconnects the RTMP  client.  Leaving room.
I/Unity   ( 3237):
I/Unity   ( 3237): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bugBindings.gen.cpp Line: 64)
I/Unity   ( 3237):
I/Unity   ( 3237):  [Play Games Plugin DLL] 10/21/15 18:17:02 +02:00 DEBUG: Star
ting Auth Transition. Op: SIGN_IN status: ERROR_NOT_AUTHORIZED
I/Unity   ( 3237):
I/Unity   ( 3237): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bugBindings.gen.cpp Line: 64)
I/Unity   ( 3237):
I/Unity   ( 3237): AuthState == Unauthenticated calling auth callbacks with fail
ure
I/Unity   ( 3237):
I/Unity   ( 3237): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bugBindings.gen.cpp Line: 64)
I/Unity   ( 3237):
I/Unity   ( 3237):  [Play Games Plugin DLL] 10/21/15 18:17:02 +02:00 DEBUG: Invo
king user callback on game thread
I/Unity   ( 3237):
I/Unity   ( 3237): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bugBindings.gen.cpp Line: 64)
I/Unity   ( 3237):
I/Unity   ( 3237): Oh... we're not signed in.
I/Unity   ( 3237):
I/Unity   ( 3237): (Filename: ./artifacts/generated/common/runtime/UnityEngineDe
bugBindings.gen.cpp Line: 64)
I/Unity   ( 3237):

I figured it out.
I thought it was enough to select the keystore through the browse menu. I was not aware that I had to select it from the alias menu as well.

alias menu? Where would that be again?

1 Like

I have already chosen the correct keystore in the alias menu in Publish Settings. I am still having the exact error you are

hi guys try this solution if others are not working

This might help

1 Like

Hey that’s just what I need, thanks a lot!!
My problem for “Application is pausing, which disconnects the RTMP client. Leaving room.” is that I was confused with the certificate fingerprint on Linked Apps when I just Build and Run my game instead of downloading from the uploaded internal test version.
If you upload your package using GooglePlay AppSigning, they will change your uploaded certificate for public distribution. So when I craeting game service for the first time it automatically uses their certificate instead my uploaded one. That’s why I can’t sign in because building straight from Unity is using my certificate and I have to create another game service and make sure using my certificate in order to do quick debugging…LOL