Close received after close
Opened this issue · 5 comments
Somewhere between v1.8.10 and v1.8.11 (probably b0ec201), Websockets stopped working on Chrome (android) with the following error:
WebSocket connection to 'wss://[...]' failed: Close received after close
Hey, which version of the library are you using currently?
And it seems like the error you are seeing is from this library acting as a client? Could you give a bit more detail about how you are using this library as well as what's going on in the other end (Chrome/Android)? If you can, a minimum reproduction would be helpful.
We don't use it directly. It is used by github.com/improbable-eng/grpc-web.
Somehow, nhooyr.io/websocket was updated to v1.8.17 in one of our projects go.mod, which broke the application on Chrome/Android.
We had to revert to v1.8.10:
replace nhooyr.io/websocket => nhooyr.io/websocket v1.8.10
The server code is in websocket_wrapper.go.
The client code is the nice-grpc-web websocket transport.
I would recommend switching over to this repo and giving the latest release a try, which has a potential fix for the issue you’re experiencing.
It does not seems to be possible:
replace nhooyr.io/websocket => github.com/coder/websocket v1.8.13
$ go mod tidy
go: finding module for package github.com/coder/websocket/internal/errd
go: finding module for package github.com/coder/websocket
go: finding module for package github.com/coder/websocket/internal/test/xrand
go: finding module for package github.com/coder/websocket/internal/test/assert
go: finding module for package github.com/coder/websocket/internal/test/wstest
go: finding module for package github.com/coder/websocket/internal/wsjs
go: finding module for package github.com/coder/websocket/internal/util
go: finding module for package github.com/coder/websocket/internal/bpool
go: finding module for package github.com/coder/websocket/internal/xsync
go: finding module for package github.com/coder/websocket/wsjson
go: found github.com/coder/websocket/internal/bpool in github.com/coder/websocket v1.8.13
go: found github.com/coder/websocket/internal/errd in github.com/coder/websocket v1.8.13
go: found github.com/coder/websocket/internal/util in github.com/coder/websocket v1.8.13
go: found github.com/coder/websocket/internal/wsjs in github.com/coder/websocket v1.8.13
go: found github.com/coder/websocket in github.com/coder/websocket v1.8.13
go: found github.com/coder/websocket/internal/test/assert in github.com/coder/websocket v1.8.13
go: found github.com/coder/websocket/internal/test/wstest in github.com/coder/websocket v1.8.13
go: found github.com/coder/websocket/internal/test/xrand in github.com/coder/websocket v1.8.13
go: found github.com/coder/websocket/internal/xsync in github.com/coder/websocket v1.8.13
go: found github.com/coder/websocket/wsjson in github.com/coder/websocket v1.8.13
go: github.com/coder/websocket@v1.8.13 used for two different module paths (github.com/coder/websocket and nhooyr.io/websocket)