sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Crash on Launch When Including Maui Sentry SDK Without Configuration in Release Builds

Open mgr44 opened this issue 4 months ago • 2 comments

Package

Sentry

.NET Flavor

.NET

.NET Version

8.0.0

OS

Android

SDK Version

4.12.1

Self-Hosted Sentry Version

No response

Steps to Reproduce

  1. Create a new Maui app project
  2. Include the Sentry.Maui nuget package 4.12.1
  3. Do not configure or reference the sentry package anywhere (don't change anything in the code).
  4. Build and Deploy either a release build, or a Debug build with trimming enabled in the Android options

Expected Result

The app should launch normally without issue.

Actual Result

The app crashes during launch. If this is done in a debug build then the following exception is observed:

Java.Lang.RuntimeException Message=Unable to get provider io.sentry.android.core.SentryInitProvider: java.lang.IllegalArgumentException: DSN is required. Use empty string or set enabled to false in SentryOptions to disable SDK.

mgr44 avatar Oct 14 '24 22:10 mgr44