1

yes everything is well set up in the firebase and flutter 1) added the latest SHA-1 fingerprint in the firebase project 2) enabled the google sign in option 3) added the supported email

the app is still in debug added the debug key SHA-1

nothing is working

I'm just trying to set up a simple Google Auth sign in which i couldn't

i'm getting this error

PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null)

`

final FirebaseAuth auth = FirebaseAuth.instance;
  final GoogleSignIn googleSignIn = new GoogleSignIn();

  GoogleSignInAuthentication googleAuth;


  Future<FirebaseUser> SignInWithGoogleAuth() async {

    GoogleSignInAccount GSA = await googleSignIn.signIn();
//I'm getting error here  ^^ at the above line code
     googleAuth = await GSA.authentication;
     AuthCredential credential = GoogleAuthProvider.getCredential(
      accessToken: googleAuth.accessToken,
      idToken: googleAuth.idToken,
    );
     FirebaseUser user = await auth.signInWithCredential(credential);
    assert(user.email != null);
    assert(user.displayName != null);
    assert(!user.isAnonymous);
    assert(await user.getIdToken() != null);
    final FirebaseUser currentUser = await auth.currentUser();
    assert(user.uid == currentUser.uid);
    print('signInWithGoogle succeeded: $user');
    return currentUser;

  }

Error:

SetAppTypeFace- try to flip, app = borse.coaching_app
V/Monotype(22482):     Typeface getFontPathFlipFont - systemFont = default#default

E/flutter (22482): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled 

Exception: **PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null)**


E/flutter (22482): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
E/flutter (22482): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:302:33)
E/flutter (22482): <asynchronous suspension>
E/flutter (22482): #2      GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:226:58)
E/flutter (22482): <asynchronous suspension>
E/flutter (22482): #3      GoogleSignIn._addMethodCall (package:google_sign_in/google_sign_in.dart:268:20)
E/flutter (22482): #4      GoogleSignIn.signIn (package:google_sign_in/google_sign_in.dart:339:48)
E/flutter (22482): #5      _StartingPageState.SignInWithGoogleAuth (package:coaching_app/pages/startingPage.dart:27:50)
E/flutter (22482): <asynchronous suspension>
E/flutter (22482): #6      _StartingPageState.GoogleImg.<anonymous closure> (package:coaching_app/pages/startingPage.dart:141:26)
E/flutter (22482): <asynchronous suspension>
E/flutter (22482): #7      _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:511:14)
E/flutter (22482): #8      _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:566:30)
E/flutter (22482): #9      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:166:24)
E/flutter (22482): #10     TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:240:9)
E/flutter (22482): #11     TapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:177:9)
E/flutter (22482): #12     PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:436:9)
E/flutter (22482): #13     PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:73:12)
E/flutter (22482): #14     PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:11)
E/flutter (22482): #15     _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:221:19)
E/flutter (22482): #16     _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:199:22)
E/flutter (22482): #17     _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
E/flutter (22482): #18     _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter (22482): #19     _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter (22482): #20     _rootRunUnary (dart:async/zone.dart:1136:13)
E/flutter (22482): #21     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter (22482): #22     _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7)
E/flutter (22482): #23     _invoke1 (dart:ui/hooks.dart:233:10)
E/flutter (22482): #24     _dispatchPointerDataPacket (dart:ui/hooks.dart:154:5)
E/flutter (22482):
Vedprakash Wagh
  • 3,595
  • 3
  • 12
  • 33
  • 1
    Possible duplicate of [Google Sign In error 12500](https://stackoverflow.com/questions/47632035/google-sign-in-error-12500) – André Kool Jul 16 '19 at 11:52
  • looked at this too before, did all the stuff and solution in that, still the same error – Harsh Borse Jul 16 '19 at 16:19
  • @HarshBorse see my answer, I'm pretty sure that's the same issue https://stackoverflow.com/questions/57012033/firebase-sign-in-googlesignin-onactivityresult-returns-result-canceled-with-r/57022055#57022055. Feel free to upvote if it's working for you =) – Xero Jul 17 '19 at 06:07

1 Answers1

0

I had this error ApiException: 12500 for a long time. I have tried everything:

  • remove my debugkeystore, recreate one
  • add a support email on the firebase console
  • change plugin versions
  • update google on my device

Nothing worked but looking for a solution I found:

I went to this page (https://console.developers.google.com/apis/credentials) Select your project from the list (top left). Then go to "Oauth consent screen"

I filled out the app's logo and link on the app's homepage and application's privacy policy link (with the project.firebaseapp.com), and then saved.

enter image description here

After that it was good. I believe the official documentation should be updated.

For more information visit this link enter link description here

batawenam
  • 31
  • 1
  • 3
  • Please read https://stackoverflow.com/help/minimal-reproducible-example. Also "enter link description here" is not a good format of your question. – Heinz Schilling Jul 26 '19 at 18:46