Android Studio upgrade and Google authentication

After few months, I downloaded my android application from GitHub to add some new features to that. I upgraded the SDK version and other dependencies. Strangely the google authentication using Firebase stopped working. Initially i thought the error was with version upgrades. One thing was not compatible with another libraries, or so. Fixed  “Google Play Service” upgrade issue on Pixel emulator. Wasted a whole day to identify the real issue was with SHA-1 certificate. When i started development, I was using my old machine and during the project setup, I added the SHA-1 certificate from first machine, to my Firebase project configuration. Now I was trying to work from another development machine. Unfortunately I missed adding the SHA1 key for this machine in the configuration. I found this error, when authentication status was finally showing “DEVELOPER_ERROR” (though i had other status before this).

If you are stuck in similar situation then try this:

  1. Status{statusCode=DEVELOPER_ERROR, resolution=null}
  2. In android studio: open Gradle (usually a panel on right side of the the IDE)
  3. [YourProject]>[YourProject]>Tasks>android>signinReport. Right click and click Run.
  4. Take the SHA-1 certificate and go your Project in Firebase.
  5. Click settings (next to Overview), click “ADD FINGERPRINT” and add your certificate key.