Skip to content
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

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

Open
mgr44 opened this issue Oct 14, 2024 · 2 comments

Comments

@mgr44
Copy link

mgr44 commented Oct 14, 2024

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
Copy link
Author

mgr44 commented Oct 14, 2024

This issue isn't a big problem on it's own. Once sentry is configured properly it goes away. Or the package can just be removed. However, it did cause me issues when I was trying to reproduce a different trimming related problem: #3680

When I tried to simplify my project I inadvertently caused this error with similar symptoms as 3680, so i took me a while to understand what was going on. In any case, simply including a package should not cause a crash.

@jamescrosswell
Copy link
Collaborator

simply including a package should not cause a crash

Agreed, thanks for reporting. We'll look into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Status: No status
Development

No branches or pull requests

2 participants