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

Sign-in Failed - Android #11

Closed
crearo opened this issue May 19, 2016 · 17 comments
Closed

Sign-in Failed - Android #11

crearo opened this issue May 19, 2016 · 17 comments
Assignees

Comments

@crearo
Copy link

crearo commented May 19, 2016

While trying to sign-in, I keep getting the following error.
E/SignInActivity: Google Sign In failed. Status{statusCode=unknown status code: 12501, resolution=null}, null
I suspect it's the GoogleSignInOptions requestIdToken() method causing the issue. I changed the string passed as the default_web_client_id to the credentials of server key auto generated in Google APIs credentials. That doesn't seem to work either.

Am I missing something, or doing something wrong?

@nicolasgarnier
Copy link
Contributor

@gkaldevrel could you have a look?

@gkaldev
Copy link

gkaldev commented May 19, 2016

@kroikie who worked on this component.

@niiapa
Copy link

niiapa commented May 21, 2016

Same error. Any headway?

EDIT: After several hours of looking for a solution, it turns out I had two debug.keystore files and I had tried with both SHA1 values but I dunno whether the app wasn't updating each time I switched. Anywho, the easiest way to find your actual SHA1 is to do what this video says: https://www.youtube.com/watch?v=m_9tk7ME4ZU

[Basically, in Android Studio, open the Gradle menu on the far right, open android-start from the drop down (refresh if nothing is showing), open Tasks, open android, double click signingReport. ]

Get your SHA1 key from there, and go create a new Firebase project and in the console, use that SHA1 key after clicked "Add firebase to Android".. follow the tutorial from there. Restart your device, and tadaa.

At least for me, it worked, and I'd been at it for hours.

@slotbite
Copy link

Well finally login , make a new project, after get the sha1 code in Gradle->Android-start->Tasks->singningReports, put the new google-services.json on src folder and uninstall app ..... Run the project! and voilà , happy coding!

@kroikie
Copy link
Contributor

kroikie commented May 25, 2016

@crearo is this still an issue for you. If so I would double check that you are using the correct SHA1 and package name for your project, also be sure that you are including the correct google-services.json file.

@crearo
Copy link
Author

crearo commented May 28, 2016

I'll try again in a couple days and update.

@crearo
Copy link
Author

crearo commented Sep 5, 2016

I completely forgot to close this! Yes, it worked, thanks a lot @slotbite, @niiapa 👍 I wrote a blogpost on this here. The real trouble is the different signatures - the one your app is signed with while debugging and the one you entered in the firebase console. Hope this helps!

@karol-202
Copy link

I have got the same issue: Google Sign In failed. I've tried setting SHA1 from signingReport in Firebase Console and updating google.services.json file but app still doesn't work.

@crearo
Copy link
Author

crearo commented Sep 12, 2016

Are you getting 12501 as the error code? If yes, and you've made sure the SHA1 keys, package names match, then that's odd. Could you double check everything's alright? If you haven't already, this blogpost might help.

@karol-202
Copy link

The blogpost you've written helped me a lot. I've generated new keystore and now it works! Thank you.

@jburgoyn
Copy link

I am confused about how the completed chat sample code works just fine without having to do any of the above? I downloaded the completed sample code, could run on both device and emulator and be able to log in with google just fine. And obviously the sha1 in the firebase project wouldn't match my computers sha1, so how does that work when it doesn't work when I follow these steps implementing into an existing project I have.

I was able to get it to work on my emulator by adding my sha1 to the fire base console project, however when I run on device I still get the Google signing failed error.

@lumleon
Copy link

lumleon commented Dec 9, 2016

I am also so confusing to run the app at Samsung S4 that at the beginning "class for com.google.firebase.auth not found." and end up "sign-in" not successful.

I tried to download the JSON file again but it still not work.

log:

12-09 23:28:35.697 5108-5108/? D/ResourcesManager: creating new AssetManager and set to /data/app/com.google.firebase.codelab.friendlychat-1/base.apk
12-09 23:28:35.727 5108-5108/? I/InstantRun: Instant Run Runtime started. Android package is com.google.firebase.codelab.friendlychat, real application class is null.
12-09 23:28:37.849 5108-5108/com.google.firebase.codelab.friendlychat W/art: Verification of void com.google.firebase.FirebaseApp.() took 101.837ms
12-09 23:28:38.830 5108-5225/com.google.firebase.codelab.friendlychat W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
12-09 23:28:38.900 5108-5225/com.google.firebase.codelab.friendlychat W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.

...

"12-09 23:29:19.069 5108-5108/com.google.firebase.codelab.friendlychat E/SignInActivity: Google Sign In failed."

@Divala
Copy link

Divala commented Dec 9, 2016 via email

@lumleon
Copy link

lumleon commented Dec 9, 2016

Hi, I had already update the the latest Google Play Services to Rev 38 and the Repository to Rev 40 . Then, I noted that SHA is required for Google Sign-in. So I updated the SHA and signed a release of the APK and installed the application. However, the situation is the same.

@Divala
Copy link

Divala commented Dec 10, 2016 via email

@lumleon
Copy link

lumleon commented Dec 10, 2016

yes, the Google sign-in method was enabled

@lukiee555
Copy link

pkg: /data/local/tmp/com.google.firebase.udacity.friendlychat
Failure [INSTALL_FAILED_MEDIA_UNAVAILABLE]

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