-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
This issue has been moved from a ticket on Developer Community.
[severity:Other]
Head content throws exceptions when using global interactive server mode.
Repro:
-
Create a new blazor server app project.
-
For "Interactive Render Mode", select "Server".
-
For "Interactivity Location", select "Global".
-
Add a HeadContent component to the "Home.razor" page. Inside that component, and any valid HTML (doesn't have to be a blazor component).
-
Run the application.
-
From the "Home Page", navigate to the "Counter" page.
-
Click on the browsers "Back" button (using Edge in this case) or click the sidebar nav link for Counter that also has a meta tag
-
Default blazor error message appears.
Here is the error message from the Output or Immediate Window
Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: TypeError: Cannot read properties of null (reading 'insertBefore')
System.InvalidOperationException: TypeError: Cannot read properties of null (reading 'insertBefore')
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32[] updatedComponents)
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Error: Unhandled exception in circuit 'XwKDhTBqDdbOIORvnq38ZTsq1zlmyisXYpb55dTgcUg'.
System.AggregateException: One or more errors occurred. (TypeError: Cannot read properties of null (reading 'insertBefore'))
---> System.InvalidOperationException: TypeError: Cannot read properties of null (reading 'insertBefore')
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32[] updatedComponents)
--- End of inner exception stack trace ---
Wait for the Microsoft Developer Community Bot to tell us that this is closed, not enough info or this is expected with no further explanation.
Original Comments
Feedback Bot on 3/28/2024, 00:45 AM:
(private comment, text removed)
Original Solutions
(no solutions)