'Blazor Server error aspnetcore-browser-refresh.js:234 WebSocket connection to 'wss://localhost:56871/' failed
Running a Blazor Server app is showing a partially rendered page with a browser console error of:
aspnetcore-browser-refresh.js:234 WebSocket connection to 'wss://localhost:56871/' failed
It would appear that no recent changes have been made to the code. There doesn't seem to be any code issues, how can I go about isolating this issue?
Solution 1:[1]
EDIT:
This issue has now been fixed in v17.1.5. You would want to update to this version.
Reference to release notes: https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-notes#17.1.5
Original Answer to rollback install:
It appears that this is a bug in Visual Studio v17.1.1. If I revert back to v17.0 then the application launches successfully.
FIX:
- Uninstall Visual Studio v17.1.1 (via VS Installer)
- Install specific version v17.0.7 package from https://docs.microsoft.com/en-us/visualstudio/releases/2022/release-history
Reference to the bug (a report indicates it is also present in 17.1.2): https://developercommunity2.visualstudio.com/t/WebSocket-connection-to-wss:-fail/1670519?q=ERR_CONNECTION_RESET&ftype=problem&space=8&stateGroup=active&sort=newest
Solution 2:[2]
installing preview version 17.2 also solves this problem
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Media Progress |
