Skip to content

iOS <EnableAssemblyILStripping>false</EnableAssemblyILStripping> not working: symbols missing #4482

@giuseppenovielli

Description

@giuseppenovielli

Package

Sentry.Maui

.NET Flavor

.NET

.NET Version

9.0.200

OS

iOS

OS Version

18.4

Development Environment

Visual Studio Code (MacOS)

SDK Version

5.14.1

Self-Hosted Sentry Version

No response

Workload Versions

maui-ios 9.0.0/9.0.100 SDK 9.0.200

UseSentry or SentrySdk.Init call

.UseSentry(options =>
            {
                // The DSN is the only required setting.
                options.Dsn = Constants.SentryConstants.DNS;

                // Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing.
                // We recommend adjusting this value in production.
                options.TracesSampleRate = 1.0;
            })

Steps to Reproduce

  1. Create new .net maui application and sentry maui project
  2. into .csproj paste the follow property group e compile it from sentry project
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
		<Optimize>true</Optimize>
		
		<PublishTrimmed>true</PublishTrimmed>
		<TrimMode>partial</TrimMode>
		
		<DebugType>portable</DebugType>
		<DebugSymbols>true</DebugSymbols>

		<!-- Configure Sentry org and project -->
               <SentryOrg>example-org</SentryOrg>
               <SentryProject>example-project</SentryProject>

		<!-- Automatically creates a release when building your application. -->
		<SentryCreateRelease>true</SentryCreateRelease>

		<!-- Automatically associates commits with the release. -->
		<SentrySetCommits>true</SentrySetCommits>

		<!-- Optionally provide explicit flags to the set-commits command -->
		<SentrySetCommitOptions>--local</SentrySetCommitOptions>

		<!-- Sends symbols to Sentry, enabling symbolication of stack traces. -->
		<SentryUploadSymbols>true</SentryUploadSymbols>

		<!-- Sends sources to Sentry, enabling display of source context. -->
		<SentryUploadSources>true</SentryUploadSources>

		<!-- https://github.com/getsentry/sentry-dotnet/issues/4427 -->
		<EnableAssemblyILStripping>false</EnableAssemblyILStripping>

                 <!-- If you are targeting Android, sends proguard mapping file to Sentry. -->
		<SentryUploadAndroidProguardMapping>true</SentryUploadAndroidProguardMapping>

	</PropertyGroup>
  1. Into MainPage.xaml.cs add the follow code
protected override void OnAppearing()
{
          base.OnAppearing();

          throw new NotImplementedException('Method not implemented.');
}
  1. Set Compile mode to -> Release
  2. Compile and Run into an'IPhone device and launch app.
  3. The crash is visible to Sentry without the code context and symbols are missing.
Image

Expected Result

The crash is visible to Sentry but and code context is visible.

Actual Result

The crash is visible to Sentry without the code context and symbols are missing.

Metadata

Metadata

Assignees

Projects

Status

Done

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions