Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect using PIE on MacOs UE5.1 #363

Open
JuDePom opened this issue Jan 5, 2023 · 10 comments
Open

Unable to connect using PIE on MacOs UE5.1 #363

JuDePom opened this issue Jan 5, 2023 · 10 comments
Labels

Comments

@JuDePom
Copy link

JuDePom commented Jan 5, 2023

Hi,

We are currently working on a project using your great work, but we stumped over a problem regarding the play in editor with MacOS (with M1 max).

With Windows, everything works like a charm, we can connect to a local or distant server. But when using Mac, the connection is not established in the PIE (local or distant, with SSL or not), while the exported version works fine. (Looks like #313 with the iPhone).

We used the C++ version, with UE directly from Epic (not built from source).

For now we don't see where the problem is, but we are willing to work with you on that if you want it too. In any case, any fix will lead to a PR.

If you have any advices or hint to give us, our eyes are wide opened ;)

Thanks for your time,
Judepom & Nicoooooo

@JackFlukinger
Copy link

I'm having this same problem on M1 Pro. Windows also works just fine for me.

@getnamo
Copy link
Owner

getnamo commented Jan 24, 2023

Mac isnt my main platform, but I'll have more open source hours in about 1-2 weeks and should be able to at least get some idea of where the issue could be. Any logs/minimal projects to repro you can provide would be helpful

@JackFlukinger
Copy link

JackFlukinger commented Jan 24, 2023

Minimum repro would just be to try to connect to a local socketio server from the project via play in editor mode. Would be great to get this figured out! Are there some flags that I should set to get all the debug logging?

@getnamo
Copy link
Owner

getnamo commented Jan 24, 2023

Just the saved folder logs should suffice.

It's likely related to openssl pragma barriers for Mac if I had a speculative guess.

Also see if this option exists for Mac/can be toggled and if it does anything: https://github.com/getnamo/SocketIOClient-Unreal#ios

@JackFlukinger
Copy link

That's not an option on Mac, and there's no problem with local HTTP connections. As far as the log files go -- SocketIOClient doesn't log anything. Also, I'm using the native client.

@JuDePom
Copy link
Author

JuDePom commented Jan 25, 2023

Small update, it doesn't only affect M1 CPU, tested on a MacPro with an intel i9, it was exactly the same.

On PIE, it seams that the function create in Asio service_registry.hpp is never called and after that I have weird service IDs (in service_registry.ipp do_use_service).

For an unknown reason since MacOS update, I can't use a debugger, so I had to add a lot of UE_LOGS in various function calls.
If you want those logs from the PIE and the exported one, just contact me.

@getnamo
Copy link
Owner

getnamo commented Nov 1, 2023

Can confirm I was able to replicate the issue (no connection in PIE, works fine in packaged mode). Unsure atm of what the issue is, will gladly take some logs if you have any.

@laffan
Copy link

laffan commented Dec 4, 2023

I also have this issue on an M2/MacOS 14.1.2 running UE 5.2.1 and Node v18.18.2. Server works great between two browser windows, but not at all in Unreal

@getnamo : I've attached the logfile : warning/error summary is as follows :

Warnings :

LogPluginManager: Warning: Engine version string in SocketIOClient-Unreal-Example-master/UnrealClient/Plugins/SocketIOClient/SocketIOClient.uplugin could not be parsed ("5.2")

Errors :

LogClass: Error: EnumProperty FSIOJ_NamedType::Type is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h
LogClass: Error: BoolProperty FSIOJ_NamedType::bIsArray is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h
LogClass: Display: 2 Uninitialized script struct members found including 0 object properties
LogAutomationTest: Error: UObject.Class AttemptToFindUninitializedScriptStructMembers will be marked as failing due to errors being logged
LogAutomationTest: Error: LogClass: EnumProperty FSIOJ_NamedType::Type is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h
LogAutomationTest: Error: LogClass: BoolProperty FSIOJ_NamedType::bIsArray is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h

logfile.txt

@wenzheng-wen
Copy link

wenzheng-wen commented Apr 23, 2024

我在运行 UE 5.2.1 和 Node v2.18.1 的 M2.1.2/MacOS 18.18.2 上也遇到了这个问题。服务器在两个浏览器窗口之间运行良好,但在虚幻引擎中则完全不行

:我附上了日志文件:警告/错误摘要如下:

警告:

LogPluginManager: Warning: Engine version string in SocketIOClient-Unreal-Example-master/UnrealClient/Plugins/SocketIOClient/SocketIOClient.uplugin could not be parsed ("5.2")

错误:

LogClass: Error: EnumProperty FSIOJ_NamedType::Type is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h
LogClass: Error: BoolProperty FSIOJ_NamedType::bIsArray is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h
LogClass: Display: 2 Uninitialized script struct members found including 0 object properties
LogAutomationTest: Error: UObject.Class AttemptToFindUninitializedScriptStructMembers will be marked as failing due to errors being logged
LogAutomationTest: Error: LogClass: EnumProperty FSIOJ_NamedType::Type is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h
LogAutomationTest: Error: LogClass: BoolProperty FSIOJ_NamedType::bIsArray is not initialized properly. Module:SIOJEditorPlugin File:Public/SIOJ_BreakJson.h

logfile.txt

Hello, I have the same problem, do not know how to solve

@trsoluti
Copy link

trsoluti commented May 6, 2024

Any progress with this? I've been hacking away at it with debug print statements and this it what I've figured out:
On UE 5.3.2 on an Intel Mac:

  • SocketIOLib/Private/internal/sio_client_impl client_impl() calls m_client.init_asio().
  • ThirdParty/websocketpp/websocketpp/transport/asio/endpoint init_asio() bounces around a bit and then (from init_asio(io_service_ptr prt, lib::error_code & ec)) calls lib::make_shared<lib::asio::ip::tcp::acceptor>(lib::ref(*m_io_service))
  • This gets us to ThirdParty/asio/asio/include/asio/basic_socket_acceptor basic_socket_acceptor(io_context)
  • which calls ThirdParty/asio/asio/include/asio/basic_io_object basic_io_object(io_context)
  • which calls ThirdParty/asio/asio/include/asio/impl/io_context use_service<asio::detail::reactive_socket_service<asio::ip::tcp>>(io_context)
  • which calls ThirdParty/asio/asio/include/asio/detail/impl/service_registry service_registry::do_use_service(key, factory, owner)
  • which then attempts to call factory(owner)
  • at which point it disappears. (factory should be asio::detail::service_registry::create<asio::detail::reactive_socket_service<asio::ip::tcp>, asio::io_context>(void*) but execution never gets there)

later on, when kevents (kernel events) happen, the kevent_reactor attempts to start its scheduler, which hasn't been properly registered. It works for the DNS validation, but when the reactor attempts to connect to the actual socket and gets asio::error::in_progress, it adds work to the (corrupt) scheduler and then hangs.

I used the websocketpp example 'ThirdParty/websocketpp/examples/echo_client/echo_client.cpp` and massaged it to look as much like client_impl as I could. But I could not get the example to exhibit the same symptoms.

Hope this is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants