aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Blazor Web App Crash in .NET 10 When Auto Component on the Homepage

Open vsfeedback opened this issue 1 month ago • 1 comments

This issue has been moved from a ticket on Developer Community.


BlazorNet10BugRepro.zip

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.

vsfeedback avatar Dec 10 '25 10:12 vsfeedback

Here is a repro project for this issue: https://github.com/IAmTimCorey/BlazorApp11

TimCorey avatar Dec 11 '25 21:12 TimCorey

I’m experiencing the same issue as well. 2026 looks very serious.

ibeuel avatar Dec 18 '25 07:12 ibeuel