firebase / firebase-ios-sdk

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

[Crashlytics] Xcode16 beta build with debug mode missing dSYM #13543

Closed flexund closed 2 weeks ago

flexund commented 2 months ago

Description

When building application with Debug mode on Xcode16, dSYM fails to upload to Crashlytics.

This is related to https://github.com/firebase/firebase-ios-sdk/issues/13202

Workaround is to disable Debug Dylib Support in target Build settings. But this causes SwiftUI previews to not work.

Reproducing the issue

Firebase SDK Version

11.1.0

Xcode Version

16.0 Beta 6

Installation Method

Swift Package Manager

Firebase Product(s)

Crashlytics

Targeted Platforms

iOS

Relevant Log Output

No response

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 2 months ago

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

Osein commented 1 month ago

I solved this by setting ENABLE_DEBUG_DYLIB to false. Crashlytics upload dsym successfully but it makes preview go kaput

image
themiswang commented 1 month ago

Seems like Apple changed their dSYM content a bit again, will work on a fix. Meanwhile another work around is uploading the dSYM through web uploader.

4eleven7 commented 1 month ago

Is there any update on this?

jerald-dexcom commented 1 month ago

I would like to know if there is any update to this as well. ENABLE_DEBUG_DYLIB to false is the only solution for me for Crashlytics to work.

benfrearson commented 1 month ago

As above, ENABLE_DEBUG_DYLIB is the only solution for me too. Manually uploading dsyms is not particularly feasible when rapid prototyping and using CI/CD.

Would be good to know if there's a fix on the way!

4eleven7 commented 1 month ago

EDIT: Nope, still getting missing dSYM emails endlessly

I've moved from using the SPM recommended script # "${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"

To using this custom script, which seems to be uploading dSYMs correctly, however I'm no script or Firebase expert, just a big dummy that has deadlines, so this might not solve all issues. All I know is my team and I no longer receive 30 emails a day about missing dSYM files. You'll have to update paths and cater it to your project + use case etc.

UPLOAD_SYMBOLS_PATH="${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/upload-symbols"

if [ "${TARGET_NAME}" == "Staging" ]; then
    GOOGLE_SERVICE_INFO_PLIST="${SOURCE_ROOT}/${PROJECT}/Staging/GoogleService-Info.plist"
else
    GOOGLE_SERVICE_INFO_PLIST="${SOURCE_ROOT}/${PROJECT}/GoogleService-Info.plist"
fi

# Verify we found it
if [ ! -f "${GOOGLE_SERVICE_INFO_PLIST}" ]; then
    echo "Error: GoogleService-Info.plist not found at path ${GOOGLE_SERVICE_INFO_PLIST}"
    exit 1
fi

"${UPLOAD_SYMBOLS_PATH}" -gsp "${GOOGLE_SERVICE_INFO_PLIST}" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

echo "dSYM upload completed."

I've also set Previews to use legacy mode (Editor > Canvas > Enable legacy preview execution)

themiswang commented 1 month ago

Hey folks,

Thank you for reaching out, I am working on the fix now. This fix need a refactor work in script so we need to do a thoroughly regression test which might take more time. Tl;dr the fix need to make upload-symbols to support upload multiple DWARF contents within the same dSYM bundle which currently upload-symbols does not support. We likely gonna miss the code freeze for the upcoming release version. But as soon as we finished testing and I'll post the artifact in the issue as a workaround before we having official release.

vhartikainen commented 1 month ago
  • Set ENABLE_DEBUG_DYLIB=YES for build options
  • Build application for debug mode in Xcode 16

This seems to do the trick for me too.

@themiswang Processing of new dSYMs seem to take rather long on Google's side - after upload complete, it takes 5-10minutes before the events start to appear. Is this normal?

This makes fast iteration and testing really hard and prone to make wrong conclusions what works and what not.

jerald-dexcom commented 1 month ago

Thank you @themiswang , Do you have any ETA for the release that will have this fix?

themiswang commented 3 weeks ago

Hey folks,

I have merged the change for upload-symbols in this PR(https://github.com/firebase/firebase-ios-sdk/pull/13760), we are expected this change will be in the next Firebase release for version 11.4.0 and release date will be on Oct 21, 2024. We would love to get your early feedback, so we're sharing the pre-release artifact upload-symbols.zip early for anyone who would like to try it out.

If you are using CocoaPods, you can override the upload-symbols executable to the new one under $PODS_ROOT/FirebaseCrashlytics/upload-symbols

For SPM, you can put upload-symbols and run.sh in a convenient place and then change the path to the new place for your upload symbols build phase.

benfrearson commented 3 weeks ago

Thanks @themiswang for fixing and keeping us updated 👍🏻

NigamAnkit commented 3 weeks ago
Screenshot 2024-10-03 at 11 13 16 AM

I get it while validating the release build from Xcode 16. How to get rid of these warnings ?

lirbar commented 3 weeks ago

For SPM, you can put upload-symbols and run.sh in a convenient place and then change the path to the new place for your upload symbols build phase.

Thank you. I am using SPM and did as you instructed (I took run.sh from latest 11.3.0 folder) but still getting the same warnings.

themiswang commented 3 weeks ago

Hey @NigamAnkit, @lirbar,

The warning actually related to #13551, it is a different issue which relate to how package is getting build. I would suggest follow up with that issue, thank you!

lirbar commented 3 weeks ago

Hey @NigamAnkit, @lirbar,

The warning actually related to #13551, it is a different issue which relate to how package is getting build. I would suggest follow up with that issue, thank you!

Thanks! Do you have ETA when it will get fixed?

kimliss commented 3 weeks ago
Screenshot 2024-10-03 at 11 13 16 AM

I get it while validating the release build from Xcode 16. How to get rid of these warnings ?

Does your Firebase Analytics dashboard contain user data?

yigiteryelkovan commented 3 weeks ago

Hello everyone,

I encountered the same issue and needed to urgently release an update to the App Store due to a change in my application's API endpoint. To address this temporarily, I found the following solution:

I downgraded Xcode to version 15.4, which allowed my project to successfully build without validation errors, and I was able to release my update. How can I run older Xcode version on new macOS version? for more details.

This may not be a permanent solution, but it could be helpful if you need to quickly push an update.

SuryakantRapido commented 2 weeks ago

Any ETA for fix ??

paulb777 commented 2 weeks ago

The fix will be in the 11.4.0 release, planned to publish the week of October 21st.

See above for the interim workaround.

VValiente commented 1 week ago

@paulb777, @themiswang, I've updated to 11.4.0 but dSYM still fails to upload to Crashlytics. And I still see this warning in Xcode's console:

Screenshot 2024-10-23 at 16 52 18

I'm still using the recommended configurations as per your Crashlytics documentation. Does 11.4.0 require changes? If yes, which ones?

Also, ever since I integrated Firebase SDK to use Analytics and Crashlytics, all previews stopped working due to AppLaunchTimeoutError. I'm on Xcode 16. I will try to remove Firebase SDK to verify.

It would be great if someone else could confirm whether or not 11.4.0 does fix the dSYM issue. In case something else is going on with my project. Thanks!

UPDATE: So I restarted the integration from a different branch with a working version (pre-Firebase). Previews are working fine. But after I installed Firebase Analytics (11.4.0), previews stopped working. If I comment out the following lines: FirebaseApp.configure() and all Analytics.logEvent(...) calls, previews work again. dSYMs are also not being sent with this version. So... I will remove Firebase SDK for now until some people can verify the fix work. Really wanted to integrate Crashlytics.

sebastienL commented 6 days ago

Hey,

I updated to 11.4.0 and I have this error which: /Users/....xcodeproj Missing package product 'FirebaseRemoteConfigSwift'

Any idea?

thx

paulb777 commented 6 days ago

FirebaseRemoteConfigSwift should be removed. It was merged into FirebaseRemoteConfig.

lluisgerard commented 6 days ago

I updated to 11.4.0, I have ENABLE_DEBUG_DYLIB set to true and every time I run the app on the simulator my team gets an email warning them. I had to disable the script on development as someone else suggested.

It doesn't look like the issue has been solved to me.

as @VValiente mentioned, it would be nice to confirm if this has been solved or not. I cleaned up the project, worked on it for multiple days and still getting the dSYM failure on the console + emails. Thanks 👍

porsalud-source commented 5 days ago
Screenshot 2024-10-03 at 11 13 16 AM

I get it while validating the release build from Xcode 16. How to get rid of these warnings ?

Any ETA on this that may help!? I'm having the same issue right now.

jfrazzle123 commented 4 days ago

Any update on this? I am still having this issue.

rawmean commented 4 days ago

Is this going to cause an App Review rejection? What happens if we ignore this warning? The issue still exists in 11.4 as others pointed out.

porsalud-source commented 4 days ago

Is this going to cause an App Review rejection? What happens if we ignore this warning? The issue still exists in 11.4 as others pointed out.

If it helps to you, I already Validated and Distributed my app to Appstore. So far they didn't say anything about it. I don't think that warnings may cause your app to be rejected. (Warnings, not Errors)

kennywyland commented 4 days ago

Is this going to cause an App Review rejection? What happens if we ignore this warning? The issue still exists in 11.4 as others pointed out.

I was able to submit an app that had the warning and my submission was approved, FYI.

JaskiratSinghGFG commented 2 days ago

The submission is getting approved but the warnings are still coming even after updating to 11.4.0. @paulb777 Any update/ETA on this?

rbmstudios commented 2 days ago

I submitted a version of our app with these warnings and now Google Analytics is showing no data. All of our users who updated to the new version are now not showing. Does the workaround fix this issue??

paulb777 commented 2 days ago

From the comments, it looks like there may be a range of issues being discussed here, including https://github.com/firebase/firebase-ios-sdk/issues/13764. If you're seeing that one, please see the discussion there.

If you have another problem, including the 11.4.0 upload-symbols not working in Crashlytics, please open another issue.