getnamo / SocketIOClient-Unreal

Socket.IO client plugin for the Unreal Engine.
Other
885 stars 239 forks source link

LuminOS untested #114

Closed getnamo closed 2 years ago

getnamo commented 5 years ago

Latest version (v1.0.0) appears to compile for Lumin platform, but it would be helpful to have someone with the actual device test that it works as expected.

kjsujesh commented 4 years ago

Built for Lumin. Added whitelisting for the modules so that it loads the library for Lumin. UATHelper: Packaging (Lumin): [3/9] Compile Module.SIOJson.cpp [arm64-lumin] UATHelper: Packaging (Lumin): [6/9] Compile Module.CoreUtility.cpp [arm64-lumin] UATHelper: Packaging (Lumin): [1/9] Compile Module.SocketIOClient.cpp [arm64-lumin] UATHelper: Packaging (Lumin): [4/9] Compile Module.SIOJson.gen.cpp [arm64-lumin] UATHelper: Packaging (Lumin): [5/9] Compile Module.SocketIOLib.cpp [arm64-lumin] UATHelper: Packaging (Lumin): [7/9] Compile Module.CoreUtility.gen.cpp [arm64-lumin] UATHelper: Packaging (Lumin): [2/9] Compile Module.SocketIOClient.gen.cpp [arm64-lumin]

However, the following error message appears: "socketio invalid appears to have lost connection"

UE: 4.24.3-11590370+++UE4+Release-4.24 Lumin: 0.98.01

Changes made from master:

--- a/SocketIOClient.uplugin +++ b/SocketIOClient.uplugin @@ -26,7 +26,8 @@ "Linux", "Mac", "Android",

getnamo commented 4 years ago

Interesting, thanks for checking and those are the expected changes for it to run. Though the message socketio invalid appears to have lost connection may just point to a missing server, is this despite a confirmed working server for the client to connect to?

kjsujesh commented 4 years ago

That's correct. I've created a local server and the UE app works when run from the editor. I've also enabled external connections to be made from the server. Any log files that I should look into?

getnamo commented 4 years ago

Keep in mind localhost won't work for a separate device, you'll need your LAN ip at the least e.g. if you're on the 192.168.1.x subnet and let's say your server is on 192.168.1.3, you'd need to input that (e.g. http://191.168.1.3:3000 instead of http://localhost:3000) on the lumin device SocketIOClient component when it's on the same wifi for it connect to it. Either that or a internet reachable IP/domain where the service is hosted.

kjsujesh commented 4 years ago

Yup. I had given the IP address of the local server running on a mac. Checking with a Windows machine as a client to test now. That worked. I've given a http.listen(3000, "0.0.0.0") in the server code. Isn't that enough to enable external connections?

getnamo commented 4 years ago

That should work, in which case I suspect lumin is doing something extra about external internet connections, possibly blocking them. Do you know if e.g. https://github.com/getnamo/socketio-client-ue4#http-json-requests works?

kjsujesh commented 4 years ago

Shouldn't the socketio client be bound for this to work?

getnamo commented 4 years ago

The components auto-connect on beginplay so you should see it on the server side if you log connections before sending/binding any events. If it's not connecting, everything else won't work.

For http-json-requests, this doesn't use socket.io at all, just regular http get/post. So if that's not reachable it suggests something on the os level is blocking the connection.

Lumin is a custom fork of android if I remember correctly, so maybe there are some permissions to set?

kjsujesh commented 4 years ago

I saw this post in the Magic Leap documentation: https://developer.magicleap.com/learn/guides/sdk-unreal-package-third-party-plugin-libraries

What all libraries should be included?

kjsujesh commented 4 years ago

Hmm.. weird.. I hosted a simple server in an AWS EC2 instance.. the MagicLeap connected to it. I'm really surprised. The server doesn't have any HTTPS support. So in that sense, should be similar to what I have on my laptop, isn't it? But the bottom line is that your library worked! Thanks a lot for your responses and over all, making this great library! If you are still interested in debugging the local server issue, I'm all ears to suggestions.

getnamo commented 4 years ago

Maybe your router blocks ports internally? otherwise double check the local ip you're connecting to, great to see it connect though, it should narrow down the configs/setup causing the error for LAN hosted server.

kjsujesh commented 4 years ago

I mean, I had tested it locally with two computers on my LAN. That had worked. A server hosted in a Mac was able to receive connections from a client running on windows in the same WiFi network.

getnamo commented 2 years ago

Platform unlikely to be supported.