The signing fingerprint you specified is already used by another Android OAuth2 client

36,379

Solution 1

This error occurs when there is an existing SIGNING CERTIFICATE FINGERPRINT (SHA1) on Google Developers linked to a different account.

Solution is to delete the project that is using that SHA1 in console.developers.google.com for the old/incorrect project.

You cannot change the SHA1 fingerprint once it is set. Remember that deleting the project takes 7 days to completely remove it.

Another option is to delete the debug.keystore and generate a new one with:

keytool -genkey -v -keystore debug.keystore -alias androiddebugkey
-storepass android -keypass android -keyalg RSA -validity 14000

Remember you have to uninstall the app otherwise you get the [INSTALL_FAILED_UPDATE_INCOMPATIBLE] error.

Solution 2

The signing fingerprint you specified is already used by another Android OAuth2 client

I have to check every project and tried to find another Client ID configured with the SHA1 fingerprint and package name that i tried to configure, unsuccesfully.

At the end the solution was delete the client ID that i tried to edit and add again with the SHA1 fingerprint and package name, it worked for me:

https://console.developers.google.com/apis/credentials

enter image description here

Solution 3

It's late but worth. I have done the same mistake. I added a project to firebase in the wrong account then I deleted and try to add in another firebase account but I couldn't do it because the error indicates that the project is already registered. So it takes time to round about 5 to 7 days to completely delete.

Here is the step I followed to generate another sha1.

  1. Go to .android in my pc located. C:\Users\shahz.android.
  2. delete debug.keystore.
  3. rebuild android project.
  4. click on signing report (right side bar click gradle, app/task/android/siginingReport)

  5. you will get a new debug key with new sha1.

  6. register your app.

Solution 4

If you are using each firebase project for each env as I am, the below approach might be helpful.

In your build gradle, create new application id for each env:

productFlavors {
        dev {
            applicationId "se.abc.dev"
        }
        stag {
            applicationId "se.abc.stag"
        }
        prod
    }

On each firebase project, add a new project with corresponding application id with the same finger print. Remember to download the new google service json file since the application id was changed. The package name remains the same so it would not be a problem when uploading into google play. But for sure, I leave the prod flavor empty, so the package name and application id will be the same for prod release to avoid trouble.

Solution 5

I have faced same problem, its solution is very simple

Go to Console.developer and you can see some auto generated key created with this package. delete that package and add again sha key. hope you will got success. follow this link https://console.developers.google.com/apis/credentials?

Share:
36,379
Elena
Author by

Elena

Updated on February 02, 2021

Comments

  • Elena
    Elena over 3 years

    Some time ago I created an example project (lets call it "example project") with Oauth2 client id for android application in Google APIs console. I also added SHA1 fingerprint and package name (for example com.package.name).

    My mistake was that an application with same package name already existed. Now I need to create an Oauth2 client id for android application in the "valid project" with package name com.package.name and with SHA1 fingerprint which I added before. Obviously when I tried to add this fingerprint I got an error.

    The signing fingerprint you specified is already used by another Android OAuth2 client.
    

    After that I remembered about "example project" and deleted client id from this project. The problem is that I still not able to add this fingerprint for package name com.package.name. Client id is deleted but still I have the same error as above.

    So do I have a possibility to use this fingerprint for the same package name in another project?

  • Hari Krishnan
    Hari Krishnan over 8 years
    so if i want to run more than one app with a debug keystore then that is not possible? Should i use a production keystore in such situation ?
  • tread
    tread over 8 years
    No, you can use the debug.keystore for multiple apps
  • Hari Krishnan
    Hari Krishnan over 8 years
    Then each app have different debug.keystore? else all apps will produce the same SHA1 key right? its bit confusing for me. please explain
  • عثمان غني
    عثمان غني almost 8 years
    i am having problem in adding production sha1. even I used it never in google console.
  • Androidcoder
    Androidcoder about 6 years
    I don't see an option for deleting the whole client, although I'm concerned what would be the negative affects of deleting the API keys that are on the same page. Even redoing my project with different package names give me the same unusable deleted SHA1 in Gradle signingReport
  • Gene Bo
    Gene Bo over 4 years
    This worked nicely - no editing build.gradle or deleting firebase project or waiting days .. as other answers suggest. Big thanks for sharing here
  • javaxian
    javaxian almost 4 years
    This is the correct answer - neither waiting for several days nor resigning the app is required, just go to console.developers.google.com/apis/credentials and delete the corresponding OAUTH key.
  • javaxian
    javaxian almost 4 years
    Neither waiting for 7 days nor resigning the app is required, just go to console.developers.google.com/apis/credentials and delete the corresponding OAUTH2 key, as described here: stackoverflow.com/a/55618235/1033645
  • android developer
    android developer over 3 years
    I work on 2 apps with different package names and I still see this issue, as both of them have the same SHA1 value. How come?
  • Mohammad Zeeshan
    Mohammad Zeeshan over 2 years
    thanks its working and you saved my day brother.