Firebase crashlytics upload dsym automatically - ios

I'm using React Native Firebase. At firebase crashlytics I have missing DSYM's.
What's the right way to add dSYMs automatically on every build? I guess it should be added to run script? If so, how can I get the path to /path/to/pods/directory/FirebaseCrashlytics/upload-symbols and /path/to/dSYMs.
Thanks!

This question has been answered in previous posts, but I'll provide a quick summary. The paths below will automatically find your dSYMs and upload them.
Here is what goes into your runscript:
"${PODS_ROOT}/FirebaseCrashlytics/run"
This is what goes into your input file:
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
You can use this terminal command to find the correct paths to your dSYMs:
mdfind "com_apple_xcode_dsym_uuids == UUID"
You can use the below post as a reference:
Firebase Crashlytics DSYM file.

Related

"Upload missing dSYMs to see crashes from 1 versions" on Firebase Crashlytics

After several hours spent on this forum trying to test a lot of solutions, I need your help.
For the first time, I faced the following message on Firebase Crashlytics which does not allow me to see crashes reports : "Upload missing dSYMs to see crashes from 1 versions".
I tried to follow the steps explained on the Firebase documentation finding the dSym files on my computer (it seems it's not possible to download them from AppleStore Connect) on two different locations :
/Users/sebastien/Library/Developer/Xcode/Archives/2020-11-15/MyApp\ 15-11-2020\ 21.26.xcarchive/dSYMs
/Users/sebastien/Library/Developer/Xcode/DerivedData/MyApp-dqcgovtkqjsbjdciehfjshknjraj/Build/Products/Debug-iphonesimulator
I uploaded them and, despite of the successful message "Successfully uploaded Crashlytics symbols", it does not change anything on Firebase.
Some useful information:
I'm using the following run script for Crashlytics : "${PODS_ROOT}/FirebaseCrashlytics/run" (without any input files so far but it did not cause any trouble so I assume it does not come from this), as explained in the Firebase Get Started
The "Debug Information format" setting is indeed set to "DWARF with dSYM file" for all targets
I'm using Pods in my project
What can I do more to finally have the crash reports available on Firebase as for all my previous versions ?
Thank you in advance.
you should add this script to following run script:
"${PODS_ROOT}/Fabric/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
and no need to add this : ${PODS_ROOT}/FirebaseCrashlytics/run

How to find Firebase Crashlytics initialization file paths and double check that they work?

I am following the instructions for enabling Firebase crashlytics on on iOS. There are a lot of file paths that I am not sure how to correctly resolve. The tutorial also says check Device Logs for checking if the script correctly uploaded dSYM files, but I can't see anything pertaining to this script in my device logs. Any advice?
Do I leave these paths as is for a default build or should I always be customizing them?
1. Script Path
Who sets this ${PODS_ROOT}? How can I print it to make sure it's correct?
"${PODS_ROOT}/FirebaseCrashlytics/run"
2. dSYM Path
Same question as above, but for ${DWARF_DSYM_FOLDER_PATH}.
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
3. Info.plist Path
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
4. How to check for correctness?
Am I correct in reading that this should show up in device logs?
Your device logs display the Firebase verification that initialization is complete.
Those default paths are correct, and do not need to be modified per release. They will always target the correct dSYM and root folder if you leave them as is. You can customize them to follow a specific upload path following these instructions, if you prefer.
In regards to initialization, yes in your device log, the Firebase SDK will indicate when it has been initialized. You can expect to see something like this "FirebaseCrashlytics: Initializing Crashlytics 17.2.2"

Firebase Crashlytics DSYM file

I'm trying to integrate Crashlytics in my app and in the 5. step it says:
Xcode versions 10 or higher only: Add your app’s dSYM location as an input file that enables Crashlytics to automatically generate dSYMs for large apps more quickly. For example:
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
I copy/pasted this path to my Input Files and also this one $(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
Debug Info is set to DWARF with dSYM file.
Should ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME} be like this or this is a dynamic path and I need to replace it with my current DSYM file path?
Using that path should work, but if you run into issues you can manually specify the path as well, or follow these instructions if it's still not working https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk?authuser=0&platform=ios#upload-dsyms.

Firebase Crash Reporting iOS - Unreadable Crashes - Upload Symbol Files?

I'm trying to integrate Firebase Crash reporting for my iOS app. I am using Xcode 8.1, Swift 3 and the latest Firebase Crash reporting version as of 29/11/16.
I have installed Firebase Crash reporting via Cocoapods and have I gone through the limited setup guide from the documentation shown below where I added a run script with my Google App ID and the path to my Google Crash Key son file (Service account)
Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
GOOGLE_APP_ID=1:my:app:id
Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${PODS_ROOT}"/FirebaseCrash/upload-sym "/Path/To/ServiceAccount.json"
I am not sure if I have implemented the second step correctly. I did this
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}/******/GoogleCrashKey.json"
The problem I have is that my app crash reports are pretty unreadable. I believe I either need to upload a symbol file or I have got the second step wrong.
How would I upload the symbol files for crash reporting. I get this instruction when pressing the upload symbol file option in the Firebase Crash reporting console. However I am unsure how to implement it.
1: Using the command line, navigate to your Xcode project folder and run the following:
./Pods/FirebaseCrash/batch-upload < service-account-file > my_UUID
Any help would be great.
Thank you
I was making a mistake when I was trying to implement the second step. I had the Speech marks in the wrong place and had the whole file path as a string :(.
instead of doing this:
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}/******/GoogleCrashKey.json"
I changed it to this:
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}" /******/GoogleCrashKey.json"
My crash report now looks like the following:
Thanks for the help Martin. Much appreciated.
I had the same problem with the Firebase log - a bunch of unreadable information. After adding the symbol file, it worked fine.
Just in case someone is wondering how to add the symbol file, here is the link.

