Unlink an existing firebase app? - firebase

I want to "Link to new or existing Firebase project & app"
but the crashlytics dashboard told me my project is already linked,
how to unlink my existing project ?

To unlink your Fabric app from Firebase, follow the following steps:
Go to The Firebase project settings
Go to Integrations
Select the Fabric "Manage" link
Click the "Unlink Fabric App"

Very late but if someone still having this problem:
1- try to unlink on firebase dashboard as explanined in this response: https://stackoverflow.com/a/49229545/5679560
2- if the option to remove fabric doesn't appear use this direct link
https://fabric.io/remove_firebase_crashlytics?clientId=CLIENT_ID&projectId=PROJECT_ID
CLIENT_ID is your Firebase Client ID. This begins with "android:" or "ios:" and is followed by either your package name (Android) or bundle ID (iOS)
PROJECT_ID is your app’s containing Firebase project ID, which can be found by going to Project Settings. This is also present in the URL of your Firebase console, i.e. https://console.firebase.google.com/project/
you can check more info in this answer https://stackoverflow.com/a/50003432/5679560

Related

Setup Firebase Remote Config

I want to use Remote Config in a application Xamarin.Forms.
I use a blog - Firebase Remote Config in Xamarin Forms
I have a question about the section: Setup Firebase Remote Config.
Quote
We can setup Firebase Remote Config through the Firebase portal https://console.firebase.google.com/project/Your-Firebase-Project/config and it is an easy process because the portal GUI is nice and friendly. To do it, we add a new parameter key and the default value and of course it can be a json (the GUI has a tool to validate the format of the json content). In the example case the key will be Features and the default value a json:
{
"ShowPlayerDetail": false
}
In this case, we setup a key called ShowPlayerDetail to show or not the player detail.
Question:
Where is the JSON file referred to in this section?
Note.
I am currently in a project.
Update-1
Update-2
Update-3
Update-4
Update-5
I have completed the following steps.
Did I do the right thing?
Do my actions correspond to what is described in the blog?
Or do I need to perform Publish changes? (see Pic-4. Result)
Pic-1
Pic-2
Pic-3
Pic-4. Result
You're using an existing Firebase project but there are no apps in your project, please see the Update-4 screenshot .
You could click the iOS or Android icon to add app to your Firebase project, and make sure the Apple bundle ID matches the Bundle identifier in info.plist of your Xamarin.iOS project, the Android package name matches the packagename in AndroidManifest.xml of your Xamarin.Android project. After registering the app, you can download the google-services.json file for Android and the GoogleService-Info.plist file for iOS.

Firebase and Google Analytics - missing measurementId?

I have a few Firebase projects on which I use Firestore and Firebase Storage.
I want to start using Google Analytics and I see this page with all the instructions. The key setting being the parameter "measurementId".
So, following the instructions, I go to my project settings and find the config snippet but unlike in the instructions it does NOT contain this parameter...
How do I generate it?
The solution came from Firebase support, my project needed to be "relinked" to Google Analytics.
Relink your Firebase project to a Mobile App property
If you had
previously linked your Firebase project with your Analytics account
but are no longer able to locate your Firebase project in Analytics:
Open your Firebase project.
Open Project settings > Integrations.
Click the Analytics card to link Analytics to your project.
More details here
I experienced this also. It seems there is a bug in the website. Set up Firebase CLI and run the following command.
firebase --project <project-name> apps:sdkconfig
It should output something like the following:
? Select the app to get the configuration data: Web - 1:686396208177:web:5119a766dc890b7d671110 (WEB)
✔ Downloading configuration data of your Firebase WEB app
// Copy and paste this into your JavaScript code to initialize the Firebase SDK.
// You will also need to load the Firebase SDK.
// See https://firebase.google.com/docs/web/setup for more details.
firebase.initializeApp({
// ... snip ...
"measurementId": "redacted"
});
It includes measurementId.

Unable to change the default project to deploy my project on firebase hosting

