How does one upload the dSYM via fastlane to Firebase Crashlytics - firebase

Does anyone know how one uploads the dSYM via fastlane to Firebase Crashlytics
There is documentation here https://docs.fastlane.tools/actions/crashlytics/#crashlytics
But I am unaware of where to get the apiToken, and this seems to be more Crashlytics without Firebase focussed
Thanks

The crashlytics fastlane action uploads builds to Fabric's Crashlytics Beta, which is used for beta testing apps.
It sounds like you're actually looking for the upload_symbols_to_crashlytics action to upload dSYMs to Firebase Crashlytics.
Using the upload_symbols_to_crashlytics action you can specify the GoogleService-Info.plist (gsp_path) path and that should work.

You can find the API token in your organization's settings page but you must be an admin to view it.
Documentation - https://docs.fabric.io/android/fabric/settings/api-keys.html
Link to organizations page - https://www.fabric.io/settings/organizations

Related

firestore is not working with React Native Expo

I installed firebase with react native expo using expo add firebase, then
I created a file (firebase.tsx) and added the Firebase configuration and initialized the app like in this screenshot with correct values].
I have added the google-services.json and
GoogleService-info.plist to the root of my expo project like the documentation say and i am importing firebase in my api service like this import Firebase from './../../../firebase'.
In my register function I call the firebase create user function
const response = await Firebase.auth().createUserWithEmailAndPassword(values.email.value, values.password.value)
The response is never returned, and if I use . then nothing happens either.
If I log firebase.auth I get an object with my API key and app name, etc. so Firebase is installed, but whenever I call the database for sign in or to access a collection nothing happens.
This is my package.json.
This is my app.json.
I added bundleIdentifier and googleServicesFile to iOS and package and googleServicesFile for Android.
currently Firebase seems not to be working in expo if you are using the android configuration. I have tried the web configuration and it has worked for me. Here is the youtube tutorial for it. Watch from 38:20 to set up.

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.

FirebaseError: Analytics: "measurementId" field is empty in Firebase config

I cannot start project with yarn run dev and have this error:
FirebaseError: Analytics: "measurementId" field is empty in Firebase config. Firebase Analytics requires this field to contain a valid measurement ID. (analytics/no-ga-id).
I deleted yarn.lock file, added some extra variables to.env file. Where can I find measurementId? What might help in this kind of error? May be somebody have already faced with such problem. Thanks :)
This has nothing to do with your yarn lock file. Which client side sdk are you using for Firebase? Angularfire perhaps?
I assume you did put your firebase config in your environment file of your angular app. Just add the property "measurementId" to it with the correct value, and you are good to go. You can get this property in your Firebase project.
If your app uses the Firebase hosting and uses reserved URLs you are good to go since it automatically handles the configuration for your application. It seems it isn't your case.
You should add or update the config file to ensure the measurementId field is present. To find the config file go to Your apps card in your Project settings from the Firebase Console.
It can be useful as well: How to get the measurementId from the Firebase config?

using Firebase Crashlytics in Xamarin iOS

Could anyone please help me in how to use Xamarin.Firebase.iOS.Crashlytics nuget package for Xamarin iOS. I am getting SIGSEGV code error in my code at random places and I am not able to figure out the actual problem.
Have searched a lot regarding how to implement Crashlytics in Xamarin iOS , but I was not able to find any.
Have followed the steps given in the below two links, but I was only able to implement Crashlytics in xcode with the help of these two links.
Link 1 Link 2
not sure if you solved the problem already or not but I will give it a go since this post almost got me to the finish line. And there might be others out there looking for how to do this.
As of late 2018 the Crashlytics is going from Fabric to Firebase this has resulted in a lot of old posts that are not applicable any more.
To get nuGet package to work you will need to do the following:
Head over to the firebase console and create a project. Then add an app input a "bundle ID", this needs to be the same as what you have in your xamarin app. The nick and App Store ID is optional.
You will now get a GoogleService-Info.plist file, download this file. Now comes the the tricky part. To initialize the firebase app you need to create a dummy xCode project with the same bundle identifier as your project to do this:
Make a new xCode project and follow the instructions from firebase
Remember to use the .xcworkspace file to open the project after insatlling the pods.
Compile and run this app on a device in the firebase console you will hopefully see some reaction if everything has worked out correctly.
Now to add this to your visualStudio xamarin app first include the GoogleService-Info.plist to your project and change the build action to "Bundle Resource"
Then add the Xamarin.Firebase.iOS.Core and Xamarin.Firebase.iOS.Crashlytics packages to the iOS project.
Almost there, only two things left to do.
In the AppDelegate.cs file in the FinishedLaunching function add:
Firebase.Core.App.Configure();
Crashlytics.Configure();
Fabric.Fabric.SharedSdk.Debug = true; // To enable debugging
and also remember to add the two namespaces Firebase.Core and Firebase.Crashlytics to the top of the file.
The last step is to run the app witout the debugger as the debugger will eat all the errors.
This should be it.
More info on the crashlytics nuGet see the github page
Edit
2019-08-03: updated link to getting started NuGet
PLEASE CHECK THE COMMENTS
For iOS:
Add GoogleService-Info.plist file to your app project.
Set GoogleService-Info.plist build action behaviour to Bundle Resource by Right-clicking/Build Action.
Add the Xamarin.Firebase.iOS.Core NuGet to your iOS project: https://www.nuget.org/packages/Xamarin.Firebase.iOS.Crashlytics/
Add the following lines of code somewhere in your app, typically in your AppDelegate’s FinishedLaunching method (don't forget to import Firebase.Core and Firebase.Crashlytics namespace):
App.Configure ();
Crashlytics.Configure ();
For Android:
Make sure you have a project set up in the Firebase Developer Console.
Download your project’s file and place it in the folder of your Xamarin.Android project.
Add the Xamarin.Android.Crashlytics NuGet package: https://www.nuget.org/packages/Xamarin.Android.Crashlytics/
Restart your IDE
Add google-services.json to your Xamarin.Android app project.
Set the build action google-services.json to GoogleServicesJson
Create a string resource with the name com.crashlytics.android.build_id. The value can be whatever you want to uniquely identify a particular build with.
Clean and Rebuild your solution.
Fabric.Fabric.With(this, new Crashlytics.Crashlytics());
Crashlytics.Crashlytics.HandleManagedExceptions();
I had recently written a blog for integrating your Xamarin Apps with Firebase Crashlytics where I have gone in detail on how it can be configured which can be found here:
https://medium.com/#hakimgulamali88/firebase-crashlytics-with-xamarin-5421089bb561
There are few steps needed to be performed in order to implement Firebase Crashlytics in Xamarin.
First of all you have to create a dummy project in Xcode with same bundle identifier.
You can follow this https://fabric.io/kits/ios/crashlytics/install , to implement Crashlytics in Xcode.
Now for Xamarin, use the same Bundle Identifier, and in the info.plist file add the below lines
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>Your api key</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict/>
<key>KitName</key>
<string>Crashlytics</string>
</dict>
</array>
</dict>
Now import Fabric and Crashlytics in the AppDelegate , then initialize Fabric instance with:
Fabric.with([Crashlytics.self])

Unlink an existing firebase app?

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

Resources