Prebuilt version fails on tls handshake
See original GitHub issueI’m trying to connect to a custom host from Node.js but i always get unavailable state
Pusher : : [“State changed”,“initialized -> connecting”] Pusher : : [“Connecting”,{“transport”:“ws”,“url”:“wss://my-domain.com:443/app/MY_APP_KEY?protocol=7&client=js&version=7.0.3&flash=false”}] Pusher : : [“State changed”,“connecting -> unavailable”]
I found out that the client automatically closes the TCP session as soon as the TLS handshake finishes No error is thrown on client and there are no logs at all on the server, Here the wireshark capture of the tcp handshake and immediate disconnection (the ip ending in 40 corresponds to my device, being the leftmost column the destination address of the packet)
I’ve been able to connect to the same ws endpoint with the same uri using pusher-client
and ws
npm packages.
The code i’m using right now:
let pusher = new Pusher(APP_KEY, {
wsHost: WS_ENDPOINT,
forceTLS: true,
enableStats: false,
enabledTransports: ['ws'],
})
Using Client
- Pusher-js 7.0.3
- Nodejs 14.15.5
- Windows 10 19042.844
Server
- Nginx with reverse proxy for ws endpoint
- laravel-websockets
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top GitHub Comments
Better create a ticket on Pusher support, linking this issue there. Otherwise they won’t look into issues.
I’ve been doing some more tests and i’ve found out that building locally and using that build allows to connect without any error
pusher-js
folder insidenode_modules
and download the dependencies withyarn install
make build_all
to build the new files