i am trying to deploy my project on firebase hosting. And whenever i am using firebase init it is showing error in terminal as "firebaserc already has a default project " and it exit with that error
i have tried firebase logout and firebase login again . And used "firebase use" command also to change the project but it is still performing the firebase init action on the default project
i want to remove that default project
If you look very carefully at the messaging, it's saying that the name of the file is ".firebaserc" with a leading dot. This file indicates that firebase init was already run in this folder, and the contents of that file describe which project it's connected to (flairboat-48f7b). If you no longer want that file, delete it and start over. Since it starts with a dot, it might be hidden from normal view, but you can be sure that it exists.
you should write:
firebase use --add
and it work! You get the option to choose the preject from firebase.
I ran into the same issue.
Due to a small mistake in setting up the project in firebase, I had to delete it.
But later, I realized that my application NEEDS the default project to be hosted from firebase.
Since I found no shortcuts and running out of time, I did "this" to fix the issue in 10 minutes...with a 5-Step-Process. This is not a "Clever tip". But if you want things up and running soon, you can try this...
Create a new project (in my case, it's React project in VS Code IDE) using - npx create-react-app newprojectname to create a new react project with a different file name.(Don't delete or replace your previous project yet... )
While the new project is being created, create a new project in firebase to host your project.
Copy the folder from your old project that has all your work (it's "src" folder in case of React) and replace the "src" folder in the new project you created in your local machine.
Install all dependencies...Don't forget to add any dependencies you added to you old project. Look at the package.json file of the old project and import all dependencies.
Hit the start command (npm start in my case) and see your project running.
*I'll update if I found some firebase secret to resolve this issue. You can look for the same.
Ensure your firebase project support email and firebase initialize login email are same. If different? It won't be worked. so you must ensure it that two email (firebase project support email and firebase initialize email) are same.

Host multiple projects to same firebase project

I have two different react apps - one admin app and another client app. The two apps share the same Firebase database and now I want to deploy both of them to Firebase hosting so that I can access them from two different URLs.
To do this I followed the following approach:
Type firebase init
Type firebase deploy
This works fine, but the issue is that when I deploy my second project it overwrites the URL for my first project.
I tried adding another project in the firebaserc file so that it looks like:
{
"projects": {
"default": "fire-app-9c444",
"project1": "fire-app-9c444-admin",
"project2": "fire-app-9c444-mobile"
}
}
running firebase use then lists the projects as
* default (fire-app-9c444)
project1 (fire-app-9c444-admin)
project2 (fire-app-9c444-mobile)
But I cannot change to project1 or project2. If I write firebase use project1 I get the following error:
Error: Unable to use alias project1, please verify project
fire-app-9c444-admin exists and you have access.
Any ideas how to go about this?
I had the same error. In my case my project1 app was created with a different Google account as my project2 app. I just added the other Google account as a maintainer in my Firebase project settings (https://console.firebase.google.com/project/${projectName}/settings/iam). Now I can switch projects with firebase use ${projectName}
With firebase login you can check which Google account you are currently logged in

Where can I find the API KEY for Firebase Cloud Messaging?

I am trying to figure out how the new version of GCM or Firebase Cloud Messaging works so I moved one of my projects to the new Firebase console, If I did not have the API KEY or I want to create a new one... where can I do it?
It's in https://console.firebase.google.com/project/(your-project-id)/settings/cloudmessaging
You can find the API KEY in:
(gear-next-to-project-name) > Project Settings > Cloud Messaging
Server Key is the API key.
STEP 1: Go to Firebase Console
STEP 2: Select your Project
STEP 3: Click on Settings icon and select Project Settings
STEP 4: Select CLOUD MESSAGING tab
You can open the project in the firebase, then you should click on the project overview, then goto project settings you will see the web API Key there.
Enter here:
https: //console.firebase.google.com/project/your-project-name/overview
(replace your-project with your project-name)
and click in "Add firebase in your web app"(the red circle icon) this action show you a dialog with:
apiKey
authDomain
databaseURL
storageBucket
messagingSenderId
1.Create a Firebase project in the Firebase console, if you don't already have one. If you already have an existing Google project associated with your app, click Import Google Project. Otherwise, click Create New Project.
2.Click settings and select Permissions.
3.Select Service accounts from the menu on the left.
4.Click Create service account.
Enter a name for your service account.
You can optionally customize the ID from the one automatically generated from the name.
Select Furnish a new private key and leave the Key type as JSON.
Leave Enable Google Apps Domain-wide Delegation unselected.
Click Create.
This might be what you're looking for. This was in the tutorial on the site
Please add new api key from Firebase -> Project Settings -> Cloud Messaging -> Legacy Server Key to the workspace file i.e google-services.json
You can find API KEY from the google-services.json file
Click on Project Overview -> Project Settings,
Then click on Cloud Messaging,
Then click on three dots to the right side of Cloud Messaging Api(Legacy) and enable it,click on, to view image
4. Come back to Project Overview -> Project Settings -> Cloud Messaging, here you will get the Server Key
If you want to get the current api key programmatically in android studio, use
FirebaseOptions.fromResource(context).getApiKey()
Click on Project Overview -> Project Settings
Copy your web api key
Once you just go to autherization section it will generate and also make sure enable legacy if need
Web api key is not generated in firebase while creating a new project as stated on the documentation
You can also get the API key in the android studio. Switch to Project view in android
then find the google-services.json. Scroll down and you will find the api_key

Resources