-
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.
In a Blazor Web App, when I add the Counter component to the Home page, the site will crash when I navigate from Home to Counter (the dedicated page) and then back to Home. I get a JavaScript error in the Blazor.web.js file that states TypeError: Cannot read properties of null (reading 'insertBefore')
This does not happen in .NET 9 projects, only if I build a .NET 10 project. Also, this happens whether I am using Visual Studio 2026, VS Code, or even just dotnet run. It does not matter if I use localhost or use the new dev.localhost TLD.
Also, if I navigate to a different page (I created a /Demo page that was InteractiveServer) after the site starts up on Home, I can then use the site without issues. I can go to /Counter without a problem, I can go to /Home, then to /Counter and back without a problem. It is only if I navigate from /Home to /Counter directly on load that there is an issue. And that is only an issue when the Counter component is also on the /Home page.
I have attached a simple demo project that shows off the issue.
Original Comments
Feedback Bot on 12/10/2025, 06:26 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.