socket.io-client-swift icon indicating copy to clipboard operation
socket.io-client-swift copied to clipboard

Socket io server v4 and swift client 16.0.1

Open JimmyBjorklund opened this issue 3 years ago • 16 comments

Hi We have a socket io server running v4 but the swift client cannot connect. Is this expected? The server accepts connections from android and node justfine. We have allowEIO3: false on the server. The swift client get the upgrade message but after that nothing happens.

Thanks for any help. /Jimmy

JimmyBjorklund avatar May 07 '21 10:05 JimmyBjorklund

Same thing here, this is quite a dealbreaker for us

vandadnp avatar May 07 '21 10:05 vandadnp

Yes I’m looking into this. A new version should be coming soon

nuclearace avatar May 07 '21 10:05 nuclearace

@nuclearace hi. Do you have any updates on this please?

vandadnp avatar May 10 '21 05:05 vandadnp

@nuclearace hi there again. Do you have any updates on this please?

vandadnp avatar May 12 '21 08:05 vandadnp

@nuclearace any updates on this would be really helpful. thank you for your efforts and time

vandadnp avatar May 17 '21 04:05 vandadnp

@nuclearace hi again, since 20 days have gone by, I thought to ask you for some pointers as to where the bug lies and we could try to solve it ourselves and send a PR to you if that would help?

vandadnp avatar May 27 '21 05:05 vandadnp

We really stuck on this :(

Sadmansamee avatar Jun 23 '21 05:06 Sadmansamee

@Sadmansamee agreed, we too. The state of this repository is quite alarming. We are ready to help fix this ourselves but absolutely zero communication so far from @nuclearace unfortunately

vandadnp avatar Jun 23 '21 10:06 vandadnp

Hi everyone! I was not able to reproduce the issue: https://github.com/socketio/socket.io-swift-fiddle

Am I missing something? Could it be a version mismatch?

darrachequesne avatar Jul 10 '21 08:07 darrachequesne

No we use the lates on the backen and the latest of this client should work without the allowEIO3, this work great for node clients and android its only the swift client that is not working.

JimmyBjorklund avatar Aug 10 '21 17:08 JimmyBjorklund

Hi everyone! I was not able to reproduce the issue: https://github.com/socketio/socket.io-swift-fiddle

Am I missing something? Could it be a version mismatch?

You ar missing to set the options: this.io = new SocketIO.Server(httpServer, { path: path, allowEIO3: false });

JimmyBjorklund avatar Aug 10 '21 17:08 JimmyBjorklund

@darrachequesne have you seen the above message from @JimmyBjorklund ?

vandadnp avatar Sep 02 '21 11:09 vandadnp

@darrachequesne have you seen the above message from @JimmyBjorklund ?

I downgraded my NodeJs SocketIO version to 2.4.0 and it worked

Pic2490 avatar Sep 04 '21 20:09 Pic2490

@JimmyBjorklund hmm, that's weird, on the server side:

  • allowEIO3 defaults to false (doc)
  • path defaults to "/socket.io/", which is the same value as the client here (doc)

That being said, the path must match on the server and the client. Are you using a custom path?

@Pic2490 please check the compatibility table here: https://github.com/socketio/socket.io-client-swift/blob/master/Usage%20Docs/Compatibility.md

darrachequesne avatar Sep 05 '21 04:09 darrachequesne

The swift client issue is still not fixed, and adding .connectParams(["EIO": "3"]) doesn't help that. Should we wait for an update?

rouzbeh-abadi avatar Sep 09 '22 13:09 rouzbeh-abadi

Wow, I spent the last 2 days pulling my hair on this one. And downgrading both iOS and Node to EIO3 solved the issue...

Ryce avatar Apr 23 '23 20:04 Ryce