Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
socket.io error when forcing websocket communication

We are having some trouble forcing websocket communication in our application. Basically when we allow polling everything works fine but we saw from time to time errors on websocket communications. After some research we changed the configuration to 'transports': ['websocket'], upgrade: false

When we restart the sockets are not working anymore and we are getting errors like this one

WebSocket connection to 'wss://our-server/socket.io/?partnerId=22222&EIO=3&transport=websocket' failed: Compressed bit must be 0 if no negotiated deflate-frame extension

We also created an issue that you can find here:

https://github.com/socketio/socket.io/issues/2925

The server is based on Node.js and the client is an ionic application with AngularJS.

Anyone experience the same issue? Any ideas how to tackle this?

Thanks!!!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Turns out that I was doing wrong the initialization of the websocket client

I was doing:

var socketIo = require('socket.io')(server, {
  path: '/myserver/socket.io',
  transports: ['websocket']
});
var client = socketIo.listen(server, {
  path: '/myserver/socket.io',
  transports: ['websocket']
});

and this works like a charm:

var client = require('socket.io')(server, {
  path: '/myserver/socket.io',
  transports: ['websocket']
});
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!