0

I've been working on an Android project recently which required me to implement Google Sign-In feature in one the activity using Firebase. There's this unusual problem that I'm facing:

Whenever I build the program on my Android phone the google sign-in works fine. Enabling me to sign in easily. (I commit my code to Github) Now when my mentor fetches the updated code from GitHub and builds the project on his phone, the Google Sign-In does not work i.e. he's unable to log in.

He gets the following error:

E/AuthUI: A sign-in error occurred.
com.firebase.ui.auth.FirebaseUiException: Code: 12500, message: 12500:
at com.firebase.ui.auth.data.remote.GoogleSignInHandler.onActivityResult(GoogleSignInHandler.java:109)
at com.firebase.ui.auth.ui.idp.SingleSignInActivity.onActivityResult(SingleSignInActivity.java:128)
at android.app.Activity.dispatchActivityResult(Activity.java:7317)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4436)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4484)
at android.app.ActivityThread.-wrap19(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1743)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6753)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

However, when I send him the APK build on my system it works fine on his device.

What could be the possible reason for this and how do I solve this problem?

Vikas Tomar
  • 69
  • 1
  • 2
  • 11
  • google-service.jason file is same on both side please check it – Yogesh Borhade Dec 20 '18 at 07:13
  • @YogeshBorhade Yes, I checked It's same. When I commit on GitHub, google-service.json also gets uploaded I guess – Vikas Tomar Dec 20 '18 at 07:20
  • check both files are same . – Yogesh Borhade Dec 20 '18 at 07:21
  • @YogeshBorhade Are they suppose to be same or different?? – Vikas Tomar Dec 20 '18 at 07:23
  • Possible duplicate of [Google Sign In error 12500](https://stackoverflow.com/questions/47632035/google-sign-in-error-12500) – Martin Zeitler Dec 20 '18 at 07:23
  • @VikasTomar if you are using it for one app then credentials should be same .. – Yogesh Borhade Dec 20 '18 at 07:25
  • @YogeshBorhade Can you be more specific about what credentials you're talking about – Vikas Tomar Dec 20 '18 at 07:29
  • @vikas tomar as we are using google authentication so for that they provide use one google-service.json file which should be same on every device , as you are uploading your code using github so may be there are chances that your file is not uploading properly.. so copy that file from your android studio and send it to another where code doesn't work Path for the file is :- Android Studio:-Project folder-> app-> google-service.json if it does not work .. then check link https://stackoverflow.com/questions/52645607/android-firebase-auth-failure – Yogesh Borhade Dec 20 '18 at 07:38

0 Answers0