Jump to content
  • Advertisement
ph4ntomz

Algorithm Looking for help with Google Play Sign-In

Recommended Posts

Hi guys,

first of all, this is my first post and I don't know these forums very well yet. Please move this thread, if I posted in the wrong forums!

 

I am currently trying to integrate Google Play Services into my Unity Mobile Game and I've hit a wall. I just cannot get the login to the Google Play Services working, it always fails. In the game, the green Google Login box is showing up and doing its login animation, then it runs into the error case (login failed) with the following error in LogCat:

Spoiler

03-05 13:02:45.019: E/SignInAuthenticator(6500): **** APP NOT CORRECTLY CONFIGURED TO USE GOOGLE PLAY GAME SERVICES
03-05 13:02:45.019: E/SignInAuthenticator(6500): **** This is usually caused by one of these reasons:
03-05 13:02:45.019: E/SignInAuthenticator(6500): **** (1) Your package name and certificate fingerprint do not match
03-05 13:02:45.019: E/SignInAuthenticator(6500): ****     the client ID you registered in Developer Console.
03-05 13:02:45.019: E/SignInAuthenticator(6500): **** (2) Your App ID was incorrectly entered.
03-05 13:02:45.019: E/SignInAuthenticator(6500): **** (3) Your game settings have not been published and you are 
03-05 13:02:45.019: E/SignInAuthenticator(6500): ****     trying to log in with an account that is not listed as
03-05 13:02:45.019: E/SignInAuthenticator(6500): ****     a test account.
03-05 13:02:45.019: E/SignInAuthenticator(6500): ****
03-05 13:02:45.019: E/SignInAuthenticator(6500): **** To help you debug, here is the information about this app
03-05 13:02:45.019: E/SignInAuthenticator(6500): **** Package name         : com.bunjes.kjell.interal.test.omega
03-05 13:02:45.020: D/SamsungAlarmManager(4867): Cancel Alarm calling from uid:10029 pid :6009 / op:PendingIntent{fceca68: PendingIntentRecord{465fe38 com.google.android.gms broadcastIntent}}
03-05 13:02:45.022: E/SignInAuthenticator(6500): **** Cert SHA1 fingerprint: [RIGHT HERE IT SHOWS THE SHA1, WHICH MATCHES THE ONE FROM MY KEYSTORE]
03-05 13:02:45.022: E/SignInAuthenticator(6500): **** App ID from manifest : 367764999844
03-05 13:02:45.022: E/SignInAuthenticator(6500): ****
03-05 13:02:45.022: E/SignInAuthenticator(6500): **** Check that the above information matches your setup in 
03-05 13:02:45.022: E/SignInAuthenticator(6500): **** Developer Console. Also, check that you're logging in with the
03-05 13:02:45.022: E/SignInAuthenticator(6500): **** right account (it should be listed in the Testers section if
03-05 13:02:45.022: E/SignInAuthenticator(6500): **** your project is not yet published).
03-05 13:02:45.022: E/SignInAuthenticator(6500): ****
03-05 13:02:45.022: E/SignInAuthenticator(6500): **** For more information, refer to the troubleshooting guide:
03-05 13:02:45.022: E/SignInAuthenticator(6500): ****   http://developers.google.com/games/services/android/troubleshooting

This is my code in Unity to do the login:

Spoiler

    public void Show() {
        PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
            .RequestServerAuthCode(false) // don't force refresh
            .EnableSavedGames()
            .Build();

        PlayGamesPlatform.InitializeInstance(config);
        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesPlatform.Activate();

        m_loginView.Show ();
    }

    public void OnLoginButtonTouched() {
        m_loginView.DisableAll ();
        m_loginView.ShowSpinner ();
        Social.localUser.Authenticate((bool success) => {            
            if(success) {
                UnityMainThreadDispatcher.Instance().Enqueue(EnableLoginView);
                UnityMainThreadDispatcher.Instance().Enqueue(SwitchToPlayerPanel);
            } else {
                UnityMainThreadDispatcher.Instance().Enqueue(() =>
                    m_dialogController.ShowYesNoDialog(DialogController.DialogType.YES_NO, GameStrings.DIALOG_LOGIN_FAILED,
                    () => UnityMainThreadDispatcher.Instance().Enqueue(EnableLoginView), GameStrings.DIALOG_NO_BUTTON,
                    OnLoginButtonTouched, GameStrings.DIALOG_YES_BUTTON));
            }
        });
    }

I've looked through the net, but the solutions I found online are not working for me. Has anyone here experience with setting this up correctly? My project has come to a complete standstill because of this and I am in desperate need of help on this :(

I am using Unity 2017.4.20f2 and the plugin from Google is version 0.9.61

 

Best wishes

Share this post


Link to post
Share on other sites
Advertisement
This is usually caused by one of these reasons:
03-05 13:02:45.019: E/SignInAuthenticator(6500): **** (1) Your package name and certificate fingerprint do not match
03-05 13:02:45.019: E/SignInAuthenticator(6500): ****     the client ID you registered in Developer Console.
03-05 13:02:45.019: E/SignInAuthenticator(6500): **** (2) Your App ID was incorrectly entered.
03-05 13:02:45.019: E/SignInAuthenticator(6500): **** (3) Your game settings have not been published and you are 
03-05 13:02:45.019: E/SignInAuthenticator(6500): ****     trying to log in with an account that is not listed as
03-05 13:02:45.019: E/SignInAuthenticator(6500): ****     a test account.

 

 

Hi,

you are sure it's not one of those three reasons?

Share this post


Link to post
Share on other sites

Yes, I've checked all of the given info in the error multiple times. It matches and I'm a registered test account. The settings don't have to have the status "publishied", another guy tried to set it up and it worked for him without having it published. I tried it anyway, but didn't make a difference for me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!