react-use-websocket
react-use-websocket copied to clipboard
FastAPI websocket connects and closes with error on mobile
A react app using a FastAPI websocket endpoint connects & communicates successfully from desktop, but connects and throws an onerror event on mobile.
Replacing useWebSocket with a basic manual websocket useEffect fixed the problem for me, so I assume the problem exists within the library somewhere.
I don't expect a fix (or even bug investigation) for this, I'm just leaving this here in case someone else with the problem is looking for info about it online.