Skip to content

Conversation

@vaind
Copy link
Collaborator

@vaind vaind commented May 13, 2024

Fixes #3263 by disabling sentry-native SDK init when running under WASM AOT.

Tested manually by running the Sentry.Samples.AspNetCore.Blazor.Wasm app produced by dotnet publish -c Release. Proper tests could be part of #2021

else
{
#pragma warning restore CS0162 // Unreachable code detected
options.LogDebug("This doesn't look like a Native AOT application build.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the // TODO this probably more closely represents trimming rather than NativeAOT?. Enabling AOT compilation and then reading this in the logs does seem odd.

@bitsandfoxes bitsandfoxes merged commit c96e3ef into main May 13, 2024
@bitsandfoxes bitsandfoxes deleted the fix/blazor-wasm-nobueno branch May 13, 2024 15:22
@github-actions
Copy link
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- incorrect use of SentryNative within a WASM app ([#3363](https://github.com/getsentry/sentry-dotnet/pull/3363))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against 5427842

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sentry fails to initialize in Blazor with AoT enabled

3 participants