pmfl
pmfl

Reputation: 2109

Unrecognized frame opcode: 5 and web socket closes

I get this error very often in my web socket application and web socket immediately closes. The only error message I see is "Unrecognized frame opcode: 5 " in my browser console. Can anyone give me an idea why and in which case this error occurs.

Thanks!

Upvotes: 2

Views: 10004

Answers (1)

igorw
igorw

Reputation: 28259

The final draft of the WebSocket RFC 6455 defines opcodes 0, 1, 8, 9 and 10. Old versions (e.g. version 6) have defined opcode 5 to be a binary frame. This is now obsoleted, that opcode no longer exists.

Your server is outdated and only supports old versions of the WebSocket protocol. Many WebSocket servers support multiple versions and are able to switch between them. You should use a server that does that.

Upvotes: 2

Related Questions