-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
Status
Status