8000 v2 compatibility mode not working on iOS · Issue #3794 · socketio/socket.io · GitHub
[go: up one dir, main page]

Skip to content
v2 compatibility mode not working on iOS #3794
@seth-gravy

Description

@seth-gravy

Describe the bug
After updating to socket.io 3.1.1 and setting allowEIO3: true, Android clients can connect as expected. However, iOS clients using Socket.IO-Client-Swift', '15.2.0' are unable to connect.

I'm getting this string on iOS: [0] String "connection closed by server. code=1000, type=protocolError"

To Reproduce

Socket.IO server version: 3.1.1
engine.io@4.1.1

Server

import { Server } from "socket.io";

const io = new Server(3000, {
  allowEIO3: true
});

io.on("connection", (socket) => {
  console.log(`connect ${socket.id}`);

  socket.on("disconnect", () => {
    console.log(`disconnect ${socket.id}`);
  });
});

Socket.IO client version: iOS 15.2.0

Expected behavior
iOS can connect.

Platform:

  • Device: iPhone 8
  • OS: iOS 14

Additional context
Android works fine.
Updating iOS to 16.0.0 works fine, but that's because it's using socket.io v3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0