socket.io
socket.io copied to clipboard
Emit to room not working when client is Safari 15.5
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
- I use
socket-controllerslibrairie that allow me to write decorator for event handling socket-controllers - The client side
- The server side
Any news on this ? I can see some issues are open on similary item :
- #4263
- #4397 Maybe some regression due to new Safari version ?