SocketIOClient-Unreal icon indicating copy to clipboard operation
SocketIOClient-Unreal copied to clipboard

Bug - Unable to connect to Socket.IO Server on MacOS - UE5 - SocketIOClient version 2.1.0

Open c-paris opened this issue 2 years ago • 13 comments

Hi everyone,

Very strange problem .. When I launch in Unreal Engine viewport on MacOS, nothing happens and I have nothing in log messages. But when I package the code and installing the application on Iphone and launching the app, the connection works. If I need to package everytime the game in order to test something who uses Socket IO connection, it will take a looooot of time ..

Do you have any suggestions ? Thanks !

I'm on Macbook Pro 14" 2021, M1 Pro.

c-paris avatar Apr 26 '22 16:04 c-paris

Are you connecting to a http or a ssl/https connection?

Documentation for SSL for 2.1.0 https://github.com/getnamo/SocketIOClient-Unreal/tree/v2.1.0#tls--ssl and this might also be relevant https://github.com/getnamo/SocketIOClient-Unreal/tree/v2.1.0#ios (maybe mac requires a similar toggle?)

getnamo avatar Apr 26 '22 18:04 getnamo

I instantiate the connection on HTTP, not HTTPS. But as I said, it works well when it's packaged and send into iPhone .. I allready checked any options on Unreal Engine to find if there is a thing like that but I found nothing. It's really inside the editor that it didn't works

c-paris avatar Apr 27 '22 09:04 c-paris

I also tried to clone the Github repository instead of using the one in Marketplace, no changes too Edit : Tested on Blueprint and in C++, same result

c-paris avatar Apr 27 '22 09:04 c-paris

Mac and iOS are different platforms it seems the arm64 build for Mac doesn't work as expected. Do you know if unreal still runs emulated on arm Mac os?

getnamo avatar Apr 27 '22 16:04 getnamo

To be honest, I really don't know ...

c-paris avatar Apr 27 '22 16:04 c-paris

Any suggestion, solution ? :/

c-paris avatar Apr 28 '22 18:04 c-paris

Mac os is not my platform of dev, might need help from other Mac devs. That said you can dev on PC/linux and package on Mac when it needs to be tested in device.

The other suggestion I have is, if you're in a blueprint only project, convert it to mixed (c++ and blueprint) this will force the plugin to be compiled with the project which may fix your issue and you'll get verbose errors that are easier to debug.

getnamo avatar Apr 28 '22 18:04 getnamo

@wizzy06 I can confirm what you are saying in the first post, although i can't confirm your setup. I have UE5 installed from launcher and i have added the plugin (2.1.0 version) in an empty project ( installed at project level, not engine level ) and i can see SIOJEditorPlugin is excluded from builds, which i believe is the issue of it not running in the Editor.

My other setup is UE 4.27.2 built from source with the exact setup ( although different version for 4.27.2 ), and that works fine.

I don't know if your engine is from the Epic Games Launcher or built from source, but in case it's from the Epic Games Launcher i'd suggest building it from source instead and see from there.

I'll try and do that as well for UE5 and i'll come back to this post ( it takes a bit of time ).

blastodd avatar Apr 28 '22 21:04 blastodd

Thanks for your answer @blastodd, I followed your setup by using Unreal Engine 5 source code and SocketIOClient 2.3.0 on project level. Not working too, but I see this warning :

LogClass: Display: EnumProperty FSIOJ_NamedType::Type is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h
LogClass: Display: BoolProperty FSIOJ_NamedType::bIsArray is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h

Update : After fixed this little warning, nothing change. Very strange

c-paris avatar May 13 '22 17:05 c-paris

I continuing to have this error : LogUObjectGlobals: Warning: Failed to find object 'Class None.SIOJJsonObject'

c-paris avatar May 14 '22 16:05 c-paris

Got same warning here #324

ezawadzki avatar Jun 14 '22 14:06 ezawadzki

I was able to replicate this! I was having same issue, and I think I have a few insights:

  • Connection to SocketIO server only works if the project is packaged. Neither on Debug mode or Editor mode.
  • Your server must run on DEFAULT SocketIO port (3000).
  • Configuration functions (ConnectWithParams) is not working/parsing a different address. It stays in the same default port.

My context:

  • MacOS 13.6
  • Unreal Engine 5.3
  • Xcode 15.0

mdblabs avatar Oct 03 '23 14:10 mdblabs

I was able to replicate this! I was having same issue, and I think I have a few insights:

  • Connection to SocketIO server only works if the project is packaged. Neither on Debug mode or Editor mode.
  • Your server must run on DEFAULT SocketIO port (3000).
  • Configuration functions (ConnectWithParams) is not working/parsing a different address. It stays in the same default port.

My context:

  • MacOS 13.6
  • Unreal Engine 5.3
  • Xcode 15.0

Can confirm. It connects on shipping build with custom deployed server and locally hosted alike.

ApoorvHesta avatar Oct 31 '23 12:10 ApoorvHesta