Skip to content

Sentry fails to initialize in Blazor with AoT enabled #3263

@klemmchr

Description

@klemmchr

Package

Sentry

.NET Flavor

.NET

.NET Version

8.0.0

OS

Browser

SDK Version

4.2.1

Self-Hosted Sentry Version

No response

Steps to Reproduce

Repro: sentry-blazor-repro.zip

  1. Build included Dockerfile
  2. Start docker image and bind port 8080
  3. Open http://localhost:8080 and open console

Expected Result

Web app loads properly and starts up. This works fine when using Sentry.Extensions.Logging 3.41.4 but breaks after doing the major upgrade to 4.

Actual Result

Web app fails to load

Error: AggregateException_ctor_DefaultMessage (sentry-native)
    at Jn (dotnet.runtime.8.0.3.b85ar3xvhg.js:3:31614)
    at xl (dotnet.runtime.8.0.3.b85ar3xvhg.js:3:182162)
    at dotnet.native.wasm:0xb7f885
    at dotnet.native.wasm:0xb8125f
    at dotnet.native.wasm:0xb86cc5
    at dotnet.native.wasm:0xe6866
    at dotnet.native.wasm:0x130d162
    at dotnet.native.wasm:0x132a1bb
    at dotnet.native.wasm:0x1309ad4
    at dotnet.native.wasm:0x12fced1

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Status

No status

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions