ws: ERROR Invalid WebSocket frame: invalid status code 22373

  • [x ] I’ve searched for any related issues and avoided creating a duplicate issue.

Description

This appears to be a new issue that is creeping up due to a change somewhere. There are only a few mentions of this code 22373 across the internet but it’s been in the last month or so. To me this suggests are recent changes somewhere related to websockets.

The error is ERROR Invalid WebSocket frame: invalid status code 22373

Screen Shot 2021-07-24 at 11 22 53 AM

This error has been completely crashing our analytics server whenever it occurs. Would suggest that WS has a way to catch errors like this as we are likely having data loss because of it.

Reproducible in:

  • version: latest
  • Node.js version(s): 14
  • OS version(s): latest

Steps to reproduce:

  1. Unsure how to reproduce a socket frame with this error code

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

FWIW, we’ve noticed Safari on iOS 15 beta (Version/15.0 Mobile/15E148 Safari/604.1) send an invalid close frame. The frame is missing the two-byte status code, so the first two bytes of the body (“WebSocket is closed…”) are interpreted as the status code: 'We' == 0x5765 == 22373.

Screen Shot 2021-07-26 at 4 11 10 PM