socket.io
socket.io copied to clipboard
App Crashed on iOS
Describe the bug My app is crashed when i initialise my socket on ios device.
To Reproduce
Please fill the following code example:
Socket.IO server version: 2.1.1
Server
import { Server } from "socket.io";
const io = new Server(3000, {});
io.on("connection", (socket) => {
console.log(`connect ${socket.id}`);
socket.on("disconnect", () => {
console.log(`disconnect ${socket.id}`);
});
});
Socket.IO client version: 2.1.1
Client
import { io } from "socket.io-client";
const socket = io("ws://localhost:3000/", {});
socket.on("connect", () => {
console.log(`connect ${socket.id}`);
});
socket.on("disconnect", () => {
console.log("disconnect");
});
Expected behavior should be working
Platform:
- Device: [e.g. iphone 14 Pro]
- OS: [e.g. ios 16.1.1]
Can you explain it a bit more and why are passing in an empty object to the constructors?
@gulsher7 is there any logs in the console?