-
-
Notifications
You must be signed in to change notification settings - Fork 226
fix: Multiple sentry.proguard-uuid being set in Android manifest
#4647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Multiple sentry.proguard-uuid being set in Android manifest
#4647
Conversation
sentry.proguard-uuid being set in Android manifest
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4647 +/- ##
==========================================
+ Coverage 73.45% 73.53% +0.07%
==========================================
Files 482 483 +1
Lines 17678 17692 +14
Branches 3493 3492 -1
==========================================
+ Hits 12986 13009 +23
+ Misses 3801 3795 -6
+ Partials 891 888 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jamescrosswell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one small recommendation but otherwise LGTM. 🚀
Thanks @alexsohn1126!
Co-authored-by: James Crosswell <[email protected]>
|
@sentry review |
|
after that pretty bad review comment from Cursor, I'm curious what Sentry will do here |
|
I guess nothing because it has already been merged |
Fixes #4597
Problem
The setup described in #4597 is the following:
net9.0-androidThen the build will fail on
_ManifestMergerstep, due to the duplicated Android manifest metadatasentry.proguard-uuid.This was caused by
sentry.proguard-uuidbeing set up every time an Android project is built. So in the reproducible example above,sentry.proguard-uuidwould be set in Project A and B.Solution
I added a check to ensure
sentry.proguard-uuidis set only when the propertyAndroidApplicationis set totrue, which is set toTruefor MAUI apps, so when MSBuild gets to project B, it doesn't generate another UUID and tries to inject it to the Android manifest.See also:
Notes (feel free to ignore)
I have tried putting the
UpdateAndroidMetadatatarget into a separatesrc/Sentry/build/Sentry.targetsfile (to prevent the target from running transitively), but could not get it to work.If future problems arise where the
proguard-uuidis being set multiple times, we may need to consider that as a more permanent solution