I'm not able to connect the ios client app to the server.
Android is working fine.
Following socket client version i'm using.
We tried the following links:
- https://socket.io/docs/v4/troubleshooting-connection-issues/
- https://github.com/socketio/socket.io/issues/3794
Socket Server Version(node):
"socket.io": "^4.5.2"
iOS: Socket Client Version
pod 'Socket.IO-Client-Swift','16.0.0'
Android: Socket Client Version
'io.socket:socket.io-client:2.0.1'
Here is the error log.
2022-11-09 15:36:13.806244+0530 Chat[11058:250537] LOG SocketManager: Manager is being released
2022-11-09 15:36:13.809821+0530 Chat[11058:250537] LOG SocketIOClient{/}: Handling event: statusChange with data: [connecting, 2]
2022-11-09 15:36:13.810822+0530 Chat[11058:250537] LOG SocketIOClient{/}: Joining namespace /
2022-11-09 15:36:13.811809+0530 Chat[11058:250537] LOG SocketManager: Tried connecting socket when engine isn't open. Connecting
2022-11-09 15:36:13.812649+0530 Chat[11058:250537] LOG SocketManager: Adding engine
2022-11-09 15:36:13.816521+0530 Chat[11058:250965] LOG SocketEngine: Starting engine. Server: https://socketserver.com/
2022-11-09 15:36:13.817360+0530 Chat[11058:250965] LOG SocketEngine: Handshaking
2022-11-09 15:36:13.891828+0530 Chat[11058:250537] [UICollectionViewRecursion] cv == 0x7fc7f28afe00 Disabling recursion trigger logging
2022-11-09 15:36:14.011073+0530 Chat[11058:250979] [boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics
2022-11-09 15:36:14.031883+0530 Chat[11058:250936] LOG SocketEngine: Got message: 0{"sid":"MZvaOLNP7rHRyHPmAACE","upgrades":[],"pingInterval":25000,"pingTimeout":20000,"maxPayload":1000000}
2022-11-09 15:36:14.066076+0530 Chat[11058:250537] LOG SocketIOClient{/}: Handling event: websocketUpgrade with data: [["Connection": "upgrade", "Sec-WebSocket-Accept": "7Pq2JXa4nY+2HM4/iTfQnlr36zI=", "Server": "nginx/1.20.1", "Upgrade": "websocket", "Date": "Wed, 09 Nov 2022 10:06:14 GMT"]]
SocketAnyEvent: Event: websocketUpgrade items: Optional([["Connection": "upgrade", "Sec-WebSocket-Accept": "7Pq2JXa4nY+2HM4/iTfQnlr36zI=", "Server": "nginx/1.20.1", "Upgrade": "websocket", "Date": "Wed, 09 Nov 2022 10:06:14 GMT"]])
2022-11-09 15:36:14.068315+0530 Chat[11058:250537] LOG SocketManager: Engine opened Connect
2022-11-09 15:36:14.069540+0530 Chat[11058:250936] LOG SocketEngine: Writing ws: 0/, has data: false
2022-11-09 15:36:14.070357+0530 Chat[11058:250936] LOG SocketEngineWebSocket: Sending ws: 0/, as type: 4
2022-11-09 15:36:14.092916+0530 Chat[11058:250936] LOG SocketEngine: Got message: 44{"message":"invalid"}
2022-11-09 15:36:14.094201+0530 Chat[11058:250537] LOG SocketParser: Parsing 4{"message":"invalid"}
2022-11-09 15:36:14.098295+0530 Chat[11058:250537] LOG SocketParser: Decoded packet as: SocketPacket {type: 4; data: [{
message = invalid;
}]; id: -1; placeholders: -1; nsp: /}
2022-11-09 15:36:14.099612+0530 Chat[11058:250537] LOG SocketIOClient{/}: Handling event: error with data: [{
message = invalid;
}]
SocketAnyEvent: Event: error items: Optional([{
message = invalid;
}])
2022-11-09 15:36:39.094504+0530 Chat[11058:250935] LOG SocketEngine: Got message: 2
2022-11-09 15:36:39.094918+0530 Chat[11058:250935] LOG SocketEngine: Writing ws: has data: false
2022-11-09 15:36:39.094992+0530 Chat[11058:250537] LOG SocketIOClient{/}: Handling event: ping with data: []
SocketAnyEvent: Event: ping items: Optional([])
2022-11-09 15:36:39.095224+0530 Chat[11058:250935] LOG SocketEngineWebSocket: Sending ws: as type: 3