Skip to content

FieldAccessException when using Blazor and generic async methods #526

@GeertvanHorrik

Description

@GeertvanHorrik

When trying to trace some methods in Blazor (WASM) in overridden methods, I get a "FieldAccessException".

NetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer ]  Unhandled exception rendering component:  Field `<GetUserAsync>d__2`1:methodTimerMessage' is inaccessible from method `MyApp.UI.Services.MyAppUserManager/<GetUserAsync>d__2`1<Blorc.OpenIdConnect.User`1<Blorc.OpenIdConnect.Profile>>:StopMethodTimerStopwatch ()'
 
 System.FieldAccessException: Field `<GetUserAsync>d__2`1:methodTimerMessage' is inaccessible from method `MyApp.UI.Services.MyAppUserManager/<GetUserAsync>d__2`1<Blorc.OpenIdConnect.User`1<Blorc.OpenIdConnect.Profile>>:StopMethodTimerStopwatch ()'

I am trying to create a repro with unit tests for this.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions