mlkit-custom-image-classifier icon indicating copy to clipboard operation
mlkit-custom-image-classifier copied to clipboard

googlesignin exception

Open namdroid opened this issue 6 years ago • 9 comments

i have copied google-service.json to app folder:

Now i get exception at line in emulator and device: GoogleSignInAccount googleUser = await _googleSignIn.signInSilently();

Exception has occurred. PlatformException (PlatformException(sign_in_required, com.google.android.gms.common.api.ApiException: 4: 4: , null))

namdroid avatar May 26 '19 20:05 namdroid

I get a similar error.

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

Have been trying several things mentioned on stackoverflow for the same. But still no luck. Any help is appreciated.

viju85 avatar May 27 '19 01:05 viju85

Did you set the SHA-1 for your app? See more here: https://github.com/flutter/flutter/issues/25640#issuecomment-449589417

skotwani avatar May 27 '19 08:05 skotwani

Yes I tried that and ensured SHA-1 is added to the firebase console. Still it doesn't work. Anyone has this working?

viju85 avatar May 27 '19 16:05 viju85

i have setted own package name, generate new SHA-1, but no luck

namdroid avatar May 27 '19 20:05 namdroid

@viju85 @namdroid Make sure you create a new app on Firebase with the new package name you've decided to keep. While creating the app, add the SHA1 by running the following (more docs)

 keytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore

The password is android. Then copy/paste the SHA1 into the settings page in Firebase for your app. Lastly, remember to rebuild and reinstall the app.

prakhar1989 avatar May 29 '19 16:05 prakhar1989

@prakhar1989 thanks, but of course i did this step before like in other apps.

namdroid avatar May 30 '19 08:05 namdroid

hi @namdroid did find any solution ? I am also facing the same issue.

VickySalunkhe avatar Jun 02 '19 18:06 VickySalunkhe

@VickySalunkhe @namdroid I finally got it working by following this solution.

"You need to add support gmail in settings of firebase" https://stackoverflow.com/a/56286513/341617.

Hope this helps.

viju85 avatar Jun 03 '19 00:06 viju85

Thanks @viju85 for pointing it out! I'll add that part to the getting started steps.

prakhar1989 avatar Jun 03 '19 16:06 prakhar1989