Upload symbol files
Asked Answered
T

3

12

In my Firebase Crash Reporting page i can't find the full information of crashes (for example the number of row, the file and so on) . I thought it can be because it says

Upload symbol file to symbolicate future stack traces for UUID ----***

telling me to

Using the command line, navigate to your Xcode project folder and run the following: ./Pods/FirebaseCrash/batch-upload ----***

Unfortunately when i try to execute that command in my Xcode project i get the following message:

----***: warning: no executable or bundle Done.

and nothing changes in firebase. Maybe it is because of bitcode enabled? How can i solve it?

P.S. : I have replaced my UUID with ----*** for security reasons.

Triploid answered 29/5, 2016 at 17:53 Comment(1)
I had same issue when in my build settings i had a flag on "Strip debug symbol" in that way Dsym is not created and batch-upload not found it.Gifford
A
9

This answer is if you're not using CocoaPods.

If you are not using CocoaPods you will need some files from the Pods directory that aren't included in the standard set of Firebase libraries they provide.

There are 5 files, pictured below: FirebaseCrash required files

You will need batch-upload, dump_syms, upload-sym, upload-sym-util.bash and upload-sym.sh. You can retrieve these files from the FirebaseCrash Pod files.

If you copy those into your project directory and replace the "${PODS_ROOT}"/FirebaseCrash/ with the directory pointing to those files, it should work.

Note: I still have complications with this solution if I use a build server like Jenkins. Still some work to be done there.


I found that this was required for my apps that don't use CocoaPods. While this might not be directly relevant to your own use, I figure at the very least I should include it for someone else trying to find the answer.

Amritsar answered 31/5, 2016 at 11:30 Comment(3)
Unfortunately i'm using cocoapods, but maybe it will be useful for someone else as you said! So thanks!Triploid
@Triploid if u are using cocoapods and still get unsymbolic log, how do u symbolic it?Bed
All of the issues where solved on my side. By adding the static frameworks in Project Nav, inside project folder. Earlier,I added them as normal frameworks. Now, everything is working perfectly fine.Belorussia
D
8

We currently have some problems with third-party shared libraries (dynamic frameworks), so if you are using a shared library things get difficult. Follow the instructions below but replace the path to the app’s executable with the path to the shared library.

If not, then it is possible that the original executable from which the crash was reported has been lost. Even if it is rebuilt with the same sources, the LC_UUID field will change.

  1. Verify that the UUID is correct for the executable:

    dwarfdump --uuid /path/to/your/build/area/MyApp.app/MyApp

    If none of the UUIDs match the missing one, then game over. Sorry. You can try to restore the executable from Time Machine, Carbonite, or whatever, but that's about it.

  2. If one of the UUIDs matches (there is one per architecture), then you still have the original executable, but you are most likely missing the dSYM bundle. You can verify that the dSYM is missing:

    mdfind com_apple_xcode_dsym_uuids=UUID

    You should see no response.

  3. Regenerate the dSYM bundle:

    dsymutil -o=upload.dSYM /path/to/your/build/area/MyApp.app/MyApp
  4. Check to see that the dSYM bundle is registered:

    mdfind com_apple_xcode_dsym_uuids=UUID

    You should get one response back: the upload.dSYM you just created.

    If you don't see it, give it a few seconds and try again.

  5. Run batch-upload UUID again.

  6. If it still doesn't work, you can get partial results by processing the executable itself. Run batch-upload /path/to/your/build/area/MyApp.app/MyApp to get partial symbolication.

Deepen answered 31/5, 2016 at 19:21 Comment(4)
What should I select in the dialog that asks: "Where is the service account file"?Microfarad
You need to supply the JSON credential file associated with the GOOGLE_APP_ID of your project. If you ran 'upload-sym' as part of your build, you should have been prompted for the JSON credential file beforehand and it would have been bound to the GOOGLE_APP_ID of your project. If this is an after-the-fact attempt at symbolication, then you'll need to get the JSON credential file following the instructions on the Firebase Crash Reporting site.Deepen
What can I do if none of the UUID's match ? when dwarfdump --uuidGilly
@RobertMenke How does this apply to Bitcode? Step 3 is obviously not applicable since the dSYMs are generated by iTunes Connect, anything else we should do differently?Apeak
C
1

In my case (WITHOUT COCOAPODS):

1) Import All files from directory "Crash"

enter image description here



2) Add script into "Build Phases" Tab like this :

# Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
GOOGLE_APP_ID=1:xxxxxxxxxxxx:ios:xxxxxxxxxxxx

# Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${SRCROOT}"/upload-sym "${SRCROOT}/*NameOfTargetDirectory*/ServiceAccount.json"



You need to change "NameOfTargetDirectory" in the script and it works!

Cobweb answered 9/4, 2017 at 9:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.