Skip to content

.NET 10 Blazor navigation from wasm to interactive server broken #64472

@AksTheNerd

Description

@AksTheNerd

Describe the bug

Error when navigating from "@rendermode InteractiveWebAssembly" page via Nav menu with href to a page which has @rendermode InteractiveServer Set.

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertBefore')
at q (blazor.web.j8lzlu28q6.js:1:22605)
at blazor.web.j8lzlu28q6.js:1:182422
at li (blazor.web.j8lzlu28q6.js:1:182431)
at si (blazor.web.j8lzlu28q6.js:1:179662)
at ai (blazor.web.j8lzlu28q6.js:1:181600)
at si (blazor.web.j8lzlu28q6.js:1:179225)
at ai (blazor.web.j8lzlu28q6.js:1:181600)
at si (blazor.web.j8lzlu28q6.js:1:179225)
at ai (blazor.web.j8lzlu28q6.js:1:181600)
at si (blazor.web.j8lzlu28q6.js:1:179225)

Expected Behavior

It just works with .net8 and .net9.

Steps To Reproduce

Create a Sample Blazor (Auto) App.

  1. Move (or Create) the Home page to the Client project
  2. IMPORTANT-> Set @rendermode InteractiveWebAssembly on the Home page
  3. IMPORTANT-> Set @rendermode InteractiveServer on the Weather page
  4. Start the app and try to navigate to the Weather page from the NAV (via url it works)
    Result: The navigation doesn't work and you get the exception->

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertBefore')
at q (blazor.web.j8lzlu28q6.js:1:22605)
at blazor.web.j8lzlu28q6.js:1:182422
at li (blazor.web.j8lzlu28q6.js:1:182431)
at si (blazor.web.j8lzlu28q6.js:1:179662)
at ai (blazor.web.j8lzlu28q6.js:1:181600)
at si (blazor.web.j8lzlu28q6.js:1:179225)
at ai (blazor.web.j8lzlu28q6.js:1:181600)
at si (blazor.web.j8lzlu28q6.js:1:179225)
at ai (blazor.web.j8lzlu28q6.js:1:181600)
at si (blazor.web.j8lzlu28q6.js:1:179225)

Exceptions (if any)

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'insertBefore')
at q (blazor.web.j8lzlu28q6.js:1:22605)
at blazor.web.j8lzlu28q6.js:1:182422
at li (blazor.web.j8lzlu28q6.js:1:182431)
at si (blazor.web.j8lzlu28q6.js:1:179662)
at ai (blazor.web.j8lzlu28q6.js:1:181600)
at si (blazor.web.j8lzlu28q6.js:1:179225)
at ai (blazor.web.j8lzlu28q6.js:1:181600)
at si (blazor.web.j8lzlu28q6.js:1:179225)
at ai (blazor.web.j8lzlu28q6.js:1:181600)
at si (blazor.web.j8lzlu28q6.js:1:179225)

.NET Version

10

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions