2

I have Firebase Analytics and Crashlytics enabled in my app. As per the Firebase website, I have implemented the following in my Run Script, under Build Phases in Xcode:

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

I receive the following output from Xcode:

Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Validation succeeded. Exiting because upload-symbols was run in validation mode

The script allegedly completes its work successfully, as reported in Console.app. See attached screen capture for output. Console.app output from upload-symbols script

The build progress does not progress any further after receiving the message above in Xcode. It is stuck at Building 2069 of 2081 tasks. I can successfully run this script manually, after a new app version has been distributed. But the whole point of Google providing this script for Firebase is to automate the whole process.

Has anyone had success in implementing the upload-symbols script in their Run Script? Any ideas why my Build stalls and never finishes?

Mitchell D
  • 465
  • 8
  • 24

2 Answers2

13

I have found one other option that's working reliably. Modify your Run Script to the following: ${PODS_ROOT}/FirebaseCrashlytics/upload-symbols -bp That's it, just a single line. We discovered this by running upload-symbols --help from a terminal. Which said the following about the -bp, --build-phase command line argument. "Build Phase Mode is meant to run as an Xcode Run Script Build Phase. It finds the dSYMs and platform from the build environment variables, instead of having the caller pass them in. With this flag, <path> and --platform can be omitted."

You can also add the -d flag which logs a large but what appears to be very relevant information. Which is often hard to find in this process.

enter image description here

Michael Braley
  • 141
  • 1
  • 4
7

I realised I needed to add an input file for the run script. See below for implementation.

Input file required

Mitchell D
  • 465
  • 8
  • 24
  • I have a similar problem as yours what ekzactly you changes my run script looks like "${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME} – iMinion Jun 17 '20 at 13:09
  • If you set your run script to be exactly the same as mine in the answer, and then make sure you add what you have to the input file path – Mitchell D Jun 18 '20 at 21:34
  • are you getting the crashes on fireBase? after adding the runscript app is archives but I don't see crashes on firebase and dsym files are still not uploading – iMinion Jun 19 '20 at 12:36
  • I had same issue at first. You need to force a crash, see this article https://firebase.google.com/docs/crashlytics/force-a-crash – Mitchell D Jun 21 '20 at 23:30
  • Also see this post https://stackoverflow.com/questions/61763316/firebase-crashlytics-error-loading-your-issues-and-upload-symbols-script-error/61763317#61763317 – Mitchell D Jun 21 '20 at 23:31
  • do you still have the DSYM missing ? and how much time it took to see the test crash on FireBase Console. – iMinion Jun 22 '20 at 08:42
  • I can successfully get crash reports now. They came up about 5 minutes or so after I forced a crash – Mitchell D Jun 23 '20 at 10:39
  • and the DYSM file were uplaoded with force crash ? could you help me , in the steps finalizing the registration in the Firebase @Mitchell D – iMinion Jun 23 '20 at 10:45
  • are you having the DSYM file missing or they get uploaded when the script runs – iMinion Jun 23 '20 at 12:27
  • besides the dSYM input file you still need to add the Info.plist (`$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)`) to the input files. – cybergen Aug 31 '21 at 14:04