firebase-ios-sdk
firebase-ios-sdk copied to clipboard
Crashlytics upload-symbols failure
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
Replace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
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.
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
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.
Thanks for reporting, @jostster. I'm trying to reproduce the issue using the run script you provided, but I'm able to build my app successfully. May I know if you added the paths listed on our docs in the Input Files tab? Also, would you mind sharing your complete config in the Run Script tab?
@rizafran We currently have only 1 of the input files in our list. I will add the rest and let you know if that resolves the issue.
This worked fine for a few days with the updated Input Files but I just started encountering it again. Its like it gets an error listed above, then the next build will freeze on the upload process, then I have to build again and the 3rd time will work. But I have to do this every other build.
Thanks for the update, @jostster. Is it possible for you to share an MCVE? I can't seem to reproduce it using the Crashlytics quickstart.
Give me a little bit of time to create a minimal project. I am noticing that it seems to work for about a single work day, then starts showing the errors. I did receive word from an old co-worker that is having this same issue, so will try and get something working.
@rizafran is there any verbose logging I could enable for symbol upload to help determine the cause of this?
@rizafran I found some crash logs for upload-symbols in my Console's CrashReport.
upload-symbols-2024-10-15-170949.000.ips.zip
Think I resolved the issue. I switched the Phase to just use /run instead of run and upload-symbols I will post back here if it I notice it again.
Think I resolved the issue. I switched the Phase to just use /run instead of run and upload-symbols I will post back here if it I notice it again.
Gonna mark this as need-info while waiting. I did look into ips crash report in depth and it seems related to kernel file access, this is kernel call I suspect arise up the error (you can also check the reference in Xcode under Kernel/sys/vnode_if.h) . And looking into the build phase screen shot, in fact you actually run upload-symbols twice (the run script actually run upload-symbols in a background process and another is .../upload-symbols -gsp...). I have a hunch something might act funny when you access the same file at the same time. Let us know if there is more finding and thank you for sharing the info.
I think we can close this. After removing the upload-symbols and just using the run we haven't had any issues.