Open t0msk opened 6 months ago
Do you disable auto-connect on component to ensure it connects with params instead at your bp call time?
Sorry for late reply, but I was doing other stuff, so I would like to get back to this issue, I updated to UE 5.4 and newest SocketIO client and issue still persist, if I run my server, I can connect to it via SocketIO Online testing tool, but with same params I cannot connect via UE.
Yes auto connect is disabled in BP, so it tries to connect using params:
and these are working params in online testing tools:
### EDIT:
Okay I looked into my server logs and there is some connection happening:
2024-09-27T13:45:56.733059Z DEBUG on_connect{sid="jIEFGFl3IX8DFP_d"}: socketioxide::client: 161: eio socket connect
2024-09-27T13:45:56.733095Z DEBUG on_connect{sid="jIEFGFl3IX8DFP_d"}: socketioxide::client: 97: spawning connect timeout task
2024-09-27T13:45:56.733138Z DEBUG engineioxide::transport::ws: 133: [sid=jIEFGFl3IX8DFP_d] new websocket connection
2024-09-27T13:45:56.733273Z DEBUG socketioxide::client: 205: Received message: "0{}"
2024-09-27T13:45:56.733287Z DEBUG socketioxide::client: 216: Packet: Packet { inner: Connect(Some("{}")), ns: "/" }
2024-09-27T13:45:56.733297Z DEBUG socketioxide::client: 47: auth: Some("{}")
Socket.IO connected: "/" jIEFGFl3IX8DFP_d
2024-09-27T13:45:56.741352Z DEBUG on_connect{sid="YfBM4EQMkJ6g7zQf"}: socketioxide::client: 161: eio socket connect
2024-09-27T13:45:56.741381Z DEBUG on_connect{sid="YfBM4EQMkJ6g7zQf"}: socketioxide::client: 97: spawning connect timeout task
2024-09-27T13:45:56.741429Z DEBUG engineioxide::transport::ws: 133: [sid=YfBM4EQMkJ6g7zQf] new websocket connection
2024-09-27T13:45:56.741565Z DEBUG socketioxide::client: 205: Received message: "0{}"
2024-09-27T13:45:56.741582Z DEBUG socketioxide::client: 216: Packet: Packet { inner: Connect(Some("{}")), ns: "/" }
2024-09-27T13:45:56.741595Z DEBUG socketioxide::client: 47: auth: Some("{}")
Socket.IO connected: "/" YfBM4EQMkJ6g7zQf
but when I do branch in UE while checking "is connected" I always get false:
Problem was that path was "/socket.io" instead of "socket.io", looks like its working now.
But there is still issue that after connection I get in that branch "no connected condition", why?
EDIT: but when I listen on "Connected" event it will fire and I will get all information like session ID.
Hello,
I use Unreal Engine 5.3.2 on Linux, this is my Blueprint graph for connection:
TL;DR I have Persistent level where is SocketIO actor placed, so I can access it from everywhere, as you can see I just take ref from Persistent level, access SocketIO component and call Connect with params.
Problem is that my server doesn't register any connection, but when I use some SocketIO testing tool like: https://amritb.github.io/socketio-client-tool
and I set settings like:
It will connect from that SocketIO testing tool, but not from UE, even when params are the same.
My SocketIO server is written in Rust, it looks like:
For Rust I use this SocketIO server implementation: https://github.com/Totodore/socketioxide