Android Studio Assistant: No clients were able to be added to your Firebase project
Asked Answered
I

8

11

When using the the new (Firebase) Assistant in Android Studio to add new services I get this error:

Firebase

No clients were able to be added to your Firebase project for the following reasons: An app with this package name and SHA1 is already connected to a Google project. If you have used a Google API previously, please select that project in the Connect to an existing Project list.

On the Firebase console page I had selected the option IMPORT GOOGLE PROJECTS and then I continued on integrating the Firebase Services. But when I try to use the Android Studio Firebase Assistant to add more services I get the error above.

And I can't find this "in the Connect to an existing Project list" anywhere?

Innoxious answered 22/5, 2016 at 17:37 Comment(0)
I
7

It looks like the Firebase assistant in Android Studio at the moment only works when creating new Firebase projects and not updating existing connected Google Projects.

When selecting the IMPORT GOOGLE PROJECTS on the Firebase console page, it did autogenerate a new OAuth 2.0 client ID for the project credentials on the Google Developer console page. The project had an existing credentials for this, so maybe some conflicts there?

Deleting this new autogenerate credentials and creating a new project instead fixed the issue with the assistant and the message in Android Studio is now:

Firebase

Firebase project created and connected locally to module: app.

Innoxious answered 22/5, 2016 at 18:24 Comment(1)
You should accept this as correct answer. Helped me a lot, thanks!Sears
C
12

You can go to Credentials page of Google Cloud console and manage credentials of all your projects.

In my case, I needed to remove a credential that had caused the conflict (WARN: For caution, download it before removing it. Or just modify it).

If you deleted your firebase project recently (like me), see: https://mcmap.net/q/1014362/-how-to-recover-deleted-project-from-firebase-console.


See this for more information or other cases: An OAuth2 client already exists for this package name and SHA-1 in another project

Chammy answered 20/12, 2017 at 7:28 Comment(0)
I
7

It looks like the Firebase assistant in Android Studio at the moment only works when creating new Firebase projects and not updating existing connected Google Projects.

When selecting the IMPORT GOOGLE PROJECTS on the Firebase console page, it did autogenerate a new OAuth 2.0 client ID for the project credentials on the Google Developer console page. The project had an existing credentials for this, so maybe some conflicts there?

Deleting this new autogenerate credentials and creating a new project instead fixed the issue with the assistant and the message in Android Studio is now:

Firebase

Firebase project created and connected locally to module: app.

Innoxious answered 22/5, 2016 at 18:24 Comment(1)
You should accept this as correct answer. Helped me a lot, thanks!Sears
R
3

This happen to me, when I changed into prod Firebase (Google) account.

What happen is, I changed the package name and forgot to update the gradle file.

Under defaultConfig update the applicationId into your new package name.

Delete your current google-services.json and reconnect to your firebase (using Android Studio Firebase console)

If in any case you cannot delete your google-services.json, comment your Firebases dependencies on your gradle file then sync. Then delete it.

Take note, No clients were able to be added to your Firebase project for the following reasons: An app with this package name and SHA1 is already connected to a Google project. If you have used a Google API previously, please select that project in the Connect to an existing Project list. error happen when your applicationId is already connected to existing Firebase account. You do not necessary need to delete to previous Firebase account, just update your applicationID. This error almost made me jump into 50th floor. So save your self, if you run into this error ask here. Cheers mate.

Ranzini answered 12/12, 2017 at 2:36 Comment(0)
O
2

Solution for this problem:

1.- Delete you Firebase proyect

deleting...

2.- Change Android to Project and Delete JSON File

enter image description here

3.- In App Gradle delete...

apply plugin: 'com.google.gms.google-services' 

and sync project

4.- In Android Studio Go to -> Tools -> Firebase and open the asistant.

5.- Create new Firebase database and follow the asistant steps.

enter image description here

This steps keep off to the problem.

Ours answered 1/3, 2018 at 12:7 Comment(0)
R
1

This happened for me as well... I did this...

This happens when you have already logged your app to firebase account before... for that ... Best solution is No need to edit your existing project check whether you have signed in your application to another firebase account before .. Best thing you have to do is log other firebase accounts that you owned and check your project has been created from any other account, If it is there delete it and try to connect firebase again..

Reiner answered 13/9, 2019 at 3:26 Comment(0)
I
0

Firstly go to your Firebase projects settings in the firebase console. Remove everything under "SHA certificate fingerprints" and then try to reconnect to Firebase. This should work.Had the same problem and solved it.

Ixion answered 23/7, 2018 at 18:12 Comment(1)
Thanks @bimsina. I removed my the app from my existing Firebase app in the console, but am still seeing this message. Either it takes time to register, or I need to explicitly remove the SHA certificate somehow in the console.Agglomeration
J
0

It might be that your project was previously registered on a different account.

Go to Google Developers Console , under OAuth 2.0 Client IDs, check if your application id is there, delete it.

Joelynn answered 19/3, 2020 at 10:28 Comment(0)
P
0

The issue I faced was solved by changing the package name in the build gradle file in app level.

Prebend answered 13/12, 2020 at 12:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.