Why Crashlytics is asking for missing DSYM file every time?
Asked Answered
L

7

22

I am using Crashlytics in my app everything working fine. even Crashlytics is also working good.

But the problem is that whenever I am creating a new build for our app its again showing missing DSYM File upload new.

Is there any solution for this?

In fabric Document, I found this. but I did not understand this.

can anyone explain to me how to resolve this issue?

https://docs.fabric.io/apple/crashlytics/advanced-setup.html

enter image description here

Lucilius answered 20/7, 2018 at 10:11 Comment(1)
For those who are still looking for the answer to this question in 2020, please check my answer here: https://mcmap.net/q/329091/-ios-and-firebasecrashlytics.Landward
H
11

TL;DR

Everytime you recompile your project after adding a line of code, the dSYM changes because the address of your lines of code in the resulting binary is not the same.

You can look at Fabric docs about uploading dsym to automatically upload your dSYM by adding a build phase or use the Fabric pod instead of just Crashlytics which apparently adds a build phase automatically like @ekscrypto said.

If you still want to do this manually, open your xcarchive where you can find your dSYMs and upload them to crashlytics

More details

dSYM is short for debug SYMbols. This helps crashlytics resolve the crash logs it receives and helps display detailed information about the crashes/bugs that can occur.

When you archive your app, you're left with *.xcarchive "file" which really is a folder that you can browse. Inside this xcarchive, you should have a dSYM folder where your dSYMs are.

To view it, first open organizer window in XCode (Window > Organizer or cmd+shift+6), right click on the last archive and click "Show in Finder". On the Finder window that opens, right click the last xcarchive for your app and click on show contents (sorry the picture is in french) browse xcarchive contents

This takes you inside your xcarchive where you can see the dSYMs for your app

dSYM for the app

Uploading this to crashlytics should solve your issue

Hillaryhillbilly answered 20/7, 2018 at 11:12 Comment(8)
@user3476144 finding DSYM and Uploading is not a problem. I am able to do that. My question is on every release why I need to upload DSYM file?Lucilius
Everytime you recompile your project after adding a line of code, the dSYM changes because the address of your lines of code in the resulting binary is not the same. You can look at docs.fabric.io/apple/crashlytics/… to automate to automate the uploading of your dSYM file to Fabric, or maybe even add a script phase to you build phases that does soHillaryhillbilly
You're welcome, I edited my answer according to the comments in case somebody was to run into this SO thread :)Hillaryhillbilly
Uploading this archive doesn't work anymore - you have to upload the dsyms from iTunes connect. Go to iTunes Connect - > My Apps -> < Your App -> Activity. Select the version you for which you want to upload the dSYMs. Download the dSYMs under Include symbols. Compress it and upload to Crashlytics or Firebase -> CrashlyticsDeadlight
@TaimurAjmal How to upload the dSYM to Crashlytics?Ilanailangilang
@DrorBar Send me an email - I ll share screenshots. [email protected]Deadlight
@DrorBar, if you did migrate to Firebase but still using Fabric SDK/pod you can go to your project's /Pods/Fabric folder on Terminal and run the following command: ./upload-symbols -a FABRIC_API_KEY -p ios _PATH_TO_ZIP_FILE_WITH_dSYMsDavon
Thanks for the help everyone. I was being a bit dumb, since by default you have the crashlytics report for both android and ios. Unless you have only ios active, you will not see the dsym tab.Ilanailangilang
P
17

We've recently encountered the same issue. Ended up with a bit customized version of an uploading script.

