Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignIn Error #20

Closed
co-in opened this issue Apr 28, 2020 · 12 comments
Closed

SignIn Error #20

co-in opened this issue Apr 28, 2020 · 12 comments

Comments

@co-in
Copy link

co-in commented Apr 28, 2020

E/Error (13343): signInError
E/Error (13343): com.google.android.gms.common.api.ApiException: 4: 4:
E/Error (13343): at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source:4)
E/Error (13343): at com.google.android.gms.common.internal.zai.zaf(Unknown Source:2)
E/Error (13343): at com.google.android.gms.common.internal.zaj.onComplete(Unknown Source:6)
E/Error (13343): at com.google.android.gms.common.api.internal.BasePendingResult.zaa(Unknown Source:172)
E/Error (13343): at com.google.android.gms.common.api.internal.BasePendingResult.setResult(Unknown Source:131)
E/Error (13343): at com.google.android.gms.auth.api.signin.internal.zzj.zzc(Unknown Source:5)
E/Error (13343): at com.google.android.gms.auth.api.signin.internal.zzt.dispatchTransaction(Unknown Source:6)
E/Error (13343): at com.google.android.gms.internal.auth-api.zzd.onTransact(Unknown Source:12)
E/Error (13343): at android.os.Binder.execTransactInternal(Binder.java:1021)
E/Error (13343): at android.os.Binder.execTransact(Binder.java:994)
I/flutter (13343): PlatformException(error, 4: 4: , null)

@msarkrish
Copy link

msarkrish commented May 5, 2020

@Abedalkareem I'm also facing the same problem brother. I saw above stackoverflow answer. Whether i need to create Firebase project to solve my problem? because in the above answer the user using firebase in his project. I'm not using firebase in my application.

@msarkrish
Copy link

E/Error (13343): signInError
E/Error (13343): com.google.android.gms.common.api.ApiException: 4: 4:
E/Error (13343): at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source:4)
E/Error (13343): at com.google.android.gms.common.internal.zai.zaf(Unknown Source:2)
E/Error (13343): at com.google.android.gms.common.internal.zaj.onComplete(Unknown Source:6)
E/Error (13343): at com.google.android.gms.common.api.internal.BasePendingResult.zaa(Unknown Source:172)
E/Error (13343): at com.google.android.gms.common.api.internal.BasePendingResult.setResult(Unknown Source:131)
E/Error (13343): at com.google.android.gms.auth.api.signin.internal.zzj.zzc(Unknown Source:5)
E/Error (13343): at com.google.android.gms.auth.api.signin.internal.zzt.dispatchTransaction(Unknown Source:6)
E/Error (13343): at com.google.android.gms.internal.auth-api.zzd.onTransact(Unknown Source:12)
E/Error (13343): at android.os.Binder.execTransactInternal(Binder.java:1021)
E/Error (13343): at android.os.Binder.execTransact(Binder.java:994)
I/flutter (13343): PlatformException(error, 4: 4: , null)

@co-in if you solved the error please add here brother.

@Abedalkareem
Copy link
Owner

Can you please check this tutorial?
https://itnext.io/how-to-integrate-gamekit-and-google-play-services-flutter-4d3f4a4a2f77

also please make sure to update the plugin to 0.2.10

@msarkrish
Copy link

@Abedalkareem bro, i integrated by above article only bro. I implemented all the things mentioned in the above article.
In manifest file added two metadata and replaced appid in first metadata.
Added new game in Google play console.
Added debug key for my application bro.
Added games_services: 0.2.10 bro.

@Abedalkareem
Copy link
Owner

can you share your app manifest here?

@msarkrish
Copy link

msarkrish commented May 6, 2020

@Abedalkareem bro, i added Manifest file.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.krishna.app_name">
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
     calls FlutterMain.startInitialization(this); in its onCreate method.
     In most cases you can leave this as-is, but you if you want to provide
     additional functionality it is fine to subclass or reimplement
     FlutterApplication and put your custom class here. -->
<application
    android:name="io.flutter.app.FlutterApplication"
    android:label="app_name"
    android:icon="@mipmap/ic_launcher">
    <activity
        android:name=".MainActivity"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize">
        <!-- Specifies an Android theme to apply to this Activity as soon as
             the Android process has started. This theme is visible to the user
             while the Flutter UI initializes. After that, this theme continues
             to determine the Window background behind the Flutter UI. -->
        <meta-data
          android:name="io.flutter.embedding.android.NormalTheme"
          android:resource="@style/NormalTheme"
          />
        <!-- Displays an Android View that continues showing the launch screen
             Drawable until Flutter paints its first frame, then this splash
             screen fades out. A splash screen is useful to avoid any visual
             gap between the end of Android's launch screen and the painting of
             Flutter's first frame. -->
        <meta-data
          android:name="io.flutter.embedding.android.SplashScreenDrawable"
          android:resource="@drawable/launch_background"
          />
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    <!-- Don't delete the meta-data below.
         This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
    <meta-data
        android:name="flutterEmbedding"
        android:value="2" />
        <meta-data
android:name="com.google.android.gms.games.APP_ID"
android:value="*****************" /
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
</manifest>

@Abedalkareem
Copy link
Owner

Can you check if the key the app signed with is the same as you kept on google play console?
check here please, and make sure also the package id is the same
https://stackoverflow.com/questions/27609442/how-to-get-the-sha-1-fingerprint-certificate-in-android-studio-for-debug-mode

@msarkrish
Copy link

@Abedalkareem I Checked bro, Debug SHA is same.
I have one doubt bro, Whether i need generate release SHA and link that with Google play Console Game Services in Linked apps Tab?

@Abedalkareem
Copy link
Owner

please try this solution
flutter/flutter#33393 (comment)

@Pielgrin
Copy link

Hello @msarkrish have you found a solution to fix this problem ?

@xuanlocle
Copy link

After spending hours trying to figure out why android wouldn't work, it was because you instructed us to put the app id directly into the AndroidManifest.xml file instead of adding it through a string variable.
Add this in AndroidManifest.xml:

<meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/game_services_project_id"/>

And then create a strings.xml file here:

<!-- res/values/strings.xml -->
<resources>
<string translatable="false" name="game_services_project_id">123456788888</string>
</resources>

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

No branches or pull requests

5 participants