Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upload symbol files

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.

like image 774
Zac Avatar asked May 29 '16 17:05

Zac


3 Answers

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.

like image 92
Chris Conway Avatar answered Nov 16 '22 01:11

Chris Conway


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.

like image 25
Robert Menke Avatar answered Nov 16 '22 03:11

Robert Menke


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!

like image 31
matt Avatar answered Nov 16 '22 03:11

matt