question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Prebuilt version fails on tls handshake

See original GitHub issue

I’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) image

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
shehicommented, Jul 23, 2021

Better create a ticket on Pusher support, linking this issue there. Otherwise they won’t look into issues.

1reaction
Rubenseicommented, Mar 5, 2021

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

  • Cd to pusher-js folder inside node_modules and download the dependencies with yarn install
  • make build_all to build the new files
Read more comments on GitHub >

github_iconTop Results From Across the Web

Rehash: How to Fix the SSL/TLS Handshake Failed Error
The TLS Handshake Failed error can originate from the client or the server, here's a guide for fixing the problem for both users...
Read more >
How to Fix the "SSL Handshake Failed" Error - Elegant Themes
The "SSL handshake failed" error can be caused by both client and server-side issues. Let's find out what they are and how to...
Read more >
How to Fix the SSL/TLS Handshake Failed Error - SSL2BUY
This error can arise from both (client and server) sides, and it doesn't require mending. However, when versions and cipher suites are involved,...
Read more >
Error creating connection to SQL Server: TLS Handshake failed
Just a quick question, i have set up the MSSQL infrastructure component in NewRelic and found this message in the logs–>
Read more >
How to Fix the 'Performing a TLS Handshake' Error in Mozilla ...
What Causes the “Performing a TLS Handshake” Error in Mozilla Firefox for Windows? · Addons you have added recently – Extensions and plugins...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found