🐛 Bug Report
When you add @attribute [StreamRendering] in SSR mode then the page won't load at all and crashes on refresh.
💻 Repro or Code Sample
#4831
- Add
@attribute [StreamRendering] to the weather.razor
- Open the page
🤔 Expected Behavior
I expect the page to load normally just like in the Blazor Web App templates
😯 Current Behavior
The page won't load correctly and then crashes on reload with this exception
System.ArgumentException: The renderer does not have a component with ID 52.
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetRequiredComponentState(Int32 componentId)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.GetComponentDepth(Int32 componentId)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendBatchAsStreamingUpdate(RenderBatch& renderBatch, TextWriter writer)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.UpdateDisplayAsync(RenderBatch& renderBatch)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
at Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.<WaitForQuiescence>g__ProcessAsynchronousWork|73_0()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.WaitForQuiescence()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(Int32 componentId, ParameterView initialParameters)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendStreamingUpdatesAsync(HttpContext httpContext, Task untilTaskCompleted, TextWriter writer)
💁 Possible Solution
🔦 Context
🌍 Your Environment
- OS & Device: Windows 11 64 Bit
- Browser latest Firefox, Chrome & Edge
- .NET 10 and latest dev-v5 branch - SSR project
🐛 Bug Report
When you add
@attribute [StreamRendering]in SSR mode then the page won't load at all and crashes on refresh.💻 Repro or Code Sample
#4831
@attribute [StreamRendering]to the weather.razor🤔 Expected Behavior
I expect the page to load normally just like in the Blazor Web App templates
😯 Current Behavior
The page won't load correctly and then crashes on reload with this exception
💁 Possible Solution
🔦 Context
🌍 Your Environment