I've a web app that connects to a service via WebSockets. This app works fine in Chrome/Firefox for desktop, however Chrome for mobile gives the error:
WebSocket connection to 'ws://192.168.0.11:8080/' failed: One or more reserved bits are on: reserved1 = 0, reserved2 = 1, reserved3 = 0
The server uses a recent version of libwebsockets.
This error occurs during the initial connection, whereupon a moderately large pile of JSON data is sent to the client over multiple 2048 byte frames.
The server exposes several different WebSockets. Some of them fail in other ways too:
Could not decode a text frame as UTF-8.
...and...
Unrecognized frame opcode: 6
A pattern that predicts which should fail and which should succeed has not yet revealed itself.
I suspect some kind of framing issue here. I've reviewed the messages in WireShark and they look correct to me. The headers appear to be correct.
Why would this work in desktop Chrome/Firefox but fail in Chrome for Android?