14

I have migrated Fabric to Firebase/Crashlytics and I am getting this below build error for my run script in an iOS project,

Build Phase - Run Script

# Name of the resource we're selectively copying
GOOGLESERVICE_INFO_LOCATION=${PROJECT_DIR}/${TARGET_NAME}/App/Scripts/GoogleService-Info.plist

# Upload sysmbol
echo "Uploading dsym file"

"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp ${GOOGLESERVICE_INFO_LOCATION} -p ios ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}

Build Error

[31merror: Could not complete submission of dSYM at /Users/me/Library/Developer/Xcode/DerivedData/Project-cmkidnrcwbunsqezgsrutqkmnivn/Build/Intermediates.noindex/ArchiveIntermediates/Project/BuildProductsPath/ReleaseOfficial-iphoneos/Project.app.dSYM: Error Domain=com.crashlytics.mac.error-domain.process-dsym Code=2 "File no longer exists at (null)" UserInfo={NSLocalizedFailureReason=File no longer exists at (null)}

Suggested in solution didn't work for me.

How to resolve it?

Sazzad Hissain Khan
  • 37,929
  • 33
  • 189
  • 256

1 Answers1

17

I recently got a new Mac and faced the same issue.

After trying lot of different things with no success, I found what was wrong. All I had to do, is to move my upload DSYM script at the bottom of the build phases script list.

We talk about this script:

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

It has to be the last one executed

If this does not work, try this :

  1. Comment your DSYM script, then archive your app.
  2. Your archive should complete with success
  3. Uncomment your DSYM script, and place it to the bottom list. (see correct order below)
  4. Build a new archive.

Correct order :

  1. run firebaseCrashlytics script.
  2. run [CP] Embed pods frameworks
  3. run DSYM Script

NB: In some cases, having a path containing some white spaces such as 'Supporting files' may lead to unexpected behaviour.

DDelforge
  • 558
  • 7
  • 18
  • 1
    Last stuff if just did before : 1. Comment your DSYM script, then archive your app. 2. Your archive should complete with success 3. Uncomment your DSYM script, place it to the bottom list. Correct order : 3a. run firebaseCrashlytics script. 3b. run [CP] Embed pods frameworks 3c. run DSYM Script 4. Build a new archive. – DDelforge Nov 18 '20 at 08:27
  • You save my day Maite. – Rein rPavi Nov 20 '20 at 04:11
  • I have followed these steps still getting the same issue... – Raj D Dec 31 '20 at 10:41
  • My Second archive hangs on "Run custom shell script 'DYSM script'", and is not going forward. – Raj D Dec 31 '20 at 11:22
  • And the archive fails at the end – Raj D Dec 31 '20 at 11:25
  • @RajD maybe you should comment your script (by adding a # before each line. Then build your archive. It the problem, gone, your script is the issue. You have to figure it out why it doesn't run. As a quick work-around, you can send your app to the store without the DSYM's and send it manually. – DDelforge Jan 04 '21 at 09:50
  • 1
    @RajD another thing you may take care, is to avoid placing your .plist file (the one you refers in your DSYM script) in a folder containing some spacing. This could cause issue in your script. – DDelforge Jan 04 '21 at 09:53
  • Thanks for reply. Yes I've submitted app without the script for now. I'll check the plist folder thing too. – Raj D Jan 05 '21 at 07:19
  • @DDelforge Yes I have space in my project name and in its folder name which contains the plist file. Maybe this could be the problem – Raj D Jan 06 '21 at 10:07
  • 1
    @RajD The I would suggest you to any spaces, in folder name or file name. I should fix your issue. – DDelforge Jan 08 '21 at 11:05
  • 3
    correct order of scripts work for me ... 1. run 2. pod 3. dSYM – Wahab Khan Jadon Apr 07 '21 at 11:34
  • 2
    It happens when do `pod deintegrate` then `pod install`. It will happen miscorrect order. Change it will solve the problem. – Johnny Sep 24 '21 at 16:06