Firebase crashes unreadable

I have a problem reading crash reports on FireBase, my reports look like:
I've already followed these instructions to symbolicate the stacktrace, got the same result.
I'm using Xcode 8
My app is made in Swift 3
Already wrote "FIRApp.configure()" in my
appDelegate.didFinishLaunchingWithOptions method, did make it crash, deattach the debbuger, fix the error, re-run the app, got message "Crash successfully uploaded", etc...
I'm using pods(pod 'Firebase' and pod 'Firebase/Crash')
I see in the FireBase console my events and crashes(just are
unreadable)
Installed the script for symbolicate automatically on build(see image):
Already downloaded FireBase provided examples(crash example does not include the scripting for symbolicate automatically)
Already followed this solutions(which didn't work):
link1
link2
and many others.
Already visited last 6 months links on stackoverflow and google groups with this problem.
Nothing has worked, help please!!!
Update#1: I received an email from firebase-support#google.com saying:
reset your OAuth credentials
Didn't work, also I've been testing the script and the upload is correct, I'm starting to think is a Firebase bug
Your upload script doesn't appear to be setting the GOOGLE_APP_ID var.It should something like:
# Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
1:xxxxxxxxx:ios:xxxxxxxxxxx=1:my:app:id
# Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${PODS_ROOT}"/FirebaseCrash/upload-sym "firebasecrash/firebasecrashreport.json"
Here firebasecrashreport.json is name of ServiceAccount JSON file and firebasecrash is name of my project.
Your upload script doesn't appear to be setting the GOOGLE_APP_ID env var. The upload run script step should look something like the following:
# Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
GOOGLE_APP_ID=1:1234567890123:ios:1234abc567de89
# Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${PODS_ROOT}"/FirebaseCrash/upload-sym "/Users/yourname/yourproject/Your Project Name-5632e387efda6.json"
The below question I answered is a problem similar to yours.
Firebase iOS multiple errors when uploading symbol files
Finally, eureka!
I'm not sure about what was the mistake but I paste it here in case anyone is experiencig the same error:
1) I deleted my app on Firebase console
2) Create in Firebase console a new app with different name
3) Create and download a new GoogleService-Info.plist
4) Delete previous keys(rm $HOME/Library/Preferences/com.google.SymbolUpload*)
5) Create new firebase crash configuration
6) Copy the obtained file on step 5 to my root path on my project
7) Enable all permissions in firebase scripts
chmod -R 777 ./Pods/FirebaseCrash
8) Added the script phase as mentioned in the firebase configuration link mentioned in step 5 (I noticed that my not working previous configuration had blank spaces in name, so I created a non blank spaces name)
And finally(I don't know exactly wy) is working:

Resources