for anyone else troubleshooting this.
Improper Sec-WebSocket-Protocol Handling The error message in Chrome’s network logs:
"Error during WebSocket handshake: Response must not include 'Sec-WebSocket-Protocol' header if not present in request"
What This Means Your WebSocket server is sending a Sec-WebSocket-Protocol header, but the client (Chrome) did not request it. Firefox is more lenient with this, but Chrome strictly enforces the rule that if the client doesn't specify a Sec-WebSocket-Protocol, the server must not include it in the response.