getsentry / getsentry/sentry-dotnet

Error ‘Package Sentry.Profiling is not supported on platform “Android”

Open
#4,004 5 comments 0 reactions 0 assignees View on GitHub
.NET Good First Issue Improvement
Dominant language
C#
Stars
770
Forks
248
Avg merge
3d 4h
Merged PRs (30d)
49

Description

### Package

Sentry.Maui

### .NET Flavor

.NET

### .NET Version

8.0.0

### OS

Android

### SDK Version

5.1.1 and 4.13.0

### Self-Hosted Sentry Version

_No response_

### Steps to Reproduce

1. Install the MAUI SDK in your app
2. Initialise the SDK as:
```
.UseSentry(options =>
{
options.Dsn = "_MY_DSN_";
options.DiagnosticLevel = SentryLevel.Debug;
// Set TracesSampleRate to 1.0 to capture 100% of transactions for tracing.
// We recommend adjusting this value in production.
options.TracesSampleRate = Constants.TelemetryConstants.TracesSampleRate;
options.CaptureFailedRequests = Constants.TelemetryConstants.CaptureFailedRequests;
options.AutoSessionTracking = Constants.TelemetryConstants.AutoSessionTracking;
options.MaxCacheItems = Constants.TelemetryConstants.MaxCacheItems;
})
```
3. Try to run and debug the app in an Android emulator/device

### Expected Result

As MAUI is a multiplatform framework and one codebase is used for multiple platforms. The SDK should identify the platform the app is targeting and not try to enable profiling for Android.

### Actual Result

The user gets the error: ‘Package Sentry.Profiling is not supported on platform “Android”.’

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.