MichiZH
MichiZH

Reputation: 5807

Firebase Crashlytics: Missing dsym files

We've moved from fabric.io to Firebase and now the dsym files are always missing. This manual tries to help but I don't really understand it:

Manual: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports?authuser=0&platform=ios

So which line do I exactly need to implement in the build phases so it does it automatic? This one? find dSYM_directory -name "*.dSYM" | xargs -I {} $PODS_ROOT/Fabric/upload-symbols -gsp /path/to/GoogleService-Info.plist -p platform {}

But then my other questions: How can I find my dsym_directory? And I mean this is different for every build isn't it? And it also says:

Important: If you're working with an app that you previously linked from Fabric to Firebase Crashlytics, pass in your Fabric API Key to run the upload symbols script. That is, in the following options to run the script, use -a fabric-api-key instead of -gsp path/to/GoogleService-Info.plist.

So does this mean I can use the variable fabric-api-key or do I need to replace it exactly with my key? Can someone just help me and give the exact line I have to insert into the build phases?

Upvotes: 6

Views: 9884

Answers (5)

Shakeel Ahmed
Shakeel Ahmed

Reputation: 6023

Swift 5 How to upload dSYMs Folder dSYMs Folder upload Easy way in 3 steps

CODE Change your path with this

/Users/Apple/Documents/OfficeProject/Ratainoo/retainoo-ios/Pods/FirebaseCrashlytics/upload-symbols -gsp /Users/Apple/Documents/OfficeProject/Ratal noo/retainoo-ios/Retainoo/GoogleService-Info.plist-pios/Users/Apple/Downloads/dSYMs

Step 1 Download from You app store account enter image description here

Step 2 Enter Path enter image description here

Step 3 When Upload Succesfull

enter image description here

Upvotes: 4

Scinfu
Scinfu

Reputation: 1131

Alternative script to make sure the dsyns are uploaded correctly

  1. Go to "Build Phases"
  2. Create a new script in + -> "NewRun Script Phase"
  3. Chech that it's always the last one
  4. Copy and Past this script
set -e

echo "info: Exec Upload dSYM"
#Path for google service .plist 
GOOGLE_SERVICE_INFO_PLIST="${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}/GoogleService-Info.plist"
#Path for DSYM directory
DSYM_PATH="$DWARF_DSYM_FOLDER_PATH/dddd/$DWARF_DSYM_FILE_NAME"
#Firebase command script
CMD=""
if [[ ${PODS_ROOT} ]]; then
  echo "info: Exec FirebaseCrashlytics Run from Pods"
  CMD="$PODS_ROOT/FirebaseCrashlytics/upload-symbols"
else
  echo "info: Exec FirebaseCrashlytics Run from framework"
  CMD="$PROJECT_DIR/FirebaseCrashlytics.framework/upload-symbols"
fi

echo "info: Checking if .plist exists"
if [ -f "$GOOGLE_SERVICE_INFO_PLIST" ]; then
    echo "info: $GOOGLE_SERVICE_INFO_PLIST exists."
else 
    echo "ERROR: $GOOGLE_SERVICE_INFO_PLIST does not exist."
    exit 1
fi

echo "info: Checking if .dSYM"
if [ -d "$DSYM_PATH" ]; then
    echo "info: $DSYM_PATH exists."
else 
    echo "ERROR: $DSYM_PATH does not exist."
    echo "info: try fallback"
    DSYM_PATH=` find "${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs `
    if [ -d "$DSYM_PATH" ]; then
        echo "info: $DSYM_PATH exists."
    else 
        echo "ERROR: $DSYM_PATH does not exist."
        exit 1
    fi
fi
echo "info: Check if upload-symbols script exists"
if [ -f "$CMD" ]; then
    echo "$CMD exists."
else 
    echo "ERROR: $CMD does not exist."
    exit 1
fi

echo "info: Starting command upload-symbols"
"${CMD}" -gsp "$GOOGLE_SERVICE_INFO_PLIST" -p ios "$DSYM_PATH" > /dev/null 2>&1 &
echo "info: Symbol uploading will proceed in the background."
echo "info: remove '> /dev/null 2>&1 &' to test in the main thread and see if there are any errors, or open console and filter with 'upload-symbols'"

Upvotes: 1

Solayman Rana
Solayman Rana

Reputation: 331

For those who didn't find Activity in AppStoreConnect.

Download the .dSYMs file manually from AppStoreConnect:

  • Login to AppStoreConnect
  • Select My Apps and then Select your App enter image description here
  • Then Click on Testflight after that Build Number enter image description here
  • Then Click on Build Metadata and you see the bottom right corner click on Download dSYMsenter image description here

Upvotes: 3

Khaled EL Debuch
Khaled EL Debuch

Reputation: 121

28/May/2020 enter image description here For me i work on this steps until dsym problem solved with me.

In the first Add Firebase Crashlytics to your app:

Open the podfile you created for your Firebase project and add the FirebaseCrashlytics pod

pod 'Firebase/Crashlytics'

pod 'Firebase/Analytics'

Then apply : pod install'

  1. Create tow scripts as shown in image :

    In the first script write the next command:

    "${PODS_ROOT}/FirebaseCrashlytics/run"

and in inpute files add the tow input files:

  • ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}

  • $(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

enter image description here

In the second script write the next command:

"find ${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs -I \{\} "$PODS_ROOT/Fabric/upload-symbols" -gsp "$PODS_ROOT/../GoogleService-Info.plist" -p ios \{\}

enter image description here

if dSYM didn't work with you when you need to upload dSYM files by the terminal for first time at least.


The following steps explain how to upload a dSYM files to Firebase:

  1. Download the .dSYMs from iTunes Connect: enter image description here
  2. Extract the "appDsyms" that you download it from your iTunes Connect.
  3. Run the script from your terminal to upload dSYMs

/path-to-your-project/Pods/FirebaseCrashlytics/upload-symbols -gsp /path-to-GoogleService-Info.plist/GoogleService-Info.plist -p ios /path-to-appDsyms-folder/appDsyms

enter image description here

Upvotes: 10

iluvatar_GR
iluvatar_GR

Reputation: 1017

I used find ${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" before the script to find the dsyms.

"find ${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs -I \{\} "$PODS_ROOT/Fabric/upload-symbols" -gsp "$PODS_ROOT/../GoogleService-Info.plist" -p ios \{\}

enter image description here

Upvotes: 6

Related Questions