21

I am using xcode11 with mac os 10.14.1. I implemented fabric to firebase migration using the following docs.

https://medium.com/@niamhpower/the-great-migration-moving-from-fabric-to-firebase-as-an-ios-developer-7b61a8b40008

And I generated code for testing crash , but this crash report cannot appear in firebase crashlytics console.I used the following doc for this implementation

https://firebase.google.com/docs/crashlytics/force-a-crash?platform=ios

I also added the following run script in Xcode build phases

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

But this will return the following error when I run the application.

31merror: Could not complete submission of dSYM at /Users/macmini1/Library/Developer/Xcode/DerivedData/app_name-dnzsvdsxebmfqjbjecjlyhdzwags/Build/Products/Debug-iphonesimulator/app_name.app.dSYM: Error Domain=com.crashlytics.mac.error-domain.process-dsym Code=3 "File no longer exists at (null)" UserInfo={NSLocalizedFailureReason=File no longer exists at (null)}[0m Command PhaseScriptExecution failed with a nonzero exit code

Could you please help me how to solve this issue

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
IKKA
  • 6,297
  • 7
  • 50
  • 88
  • Are you still experiencing the issue. Firebase having an OMG that was effecting developers to upload the dSYMs – Zubair Nov 18 '19 at 17:32
  • hi, I am stuck on the same issue, did you have any luck with it? The answer from @weet1988 didn't fix my issue (it is already the last script running in my case) – mikey Nov 26 '19 at 00:23
  • 1
    @mikey I deleted the script from run script and again added and also closed the xcode.Then tried to run again.It will work – IKKA Nov 27 '19 at 07:26
  • I actually got Crashlytics to work without the `upload-symbols` script. I just updated the pods to the latest versions available and make sure that the `$ {PODS_ROOT}/Fabric/run` was the last one to be run. Thank you for your reply @IKKA – mikey Nov 28 '19 at 02:59
  • @mikey You meant that you are using only $ {PODS_ROOT}/Fabric/run command in runscript; right? – IKKA Nov 28 '19 at 07:33
  • yes @IKKA and so far it is working just fine. I added the `upload-symbol` one because Crashlytics stopped working, I think around mid OCT. But still couldn't get the dsym files to be updated. As I said before, updating the pods fixed my issue. I had to do a clean and then update, if I remember well – mikey Nov 28 '19 at 10:33

4 Answers4

16

I had the same problem. The reason was that the script "$ {PODS_ROOT}/Fabric/run" was not the last in the list of scripts in Build Phases. Made the script last and everything became OK.

weet1988
  • 304
  • 1
  • 4
  • 2
    In case you will move the run line to the end of the script the build will not fail but the dysm file won't send to Crashlytics – evya Oct 13 '20 at 08:28
9

I have solved by adding find command. Add find command above the upload-symbols

Example :

find "${DWARF_DSYM_FOLDER_PATH}" -name "*.dSYM" | xargs -I {} $PODS_ROOT/Fabric/upload-symbols -gsp "${PROJECT_DIR}/MyApp/GoogleService-Info.plist" -p ios {}

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

Ramesh R C
  • 644
  • 7
  • 17
  • Do we need to upload other .dSYM files that is not a ${DWARF_DSYM_FILE_NAME}? – CyberMew Feb 03 '20 at 01:51
  • @CyberMew, It is not required to upload all the .dSYM file. you are right. So we can find only the file we need to upload. I have modified my answer. – Ramesh R C Feb 04 '20 at 11:12
  • I believe your original answer to upload all the .dSYM files is correct.I have checked with support, and they mentioned that "Crashlytics will require the symbol files from your main app along with the symbols from any framework or library used.", so basically yes, all symbol files are required. – CyberMew Feb 05 '20 at 02:21
  • That’s super cool!. When I upload all .dSYM file to test flight I am getting a warning "ITMS-90381: Too many symbol files". Any idea? – Ramesh R C Feb 05 '20 at 11:30
  • Upload to `test flight`? Do you mean Firebase Crashlytics instead? I am not sure as I have not encounter it before, maybe you can try this solution https://stackoverflow.com/questions/25755240/too-many-symbol-files-after-successfully-submitting-my-apps, if it doesn't work contact support and let us know what they say! – CyberMew Feb 06 '20 at 01:30
  • @CyberMew, Thanks for the reference. yes the issue got solved :) – Ramesh R C Feb 06 '20 at 12:26
  • Google official guide: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports#run-upload-symbols-script-manually – evya Oct 12 '20 at 11:57
5

In my case, I tried uploading the unzipped version of the dSYMs. My build produces a file myapp.app.dsym.zip. You have to upload the zipped version.

Shanakor
  • 407
  • 1
  • 5
  • 12
  • 1
    It was this for me, for some reason I thought I needed to extract the zip that I downloaded from my CI and upload the .dSYM file itself. – Des Apr 24 '21 at 15:48
  • Ya, I also misunderstood the meaning of .dSYM file stated at the Firebase console... IMO, Firebase can state it more clearly in the documentation!!! – Myrick Chow Jul 19 '21 at 04:03
2

Try to run your app (or make archive etc...) without the script (to create DSYM files the first time) by removing it from Build Phases --> Run Script, then add the script and retry.

(Worked for me with FirebaseCrashlytics/upload-symbols script)

Bubu
  • 1,533
  • 14
  • 14
  • 1
    # Type a script or drag a script file from your workspace to insert its path. "${PODS_ROOT}/FirebaseCrashlytics/run" "${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}" – krishnan muthiah pillai Nov 13 '20 at 09:07