if [[ "${CONFIGURATION}" = "Release" ]] || [[ "${CONFIGURATION}" = "Adhoc" ]]; then
  echo "Uploading dSYMs.."
  find "${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs -I \{\} "${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${SRCROOT}/GoogleService-Info.plist" -p ios \{\}
else
  echo "Skip dSYMs upload"
fi

Note quoted paths and skipped dSYM uploads in a Debug configuration. Though it probably won't matter most of the time, as dSYMS are switched off in the Debug configuration anyway.

Also the purpose of find here is to help upload dynamic frameworks' dSYM files. E.g. OS third-party libraries, project frameworks, etc. Otherwise, they won't be symbolicated. Though still presented in stack traces.

Ponderous answered 7/5, 2020 at 8:23 Comment(1)
You are the bestHyperphysical
H
11

TL;DR

Everytime you recompile your project after adding a line of code, the dSYM changes because the address of your lines of code in the resulting binary is not the same.

You can look at Fabric docs about uploading dsym to automatically upload your dSYM by adding a build phase or use the Fabric pod instead of just Crashlytics which apparently adds a build phase automatically like @ekscrypto said.

If you still want to do this manually, open your xcarchive where you can find your dSYMs and upload them to crashlytics

More details

dSYM is short for debug SYMbols. This helps crashlytics resolve the crash logs it receives and helps display detailed information about the crashes/bugs that can occur.

When you archive your app, you're left with *.xcarchive "file" which really is a folder that you can browse. Inside this xcarchive, you should have a dSYM folder where your dSYMs are.

To view it, first open organizer window in XCode (Window > Organizer or cmd+shift+6), right click on the last archive and click "Show in Finder". On the Finder window that opens, right click the last xcarchive for your app and click on show contents (sorry the picture is in french) browse xcarchive contents

This takes you inside your xcarchive where you can see the dSYMs for your app

dSYM for the app

Uploading this to crashlytics should solve your issue

Hillaryhillbilly answered 20/7, 2018 at 11:12 Comment(8)
@user3476144 finding DSYM and Uploading is not a problem. I am able to do that. My question is on every release why I need to upload DSYM file?Lucilius
Everytime you recompile your project after adding a line of code, the dSYM changes because the address of your lines of code in the resulting binary is not the same. You can look at docs.fabric.io/apple/crashlytics/… to automate to automate the uploading of your dSYM file to Fabric, or maybe even add a script phase to you build phases that does soHillaryhillbilly
You're welcome, I edited my answer according to the comments in case somebody was to run into this SO thread :)Hillaryhillbilly
Uploading this archive doesn't work anymore - you have to upload the dsyms from iTunes connect. Go to iTunes Connect - > My Apps -> < Your App -> Activity. Select the version you for which you want to upload the dSYMs. Download the dSYMs under Include symbols. Compress it and upload to Crashlytics or Firebase -> CrashlyticsDeadlight
@TaimurAjmal How to upload the dSYM to Crashlytics?Ilanailangilang
@DrorBar Send me an email - I ll share screenshots. [email protected]Deadlight
@DrorBar, if you did migrate to Firebase but still using Fabric SDK/pod you can go to your project's /Pods/Fabric folder on Terminal and run the following command: ./upload-symbols -a FABRIC_API_KEY -p ios _PATH_TO_ZIP_FILE_WITH_dSYMsDavon
Thanks for the help everyone. I was being a bit dumb, since by default you have the crashlytics report for both android and ios. Unless you have only ios active, you will not see the dsym tab.Ilanailangilang
W
9

in your Xcode project, under Build Phases add above run script:

"${PODS_ROOT}/Fabric/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

enter image description here

Wentworth answered 15/8, 2019 at 6:52 Comment(1)
As Fabric is deprecated now, the script has changed. Please check my answer here for a new script: https://mcmap.net/q/329091/-ios-and-firebasecrashlytics.Landward
D
4

This error means that some dSYM files are missing. The recommended approach is to constantly upload dSYM files to Crashlytics.

Now that Crashlytics is integrated in Firebase, the documentation has slightly changed: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk

  1. Integrate Crashlytics : pod 'Firebase/Crashlytics'
  2. Add a Run Script Phase : find "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" -name "*.dSYM" | xargs -I \{\} $PODS_ROOT/FirebaseCrashlytics/upload-symbols -gsp ${SRCROOT}/GoogleService-Info.plist -p ios \{\}

In case you don't want to upload dSYM files each time you debug build your app : https://support.crashlytics.com/knowledgebase/articles/118559-can-i-make-the-dsym-uploading-only-on-release-buil

Demand answered 18/2, 2020 at 18:49 Comment(3)
Also make sure to use this symbol " instead of “Demand
How is it "recommended" to manually upload these files and try to sync them with the source code, over and over again? That can't be right.Railroader
Typically you would add the upload step to your distribution script so you don't have to do it manuallyRuttish
R
3

Simple Steps Follow 1 Go to archive and right click on the latest version in which you want to get crash report on firebase 2 see the dsyms folder 3 create the Zip file of dsyms folder 4 finally upload that zip file into the firebase console

Ria answered 5/8, 2019 at 5:41 Comment(0)
V
2

Make sure you integrate the new 'Fabric' framework and not only the Crashlytics framework. When you do so, you will end up with a new script in the Build Phase of your project.

Xcode project Build Phase script for Fabric.io

This script will automatically locate your dSYM and upload it along with your build to the Fabric.io/Crashlytics system.

Visitor answered 20/7, 2018 at 11:34 Comment(2)
I don't have an option of fabric.io in Build Phases. How will I get this? I just update the pod but I did not get this option. I am Using XCode 9.4Lucilius
The easy way is to de-integrate crashlytics, then open the Fabric app, click "+New App" then and follow the guide; it should automatically add the necessary script phases.Visitor
D
2

And they changed again:

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

Check here: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk

Discovery answered 5/5, 2020 at 15:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.