Skip to content

Blazor hot reload always fails with unexpected drror #63871

@vsfeedback

Description

@vsfeedback

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


[severity:It's more difficult to complete my work]
image.png

Every time I edit any file.


10:35:56.68 Prestwood.Integrations (Web server): Hot reload session started
10:36:00.57 Prestwood.Integrations (Web assembly): Hot reload session started
10:37:16.45 Prestwood.Integrations (Web assembly): Sending updates to running application
10:37:16.48 Prestwood.Integrations (Web assembly): [Error] Applying updates to the application failed. Web socket connection to the browser has been closed: 
10:37:16.48 An unexpected error has occurred, any pending updates have been discarded.

The browser dev tools shows two web socket connections on the network tab and this in the console.

[2025-09-29T09:43:30.610Z] Information: Connection disconnected. blazor.web.js:1:47009
[2025-09-29T09:43:35.734Z] Information: Normalizing '_blazor' to 'https://localhost:5202/_blazor'. blazor.web.js:1:47009
[2025-09-29T09:43:35.759Z] Information: WebSocket connected to wss://localhost:5202/_blazor?id=Fc2ONu9sAequYFZN1fnwKw. blazor.web.js:1:47009
The connection to wss://localhost:5202/_blazor?id=Fc2ONu9sAequYFZN1fnwKw was interrupted while the page was loading. blazor.web.js:1:81337
[2025-09-29T09:44:15.830Z] Information: (WebSockets transport) There was an error with the transport. blazor.web.js:1:47009
[2025-09-29T09:44:15.830Z] Error: Connection disconnected with error 'Error: WebSocket closed with status code: 1006 (no reason given).'. blazor.web.js:1:46926
[2025-09-29T09:44:18.845Z] Information: Normalizing '_blazor' to 'https://localhost:5202/_blazor'. blazor.web.js:1:47009
[2025-09-29T09:44:25.655Z] Warning: Error from HTTP request. TypeError: NetworkError when attempting to fetch resource.. blazor.web.js:1:46966
[2025-09-29T09:44:25.655Z] Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:46926
[2025-09-29T09:44:25.655Z] Error: Failed to start the connection: Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:46926
[2025-09-29T09:44:25.656Z] Error: Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:40375
[2025-09-29T09:44:25.656Z] Error: Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:40375
[2025-09-29T09:44:46.120Z] Information: Normalizing '_blazor' to 'https://localhost:5202/_blazor'. blazor.web.js:1:47009
[2025-09-29T09:44:53.154Z] Warning: Error from HTTP request. TypeError: NetworkError when attempting to fetch resource.. blazor.web.js:1:46966
[2025-09-29T09:44:53.155Z] Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:46926
[2025-09-29T09:44:53.155Z] Error: Failed to start the connection: Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:46926
[2025-09-29T09:44:53.155Z] Error: Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:40375
[2025-09-29T09:44:53.156Z] Error: Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:40375
[2025-09-29T09:45:13.158Z] Information: Normalizing '_blazor' to 'https://localhost:5202/_blazor'. blazor.web.js:1:47009
[2025-09-29T09:45:19.555Z] Warning: Error from HTTP request. TypeError: NetworkError when attempting to fetch resource.. blazor.web.js:1:46966
[2025-09-29T09:45:19.555Z] Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:46926
[2025-09-29T09:45:19.555Z] Error: Failed to start the connection: Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:46926
[2025-09-29T09:45:19.556Z] Error: Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:40375
[2025-09-29T09:45:19.556Z] Error: Error: Failed to complete negotiation with the server: TypeError: NetworkError when attempting to fetch resource. blazor.web.js:1:40375
[2025-09-29T09:45:41.208Z] Information: Normalizing '_blazor' to 'https://localhost:5202/_blazor'. blazor.web.js:1:47009

​```

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: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityarea-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions