getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
820 stars 331 forks source link

Xcode 16 beta: Validation completed with warnings #4068

Open andr-ec opened 5 months ago

andr-ec commented 5 months ago

Platform

iOS

Environment

Other

Installed

Swift Package Manager

Version

8.29.0

Xcode Version

16.0 beta 16A5171c

Did it work on previous versions?

yes, latest 15 version

Steps to Reproduce

1 archive build 2 click on validation button in organizer

I've tried with both The Sentry, Sentry dynamic, and sentry swift ui library. I've also tried to reinstall with the wizard I've also tried clearing the cache and the derived data.

Expected Result

validate without warnings

Actual Result

Upload Symbols Failed The archive did not include a dSYM for the Sentry.framework with the UUIDs [17023652-04E3-34E2-8E8B-4F74918EDD6E]. Ensure that the archive's dSYM folder includes a DWARF file for Sentry.framework with the expected UUIDs.

Are you willing to submit a PR?

No response

brustolin commented 5 months ago

Thanks @andr-ec for reaching out. This is interesting, Apple probably have a new process to upload Symbols in their own validate process. We will need to investigate this with Xcode 16.

philipphofmann commented 5 months ago

I can reproduce the problem by using SPM in our iOS-Swift sample app and validating it as described above. I committed the changed to a branch https://github.com/getsentry/sentry-cocoa/tree/repro/4068.

CleanShot 2024-06-14 at 10 20 10@2x

philipphofmann commented 5 months ago

Both XCArchives from Xcode 15 and Xcode don't contain dSYMs for Sentry in the dSYMs folder. So, I guess this is a new warning in Xcode 16.

philipphofmann commented 5 months ago

@andr-ec, have you encountered any actual problems after seeing this warning? Maybe it's a bug in Xcode.

brustolin commented 5 months ago

We need to check whether this has anything to do with the "new" Dwarf 5 standard of Xcode 16.

calebhearth commented 4 months ago

I'm still seeing this on beta 3 as part of uploading to App Store Connect.

Image

brustolin commented 3 months ago

Same for Beta 5, this probably is here to stay, but it happens only for the static version of the framework, which can't have symbols (afaik).

Image

denrase commented 3 months ago

Could reproduce this issue for static Sentry using SPM. When using Sentry-Dynamic, the issue disappears and the Sertny.framework.dSYM is part of the archive.

Image Image

Also found this stackoverflow post, describing embedding of dynamic libraries. When checking the content of the app within the archive, Sentry is also part of the Frameworks folder when using Sentry-Dynamic.

Image

andr-ec Could you try adding with Sentry-Dynamic with SPM and see if this resolves your issue?

@philipphofmann Is there anything speaking against using the Sentry-Dynamic instead of static Sentry?

philipphofmann commented 3 months ago

@philipphofmann Is there anything speaking against using the Sentry-Dynamic instead of static Sentry?

It depends on whether you want to use static or dynamic libraries. Static binding usually means faster app start times, but if I'm not mistaken, the more recent iOS versions do more optimizations, so the difference between the two isn't as noticeable as it was in the past.

brustolin commented 3 months ago

I believe this is a misbehavior of Xcode 16. I have shared my findings and am waiting for help from Apple on the matter in this forum post.

trevorturk commented 2 months ago

@brustolin would it be possible to provide a summary of the issue and any workarounds you might suggest? I'm reading back through this issue and the forum posts, but I'm not totally clear on what's going on. Is it safe to ignore the warning, or is there an actual underlying issue? Is it recommended to use Sentry-Dynamic until the issue is resolved? I just can't tell if this is an errant warning that isn't a big deal, or if Sentry users need to take some action. Thank you!

brustolin commented 2 months ago

Hello @trevorturk, all my tests indicate that it’s perfectly safe to ignore the warning. It means that the Apple will not have symbols for Sentry SDK to use in their crash reports, which actually are not needed since it was linked statically.

If you use Sentry-Dynamic, the warning goes away, but it’s a matter of preference. One is linked dynamically, and the other is linked statically.

We’re trying to figure this out with Apple to see if there’s something we can do to get rid of the warning, or if this is an Xcode bug.

trevorturk commented 2 months ago

Gotcha, thank you! So, I'll just ignore and carry on for now. Sounds like something you'll be able to smooth out with Apple in the future, but shouldn't have any impact in practice. Thanks for your work on this issue! 🤘

adilanchian commented 2 months ago

Thanks for this thread!

Can confirm this still exists in Xcode 16 GM.

But, looks like it's not much to worry about at the moment. Will press on.

Ty!

UnexDev commented 2 months ago

I'm currently getting this warning on both Xcode distributions and sentry dashboard. I also have no source context. Is there a way to upload them manually?

brustolin commented 2 months ago

Hello @UnexDev yes, you can manually upload source context of your project. Take a look at our documentation about it in here.

DataGreed commented 4 days ago

Any updates?

brustolin commented 2 days ago

Hello @DataGreed, unfortunately no, there is no update on this one.

This requires Apple to change Xcode behavior, you can follow the discussion in here.