Repository navigation
io.sentry.proguard-uuid error during _ManifestMerger step when building MAUI app #4597
Description
Package
Sentry.Maui
.NET Flavor
.NET
.NET Version
9.0.305
OS
Android
OS Version
No response
Development Environment
Rider 2024 (MacOS)
SDK Version
5.16.0
Self-Hosted Sentry Version
No response
Workload Versions
From AZURE DEVOPS pipelines :
Installing workload manifest microsoft.net.sdk.android version 35.0.101...
Installing workload manifest microsoft.net.sdk.ios version 18.5.9219...
Installing workload manifest microsoft.net.sdk.maccatalyst version 18.5.9219...
Installing workload manifest microsoft.net.sdk.macos version 15.5.9219...
Installing workload manifest microsoft.net.sdk.maui version 9.0.82...
Installing workload manifest microsoft.net.sdk.tvos version 18.5.9219...
UseSentry or SentrySdk.Init call
// The DSN is the only required setting.
options.Dsn = Configuration.SentryDsn;
// Use debug mode if you want to see what the SDK is doing.
// Debug messages are written to stdout with Console.Writeline,
// and are viewable in your IDE's debug console or with 'adb logcat', etc.
// This option is not recommended when deploying your application.
options.Debug = false;
#if IOS
options.Native.EnableAppHangTracking = false;
options.Native.EnableAppHangTrackingV2 = false;
// Suppress native SIGSEGV Segfault errors
options.Native.SuppressSignalAborts = false;
options.Native.SuppressExcBadAccess = false;
options.Native.EnableNetworkTracking = false;
options.Native.EnableNetworkBreadcrumbs = false;
#endif
#if ANDROID
options.Native.AnrEnabled = false;
// Suppress native SIGSEGV Segfault errors
options.Android.SuppressSegfaults = false;
options.Native.EnableNetworkEventBreadcrumbs = false;
options.Native.EnableSystemEventBreadcrumbs = false;
#endif
// Set TracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
options.TracesSampleRate = 1.0;
options.MinimumEventLevel = LogLevel.None;
options.MinimumBreadcrumbLevel = LogLevel.Trace;
options.MaxBreadcrumbs = 100;
// Other Sentry options can be set here.
options.IncludeTextInBreadcrumbs = true;
options.IncludeTitleInBreadcrumbs = true;
options.IncludeBackgroundingStateInBreadcrumbs = true;
options.AutoSessionTracking = true;
options.IsGlobalModeEnabled = true;
options.CacheDirectoryPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
options.Environment = Configuration.Environment;
options.SendDefaultPii = false;
options.CaptureFailedRequests = false;
options.ShutdownTimeout = TimeSpan.FromSeconds(1);
options.AddCommunityToolkitIntegration();
})
Steps to Reproduce
Hello,
After updating to 5.16.0, I can no longer build/publish in release mode. I get this error during “_ManifestMerger”:
/Users/runner/work/1/s/Sources/XXXX/obj/Release/net9.0-android/AndroidManifest.xml:138:5-110 Error:
Element meta-data#io.sentry.proguard-uuid at AndroidManifest.xml:138:5-110 duplicated with element declared at AndroidManifest.xml:137:5-110
1>MANIFESTMERGER: /Users/runner/work/1/s/Sources/XXXX/obj/Release/net9.0-android/AndroidManifest.xml error: [/Users/runner/work/1/s/Sources/XXXX/XXXX.csproj::TargetFramework=net9.0-android]
Validation failed, exiting
If I build without Sentry, everything works fine. I reverted to 5.15.1 and it works without any issues.
I have a MAUI project and a .net android project, and both are giving me this error after updating Sentry to 5.16.0.
I use dotnet publish to build my application with parameters :
-p:SentryOrg=XXXXX -p:SentryProject=XXXXX -p:SentryUploadSymbols=true -p:SentryUploadSources=false -p:SentryUploadAndroidProguardMapping=true
And my PropertyGroup are :
.net android project :
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<Optimize>true</Optimize>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidEnableMultiDex>false</AndroidEnableMultiDex>
<AndroidPackageFormat>aab</AndroidPackageFormat>
<MtouchLink>SdkOnly</MtouchLink>
<AndroidDexTool>d8</AndroidDexTool>
<AndroidLinkTool>r8</AndroidLinkTool>
<AndroidCreateProguardMappingFile>True</AndroidCreateProguardMappingFile>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
<CreatePackage>false</CreatePackage>
<AndroidStoreUncompressedFileExtensions>.mp3</AndroidStoreUncompressedFileExtensions>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<AndroidTlsProvider>btls</AndroidTlsProvider>
<AndroidLinkMode>SdkOnly</AndroidLinkMode>
<BundleAssemblies>false</BundleAssemblies>
<RunAOTCompilation>true</RunAOTCompilation>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<EnableLLVM>false</EnableLLVM>
<AndroidStripILAfterAOT>true</AndroidStripILAfterAOT>
<CopyDebugSymbolFilesFromPackages>true</CopyDebugSymbolFilesFromPackages>
<CopyDocumentationFilesFromPackages>true</CopyDocumentationFilesFromPackages>
</PropertyGroup>
MAUI project :
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<UseInterpreter>false</UseInterpreter>
<MtouchDebug>False</MtouchDebug>
<AndroidPackageFormat>aab</AndroidPackageFormat>
<AndroidDexTool>d8</AndroidDexTool>
<AndroidLinkTool>r8</AndroidLinkTool>
<AndroidCreateProguardMappingFile>True</AndroidCreateProguardMappingFile>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidEnableMultiDex>false</AndroidEnableMultiDex>
<AndroidStoreUncompressedFileExtensions>.mp3</AndroidStoreUncompressedFileExtensions>
<UseNativeHttpHandler>true</UseNativeHttpHandler>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<Optimize>true</Optimize>
<BundleAssemblies>false</BundleAssemblies>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<MtouchLink>SdkOnly</MtouchLink>
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
<MtouchExtraArgs>-gcc_flags="-dead_strip"</MtouchExtraArgs>
<CodesignEntitlements>Platforms\iOS\Entitlements.production.plist</CodesignEntitlements>
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
<CreatePackage>false</CreatePackage>
<MtouchUseLlvm>true</MtouchUseLlvm>
<EnableCodeSigning>true</EnableCodeSigning>
<RunAOTCompilation>true</RunAOTCompilation>
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<EnableLLVM>false</EnableLLVM>
<AndroidStripILAfterAOT>true</AndroidStripILAfterAOT>
<CopyDebugSymbolFilesFromPackages>true</CopyDebugSymbolFilesFromPackages>
<CopyDocumentationFilesFromPackages>true</CopyDocumentationFilesFromPackages>
<DebugSymbols>true</DebugSymbols>
<DebugType>portable</DebugType>
</PropertyGroup>
Is this related to #4532?
Expected Result
Build OK
Actual Result
/Users/runner/work/1/s/Sources/XXXX/obj/Release/net9.0-android/AndroidManifest.xml:138:5-110 Error:
Element meta-data#io.sentry.proguard-uuid at AndroidManifest.xml:138:5-110 duplicated with element declared at AndroidManifest.xml:137:5-110
1>MANIFESTMERGER: /Users/runner/work/1/s/Sources/XXXX/obj/Release/net9.0-android/AndroidManifest.xml error: [/Users/runner/work/1/s/Sources/XXXX/XXXX.csproj::TargetFramework=net9.0-android]
Validation failed, exiting
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
- StatusShow more project fieldsNo status
Activity
linear commentedon Oct 6, 2025
NET-482
Flash0ver commentedon Oct 6, 2025
Thank you @pierre-galaup for the report.
It indeed seems to be related to #4532.
Updated docs via getsentry/sentry-docs#14995
@pierre-galaup
Are you explicitly setting
io.sentry.proguard-uuid?Or is the duplication caused by the combination of SentryUploadAndroidProguardMapping and AndroidCreateProguardMappingFile?
@alexsohn1126
Is this a scenario that we could/should guard against?
If this is a "usage error" or "ambiguity", could/should this be a warning instead of an error?
EIther way ... probably worth having an (updated) integration test around this scenario.
pierre-galaup commentedon Oct 6, 2025
@Flash0ver
No, I am not setting io.sentry.proguard-uuid in my code.
Would you like me to test something?
5 remaining items
pierre-galaup commentedon Oct 10, 2025
Hello,
I managed to reproduce it on a new project sample. It comes from “multiple” projects.
I have a MAUI project that depends on an Android/iOS class library and a C# class library.
I am attaching the complete project that causes this error.
The build command:
dotnet build --no-restore -c Release -f net9.0-android --verbosity normal -p:SentryOrg=test -p:SentryProject=test -p:SentryUploadSymbols=true -p:SentryUploadSources=false -p:SentryUploadAndroidProguardMapping=trueThe error:
ioSentryProguardUuid.zip
alexsohn1126 commentedon Oct 10, 2025
Thank you so much for the reproduction!
I was able to recreate the issue. I think the cause was that the
AndroidLib1project would also try to generate a UUID - along withioSentryProguardUuidproject - because we have the targetUpdateAndroidMetadatainsidebuildTransitive/Sentry.targets😮💨So transitively,
AndroidLib1generates a UUID and adds it to the assembly attributes, so doesioSentryProguardUuid.This is a case I haven't thought of yet. I think moving
UpdateAndroidMetadatatarget out ofbuildTransitivefolder should fix this issue. I'll try that and make a PR if that works.pierre-galaup commentedon Oct 11, 2025
It's a bit of a special case, in fact: we use it to have a common Android library between a MAUI project and a .net Android project (WearOS app).
If you need me to do any tests on my complete project or anything else, don't hesitate to ask.