Skip to content

NavigationManager.NavigateTo("urlInOtherDomain") causes Uncaught (in promise) WebSocket is not in the OPEN state in Firefox #51936

@bc3

Description

@bc3

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

existing item: #19050

let this simple piece of code in a blazor server app

@page "/"
@inject NavigationManager NavManager

<PageTitle>Index</PageTitle>

<h1>Hello, world!</h1>

Welcome to your new app.

<SurveyPrompt Title="How is Blazor working for you?" />

<button onclick="@navigate">direct with js NavigationManager</button>

@code{
    public void navigate() {
        NavManager.NavigateTo("https://www.google.com");
    }
}

it runs fine in chrome, when you run it in firefox, you get exception: Uncaught (in promise) WebSocket is not in the OPEN state

Firefox.WebSocket.not.in.OPEN.state.mov

it is already described in #19050 and closed in #23224, but the problem still remains

Expected Behavior

it just goes to google without the socketexception, this is a simple version of our code. In our main project it is used to downlad a CSV file, and now the user always sees blazor disconnect.

Steps To Reproduce

use code snippet

Exceptions (if any)

Uncaught (in promise) WebSocket is not in the OPEN state

.NET Version

7

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions