socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Emit to room not working when client is Safari 15.5

Open Horsty80 opened this issue 3 years ago • 1 comments

I have try with Chrome and Firefox is working fine that expected.

Describe the bug I have a game with client is in react/typescript, server is in nodeJs/express/typescript When I try to emit on specific room with

        socket.to(message.roomId).emit("start_game", { start: false, symbol: "o" });

The client doesn't get the event. So the listener method isn't fired.

  public async onStartGame(socket: Socket, listiner: (options: IStartGame) => void) {
    socket.on("start_game", () => console.log(options)); 
// attempt to get { start: false, symbol: "o" } but is never fired
  }

Notice that socket.emit is working fine.

        socket.emit("start_game", { start: true, symbol: "x" });

To Reproduce

Try to communicate with a server and a client using Safari 15.5

Server "socket.io": "^4.5.1",

Client "socket.io-client": "^4.5.1"

Platform:

  • on macOS Monterey version 12.4
  • Macbook pro

Additional context

Horsty80 avatar Jul 02 '22 00:07 Horsty80

Any news on this ? I can see some issues are open on similary item :

  • #4263
  • #4397 Maybe some regression due to new Safari version ?

Horsty80 avatar Jul 11 '22 13:07 Horsty80