Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

220
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda