Blazor Components Broken

Just upgrade the NuGet package to 7.0 and it broke my app. Was able to downgrade to 6.6.4 to fix.

  • NullReferenceException: Object reference not set to an instance of an object.

    • Radzen.Blazor.RadzenLayout.GetComponentCssClass()

    • Radzen.RadzenComponent.GetCssClass()

    • Radzen.Blazor.RadzenLayout.BuildRenderTree(RenderTreeBuilder __builder)

    • Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, out Exception renderFragmentException)

    • Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

    • Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

    • Microsoft.AspNetCore.Components.RenderTree.Renderer.AddToRenderQueue(int componentId, RenderFragment renderFragment)

    • Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()

    • Microsoft.AspNetCore.Components.ComponentBase.CallOnParametersSetAsync()

    • Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

    • Microsoft.AspNetCore.Components.Rendering.ComponentState.SetDirectParameters(ParameterView parameters)

    • Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(int componentId, ParameterView initialParameters)

    • Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.BeginRenderingComponent(IComponent component, ParameterView initialParameters)

    • Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.RenderEndpointComponent(HttpContext httpContext, Type rootComponentType, ParameterView parameters, bool waitForQuiescence)

    • System.Runtime.CompilerServices.ValueTaskAwaiter.GetResult()

    • Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)

    • Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)

    • Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext+<>c+<b__10_0>d.MoveNext()

    • Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions+<>c__DisplayClass1_1+<b__1>d.MoveNext()

    • Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)

    • Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)

    • Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

Any idea on how to reproduce this exception? We are using RadzenLayout in our demos as well however everything works normally:

I saw a case when a NullReferenceException could occur. Will release a hotfix shortly.

1 Like

Thank you for the quick response korchev!