Skip to content
This repository has been archived by the owner on Mar 27, 2022. It is now read-only.

Error: Failed to silent signin, trying explicit signin - com.google.android.gms.common.api.ApiException: 4: 4: #7

Open
d-apps opened this issue Jul 27, 2019 · 8 comments

Comments

@d-apps
Copy link

d-apps commented Jul 27, 2019

I am trying to test my project but when I call signIn method I get this error, I followed everything of this tutorial: https://github.com/flame-engine/play_games/blob/master/doc/signin.md

My app isn't published yet on Play Store, could it be the problem?

About meta-data, I am setting my appid directly, and I am confused about gms version, if i need to create @integers, and where etc...

meta

I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): Failed to silent signin, trying explicit signin I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): com.google.android.gms.common.api.ApiException: 4: 4: I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source) I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): at com.google.android.gms.common.internal.zai.zaf(Unknown Source) I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): at com.google.android.gms.common.internal.zaj.onComplete(Unknown Source) I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): at com.google.android.gms.common.api.internal.BasePendingResult.zaa(Unknown Source) I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): at com.google.android.gms.common.api.internal.BasePendingResult.setResult(Unknown Source) I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): at com.google.android.gms.auth.api.signin.internal.zzj.zzc(Unknown Source) I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): at com.google.android.gms.auth.api.signin.internal.zzt.dispatchTransaction(Unknown Source) I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): at com.google.android.gms.internal.auth-api.zzd.onTransact(Unknown Source) I/xyz.luan.games.play.playgames.PlayGamesPlugin( 9780): at android.os.Binder.execTransact(Binder.java:453)

I/flutter (11282): ERRO GOOGLE PLAY GAMES: Unexpected error Status{statusCode=INTERNAL_ERROR, resolution=null}

    void signIn() async {

    isLoading = true;

    SigninResult result = await PlayGames.signIn();
    if (result.success) {
      await PlayGames.setPopupOptions();

      //user = User(result.account);
      Account profile = result.account;

      print("NOME DA CONTA: ${profile.displayName}");
      print("hiResImageUri DA CONTA: ${profile.hiResImageUri}");
      print("iconImageUri DA CONTA: ${profile.iconImageUri}");

    } else {
      String error = result.message;
      print("ERRO GOOGLE PLAY GAMES: $error");
    }

    isLoading = false;
  }
@JankoLancer
Copy link

I have a same problem. Can anyone help?

@d-apps
Copy link
Author

d-apps commented Aug 23, 2019

Testing the "example folder" I got the same error.

@luanpotter
Copy link
Member

Man, configuring this play games thing is a hassle... I had to try for a long, long time to get it working, and I always got this error status=4 that has no description. I'd suggesting reading the tutorial over again to check if anything is missing. From what you said:

  • play_games_version must be generated by the gradle plugin you added. maybe print the value to see if it's correct?
  • need to be published? no, but, you need to configure testers and draft mode or something like that in order to work with unpublished apps.
  • did you sign correctly? normally that's the case! if not publish, you need to add your local dev key alongside the playstore key, those are two different keys. if the app is not signed, it is not going to work whatsoever!
  • IIRC, the example game here needs a key to work, I did not commit mine to git.

other than that, I'm clueless. but let's keep investigating and hoping that someday some google employee can help us out with better error messages...

@nils-dev
Copy link

nils-dev commented Dec 8, 2019

@luanpotter do you know where I need to configure the testers and the draft mode? Google Play Console?
And what do you even mean with draft mode, have I already set the draft mode up by following all of the steps in the tutorial?

For your third point, I just need to add the local dev key and playstore key in the settings of the firebase console or did I get something wrong?

@luanpotter
Copy link
Member

@astrophysik what I mean with draft mode and testers is the exact steps described in the tutorial... If you've done that, I really don't know, I put my best effort to try to make a complete guide on how to make this work, but docs on this are really terrible.

For the third point, no, I believe you need to add the local key and also the google play key from the google play console to firebase, because google play signs your app over your own key.

Other than that, I really don't know how to solve this error, I was gettiung 4:4 and error 10 for weeks until I figure out and documented everything I know in the tutorial section.

One alternative would be to use this other scoring system that my associate @erickzanardo has created: https://github.com/fireslime/firescore

It does not offer more than scoring & leaderboards though. Hopefully one day google can make our lives easier by commenting here with better instructions or tips.

@nils-dev
Copy link

nils-dev commented Dec 11, 2019

Wnated to let you know, it works for me now. I just downloaded the SDK Tools for Google play services in the SDK Manager in Android Studio. Just didn't have them before. Maybe you could add a sentence or two in the documentation about that.

@luanpotter
Copy link
Member

Good catch, @astrophysik! I assume you were using the emulator then, right? We should definitely add that note, do you want to put up a PR?

@TiagoDanin
Copy link

I had the same problem, I added credential via Google Play Console
image

That solved my problem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants