websocket: Compressed messages fail in Safari
When Safari 13.1 for MacOS receives a compressed text message, it prints WebSocket connection to 'ws://localhost:8080/ws' failed: Could not decode a text frame as UTF-8 on the Javascript console and closes the WebSocket connection.
This is probably a bug in Safari. But this issue might help others to disable compression as a workaround. They have to pass AcceptOptions to Accept():
websocket.AcceptOptions{
CompressionMode: websocket.CompressionDisabled,
}
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (11 by maintainers)
Commits related to this issue
- Fix connection in safari by disabling websocket compression Subscription error: client.subscribeRead - error reading data: failed to get reader: failed to read frame header: EOF https://github.com/n... — committed to peer-calls/peer-calls by jeremija 7 years ago
- fix: New Safari does not handle compressed websockets. Refs: - https://github.com/tilt-dev/tilt/issues/4746 - https://github.com/gorilla/websocket/issues/731 - https://github.com/nhooyr/websocket/... — committed to jfyne/live by jfyne 4 years ago
- fix: New Safari does not handle compressed websockets. (#55) Refs: - https://github.com/tilt-dev/tilt/issues/4746 - https://github.com/gorilla/websocket/issues/731 - https://github.com/nhooyr/w... — committed to jfyne/live by jfyne 4 years ago
- cmd/derper, control/controlhttp: disable WebSocket compression The data that we send over WebSockets is encrypted and thus not compressible. Additionally, Safari has a broken implementation of compre... — committed to tailscale/tailscale by mihaip 4 years ago
- cmd/derper, control/controlhttp: disable WebSocket compression The data that we send over WebSockets is encrypted and thus not compressible. Additionally, Safari has a broken implementation of compre... — committed to tailscale/tailscale by mihaip 4 years ago
- fix: nhooyr/websocket/issues/218 safari websocket ssl bug — committed to cherish-chat/xxim-server by deleted user 4 years ago
- Workaround Safari Websocket Compression issue See: https://github.com/nhooyr/websocket/issues/218 — committed to poki/netlib by erikdubbelboer 4 years ago
- Workaround Safari Websocket Compression issue (#28) See: https://github.com/nhooyr/websocket/issues/218 — committed to poki/netlib by erikdubbelboer 4 years ago
- Clean empty, day old, lobbies on a 30min timer. (also snuck in the disabling of websocket compression, see https://github.com/nhooyr/websocket/issues/218#issuecomment-1738672008) — committed to poki/netlib by koenbollen 3 years ago
- Clean empty, day old, lobbies on a 30min timer. (#63) Currently all lobbies stay in the database even if they are empty. This change introduces a simple timer that deletes day old empty lobbies eve... — committed to poki/netlib by koenbollen 3 years ago
- websocket.go: disable compression, for reasons Summary: It's unreliable Long answer: See https://github.com/nhooyr/websocket/issues/218 Signed-off-by: Yonle <yonle@lecturify.net> — committed to Yonle/bostr2 by Yonle 2 years ago
Sorry I don’t currently have the time to help debug, in the middle of closing a home, working a new job and moving.
But I’ve reopened this issue to investigate at some future date.