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

134
Views
Socketio client not fire method connect

I created a simple Socket.io server, if I test it using the chrome application "Socketio Checker" it returns that everything is working.

enter image description here

However, when I try to connect through my client, it always returns that I am not connected and also the "connect" events are not fired.

I'm using the "socketio-client" lib in Vuejs.

My code:

const sock = io(`http://localhost:3005`, {reconnect: true, transports: ['websocket', 'polling', 'flashsocket']});
        console.log(" RES =>", sock)
        console.log("HERE 22")        
        console.log('check 1', sock.connected);
        sock.on("connect", function(socket){ 
          console.log("HERE???")
          console.log(socket.connected); // true
          socket.emit('register', "810f5f4a07b9631107a7bbad39e455-0", "123");
        });

        sock.on('disconnect', function(socket) {
          console.log("Socket disconnected.");
          socket.socket.reconnect();
        })

        sock.on("connection", (socket) => {
          console.log("TADHFSHDFHDSHF", socket.id); // x8WIv7-mJelg7on_ALbx
        });

My response:

---- start ----
RES => Socket {connected: false, disconnected: true, receiveBuffer: Array(0), sendBuffer: Array(0), ids: 0, …}
HERE 22
check 1 false
---- the end ----
about 4 years ago · Juan Pablo Isaza
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!