firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.59k stars 1.46k forks source link

Crashlytics upload-symbols failure #13716

Open jostster opened 4 days ago

jostster commented 4 days ago

Description

When running or building our app in Xcode 16 we have noticed we are getting frequent failures for the Crashlytics run phase. Doing the same run again will then work.

We receive a Bus error 10 when our build fails in Xcode 16.

Our Crashlytics Run Phase

# Don't execute during previews
if [ "${ENABLE_PREVIEWS}" = "YES" ]; then
    exit 0
fi

# Type a script or drag a script file from your workspace to insert its path.
SWIFT_PACKAGE_FIREBASE_DIR="${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk"
# Add Crashlytics run script
"${SWIFT_PACKAGE_FIREBASE_DIR}/Crashlytics/run"

PATH_TO_GOOGLE_PLISTS="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app"
"${SWIFT_PACKAGE_FIREBASE_DIR}/Crashlytics/upload-symbols" -gsp "$PATH_TO_GOOGLE_PLISTS/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

Reproducing the issue

Create a build and either click Run or Build. Issue happens about 50% of the time.

Firebase SDK Version

10.29.0

Xcode Version

16

Installation Method

Swift Package Manager

Firebase Product(s)

App Check, Crashlytics, DynamicLinks

Targeted Platforms

iOS

Relevant Log Output

Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Validation succeeded. Symbol uploading will proceed in the background.
/Users/<user>/Library/Developer/Xcode/DerivedData/<app>-bnerravapwudosbdtdpmjbdnbbcv/Build/Intermediates.noindex/<app>.build/DevStage-iphonesimulator/<app>.build/Script-9515A14D216D1DD000D7E5BA.sh: line 13: 35841 Bus error: 10           "${SWIFT_PACKAGE_FIREBASE_DIR}/Crashlytics/upload-symbols" -gsp "$PATH_TO_GOOGLE_PLISTS/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"
Command PhaseScriptExecution failed with a nonzero exit code

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
```json Replace this line with the contents of your Package.resolved. ```

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
```yml Replace this line with the contents of your Podfile.lock! ```
google-oss-bot commented 4 days ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

jostster commented 4 days ago

It also appears that sometimes it gets stuck on the crashlytics phase and never finishes building. You have to stop the current build and run the build again.

jostster commented 2 days ago

We have recently updated to Firebase 11.2.0 to see if this would resolve the issue. While it worked for a few hours, it started having the same frequent failures as 10.29.0

jostster commented 1 day ago

And now another update. With the Xcode 16 withCheckedContinuation crashes we are doing another build on Xcode 15.4 on Seqouia via Xcode Cloud and it is constantly failing with the firebase crashlytics phase returning a non 0 exit. After switching back to sonoma, it builds and submits fine.