Le Minh
Le Minh

Reputation: 155

Xcode build never finishes when upload-symbols in Build Phase Run Script for FirebaseCrashlytics

I have apply Firebase Crashlytics in my app. I have implemented the following in my Run Script, under Build Phases in Xcode: enter image description here

I also config into Build Settings:

enter image description here

and the message I receive when Xcode building :

Running upload-symbols in Build Phase mode

Validating build environment for Crashlytics...

Validation succeeded. Exiting because upload-symbols was run in validation mode Fetching upload-symbols settings...

Command PhaseScriptExecution failed with a nonzero exit code

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

Upvotes: 1

Views: 2108

Answers (3)

Abdallah Mahmoud
Abdallah Mahmoud

Reputation: 937

//see project "granite"

error :

Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Processing dSYMs...
Command PhaseScriptExecution failed with a nonzero exit code



2023-04-25 22:08:31.703 upload-symbols[23280:103455] Unable to get file attributes for dSYM file at path "/Users/abdallahandroid/Library/Developer/Xcode/DerivedData/Runner-gefdrreutulmdwdzwzzvbbjmuntb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/App.framework.dSYM/Contents/Resources/DWARF"
2023-04-25 22:08:32.709 upload-symbols[23280:103455] Unable to get file attributes for dSYM file at path "/Users/abdallahandroid/Library/Developer/Xcode/DerivedData/Runner-gefdrreutulmdwdzwzzvbbjmuntb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/App.framework.dSYM/Contents/Resources/DWARF"
Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Processing dSYMs...

fixed:

1- update dependence packages of project

2- make your flutter version is last update stable version

3- update your mac and xcode to last version

4- flutter clean and pub get commands

5- first remove old pod:

pod deintegrate
pod cache clean --all

6- clean flutter

flutter clean
flutter pub get 
flutter pub upgrade

7- install pod again

pod install

Upvotes: 0

Nicolas Smit
Nicolas Smit

Reputation: 1

I had the same issue a few days ago, upgrading Firebase to latest version fixed it.

Upvotes: 0

Boris
Boris

Reputation: 206

you do not need to "call upload-symbols" (second line in your script) You should only call "run". For run also add 2 input files for the script:

./GoogleService-Info.plist //path to your plist
"${DWARF_DSYM_FOLDERPATH}/${DWARF_DSYM_FILE_NAME}"

You can also add --debug argument to run to verify if it's find correct dsym file location "${PODS_ROOT}/FirebaseCrashlytics/run --debug"

if you look into Firebase\FirebaseCrashlytics\run you will see the following:

# This script calls upload-symbols twice:
#
# 1) First it calls upload-symbols synchronously in "validation" mode. If the
#    script finds issues with the build environment, it will report errors to Xcode.
#    In validation mode it exits before doing any time consuming work.
#
# 2) Then it calls upload-symbols in the background to actually send the build
#    event and upload symbols. It does this in the background so that it doesn't
#    slow down your builds. If an error happens here, you won't see it in Xcode.

Upvotes: 0

Related Questions