My Twitter streaming app using Socket.io works okay when visiting the site with the IP address and port, but live streaming throws an error, when using the d
Found the solution, and it was in fact simple! Posting the answer here, to help others facing a similar issue, because I was totally stuck on this for 2 days!
My issue was caused by a dependency update.
According to the release notes:
The new (V 2.0.0) major release brings several performance improvements, but also snuck into the bottom of the release notes was this:
This release is not backward-compatible, due to:
- A breaking change related to utf-8 encoding in engine.io-parser (socketio/engine.io-parser#81)
- an update to make the socket id on the client match the id on the server-side (socketio/socket.io-client#1058)
Please note that if you are using a self-signed certificate, rejectUnauthorized now defaults to true (socketio/engine.io-client#558).
Here's the full V2 release notes: https://github.com/socketio/socket.io/releases/tag/2.0.0
Make your app https, or sign your own requests, as per documentation. As a quick fix though, I just downgraded back to socket.io V 1.7.0 and it works perfectly