Skip to content

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

@vsfeedback

Description

@vsfeedback

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Author: Migration Bot πŸ€–The issue was created by a issue mover bot. The author may not be the actual author.Needs: Attention πŸ‘‹This issue needs the attention of a contributor, typically because the OP has provided an update.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issuearea-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions