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

fix: incorrect use of SentryNative within a WASM app #3363

Merged
merged 11 commits into from
May 13, 2024

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

CHANGELOG.md Outdated Show resolved Hide resolved
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
8 of 9 checks passed
@bitsandfoxes bitsandfoxes deleted the fix/blazor-wasm-nobueno branch May 13, 2024 15:22
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
2 participants