Sometimes the UUIDs that are assigned on appstoreconnect are incorrect. The crash reports contain the correct ones -- i.e. the stack trace attributes a line to the correct binary image.
In the case of the uploaded dsyms having incorrect UUIDs Crashlytics is not able to match the line in the stack trace to any uploaded dsyms so it flags them as missing.
But there is a way to rewrite the UUID of a dsym and then re-upload it to crashlytics.
Note: This method is risky. If you overwrite the dSYM's UUID with an incorrect one and then upload it to Crashlytics, there is no way to correct that mistake. So you need to be absolutely sure that you A) are looking for the correct binary image; and B) that you have the correct UUID.
Here is how to do it:
Step A: In Crashlytics:
- Note down the version of the build for which a dsym is missing
- Note down the UUID of the missing dsym
Step B: Find an unsymbolicated line in one of your crash files for that version:
(note: in most cases it's your app's binary image, in which case you can just skip all steps here and then just use your app's name as binary image)
- Open Xcode -> Window -> Organiser
- In the left-hand pane, select Crashes
- Use the drop-down menu in the top left-hand corner to select the version you are interested in
- Once all the crashes for that version are downloaded, locate the crash you are interested in
- Find the line in the crash report you are interested in and which is not symbolicated
- Note down the binary image
Step C-a: Locate and replace the dsym with the incorrect UUID manually:
- Open Xcode -> Window -> Organiser
- In the left-hand pane, select Archives
- Select the archive that corresponds to the version you noted down in Step A)
- In the right hand pane, select Download Debug Symbols
- Once finished downloading, in the Organiser right click the archive -> Show in Finder
- In Finder, right click the archive -> Show Package Contents
- Go to the dSYMs directory
- Optional: Sort the finder list by Size in DESC order
- Starting from the top, right click the first dsym file -> Show Package Contents
- Navigate to Contents -> Resources -> Dwarf
- Compare the name of the file inside the Dwarf directory with the binary image name you noted down in Step B) 6.
- If it matches, follow the steps outlined in this excellent writeup to replace the UUID manually
- If it doesn't match, repeat step 9 - 11, going through all dsym files until you found the right one
Step C-b: Locate and replace the dsym with the incorrect UUID automatically:
- Open Xcode -> Window -> Organiser
- In the left-hand pane, select Archives
- Select the archive that corresponds to the version you noted down in Step A)
- In the right hand pane, select Download Debug Symbols
- Once finished downloading, in the Organiser right click the archive -> Show in Finder
- In Finder, right click the archive -> Show Package Contents
- Go to the dSYMs directory
- Use this command line program to replace the UUID by providing the binary image name and correct UUID