Can I safely delete my new Firebase project without loosing my Android app?

5,678 views
Skip to first unread message

Uri Ishon

unread,
Jul 9, 2016, 8:04:42 PM7/9/16
to Firebase Google Group
Started to add Firebase to my app. For that, I had to add SHA1 configuration but got this error -

An OAuth2 client already exists for this package name and SHA-1 in another project. You can omit the SHA-1 for now and read more about this situation and how to resolve it 
So I followed up this link as proposed and got to the instructions that seemed to be relevant to my case (i.e., starting to add Firebase to an existing app):

If you just created this project or aren't very far into adding Firebase to your app, the simplest approach is to delete your project and instead import your existing Google project.

But, when I went ahead to delete my Firebase project, I got this scary message:

This is a permanent action. All apps contained within this project will also be deleted.

My app is in production! I cannot delete it! Is this message written just from a Firebase console perspective? Can I be sure my existing app (originally defined as a regular Android project) will NOT be deleted?

 

Vitor Bruno de Almeida

unread,
Jul 20, 2016, 10:55:40 AM7/20/16
to Firebase Google Group
Hi Uri,

Any updates on your issue? I'm facing the same problem as you

Jacob Wenger

unread,
Jul 22, 2016, 7:28:54 PM7/22/16
to fireba...@googlegroups.com
Hey Uri (and Vitor),

It's not clear exactly why you want to create a duplicate app with the same package name. It sounds like your existing app is already in production. If that is the case, you should definitely not delete your app, because you would lose all your data and users.

The Firebase console only allows unique pairs of package name and SHA-1 so it can identify data coming from the app. If you need to create a second app, you should really be using a different package name for the second app, and copy that in the build.gradle for it. The SHA-1 can be reused no problem as long the package name / SHA-1 pair is unique.

Would either (or both) of you mind explaining what you are trying to do so we can help you further?

Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/1b08b1a1-b67f-46c2-925d-0ea99c1e1b73%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Vitor Bruno de Almeida

unread,
Jul 26, 2016, 10:19:05 AM7/26/16
to Firebase Google Group
Hi Jacob,

I signed some of my apps (that are already in production) with the same key, hence, they both have the same SHA-1. These apps have different package names, for sure.

However, when I attempt to add the certificate to either of them on Firebase project settings, I receive the message:

An OAuth2 client already exists for this package name and SHA-1 in another project. You can omit the SHA-1 for now and read more about this situation and how to resolve it 
 
I cannot add the certificate and, consequently, cannot link the app to my Google Play account. 

I certainly will not use the same key for future apps, but am I doing anything wrong right now? Can you help with these problems?

Thank you for the reply

Vitor

Jacob Wenger

unread,
Jul 26, 2016, 12:07:07 PM7/26/16
to fireba...@googlegroups.com
Hey Vitor,

Thanks for giving more details. Did you check out the linked help page? It should walk you through exactly what you need to do.

Cheers,
Jacob

Rangaraj R

unread,
Sep 26, 2016, 10:52:10 AM9/26/16
to Firebase Google Group
Hi Jacob, Victor,

I am also have similar issue.

We are using GCM with prod app for authetication and messaging. Now we want use Firebase SDK 3.0, but it support only unique Package and SHA1. 

I have used package name and SHA1 key already in GCM project and I want to use same in FCM project. 

When I tried to add same package and sha1 key, it says it already exist. The link in that error message suggest to delete firebase db and import existing GCM project and create DB. 
This I cant do as DB because existing DB is already used in prod.

I tried second option in the link, it say to add GCM project's client id in FCM project's whitelist.

Steps : 

If you're unable to import your existing project and you don't plan to use Invites, you can manually whitelist your existing OAuth 2.0 client ID to use Google as a sign in provider.

First, find your existing project's OAuth 2.0 client ID. To do this:

  1. Go to the Credentials page of the Google Cloud console. If the project containing the OAuth 2.0 client ID doesn't open automatically, select it from the drop down menu in the upper right corner of the page.
  2. Under the OAuth 2.0 client IDs section, locate the client name containing the SHA-1 and package name you used for your Firebase project. If you're unsure which one is correct, click the name of the client to see the details.
  3. When you have located the correct client name, copy the full value in the Client ID column.

Next, whitelist this client ID for Google as a sign in provider. To do this:

  1. Go to the Firebase console and select your project.
  2. Select Auth from the menu on the left.
  3. Select the Sign in method tab.
  4. On the Sign in method page, click on Google in the Sign in providers card.
  5. Expand the Whitelist client IDs from external projects option.
  6. Paste your client ID from the Cloud console into the text field and click Add.
But this config changes are also not working.

Can anyone provide a solution for this issue.

Thanks,
Rangaraj

Rangaraj R

unread,
Sep 27, 2016, 10:58:41 AM9/27/16
to Firebase Google Group
HI Victor,

I able to make it work by adding Web Client ID and Secret Key of GCm project in Web SDK configuration in Sign In method page. 

Please find complete steps below

If you're unable to import your existing project and you don't plan to use Invites, you can manually whitelist your existing OAuth 2.0 client ID to use Google as a sign in provider.

First, find your existing project's OAuth 2.0 client ID. To do this:

  1. Go to the Credentials page of the Google Cloud console. If the project containing the OAuth 2.0 client ID doesn't open automatically, select it from the drop down menu in the upper right corner of the page.
  2. Under the OAuth 2.0 client IDs section, locate the client name containing the SHA-1 and package name you used for your Firebase project. If you're unsure which one is correct, click the name of the client to see the details.
  3. When you have located the correct client name, copy the full value in the Client ID column.

Next, whitelist this client ID for Google as a sign in provider. To do this:

  1. Go to the Firebase console and select your project.
  2. Select Auth from the menu on the left.
  3. Select the Sign in method tab.
  4. On the Sign in method page, click on Google in the Sign in providers card.
  1. Click on Enable to enable Google Sign-In
  1. Expand the Whitelist client IDs from external projects option.
  2. Paste your client ID from the Cloud console into the text field and click Add.
  1. Add Web Client id and Secret id of existing GCM project under Web SDK configuration in Sign-In Method Page.
Thanks,
Rangaraj
Reply all
Reply to author
Forward
0 new messages