romainligneul / SocketIO-Express-Unity.2020

An updated version of the Socket.io protocol for Unity (2020) compatible with WebGL builds
2 stars 1 forks source link

Undefined symbols errors when building WebGL #1

Closed LesBonsOeufs closed 2 months ago

LesBonsOeufs commented 4 months ago

Errors when building in WebGL:

Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js: undefined symbol: EstablishSocket (referenced by top-level compiled C/C++ code) UnityEditor.EditorApplication:Internal_CallGlobalEventHandler ()

Same error for many different functions:

image

romainligneul commented 4 months ago

With what version of Unity are you building?

LesBonsOeufs commented 4 months ago

I tried on Unity 2022.3.10f1 and 2021.3.13f1

LesBonsOeufs commented 4 months ago

I ll try soon on a 2020 version. But I'd really like to make it work on later versions, at least 2021. Any idea how I could achieve this?

LesBonsOeufs commented 4 months ago

It did indeed build in 2020.3.48f1, but I would still like to know how to adapt it for later versions

romainligneul commented 4 months ago

Great to know that it works on Unity 2020.

I only worked on this as a side project and I am not a C# expert, so I cannot really debug you here.. If you find a solution, let me know!

Perhaps you can look over there: https://forum.unity.com/threads/error-building-webgl-in-2021-2-5f1-ebug_webgl_wasm-build-js-undefined-symbol.1214319/

Romain

Le mer. 29 mai 2024 à 09:46, Gabriel Bernabeu @.***> a écrit :

It did indeed build in 2020.3.48f1, but I would still like to know how to adapt it for later versions

— Reply to this email directly, view it on GitHub https://github.com/romainligneul/SocketIO-Express-Unity.2020/issues/1#issuecomment-2136761235, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKWZPF6V6GW4YQDA2BFOADZEWBV7AVCNFSM6AAAAABINFLIT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZWG43DCMRTGU . You are receiving this because you commented.Message ID: @.***>

-- Romain Ligneul

LesBonsOeufs commented 4 months ago

For the building problem, your unity packages lacked the WebGl_SocketIO .jslib that is present in the original repo: https://github.com/KyleDulce/Unity-Socketio?tab=readme-ov-file. It builds, connects to socket.io, but does not receive events now. On KyleDulce's version. I think I'll have this sorted out soon.

romainligneul commented 4 months ago

Ah sorry, maybe I add this librairy in my unity install when I created the package and therefore it did not complain.

I think that you are the first to test my repo besides me then. Sorry for that!

Le mer. 29 mai 2024 à 17:14, Gabriel Bernabeu @.***> a écrit :

For the building problem, your unity packages lacked the WebGl_SocketIO .jslib that is present in the original repo: https://github.com/KyleDulce/Unity-Socketio?tab=readme-ov-file. It builds, connects to socket.io, but does not receive events now. On KyleDulce's version. I think I'll have this sorted out soon.

— Reply to this email directly, view it on GitHub https://github.com/romainligneul/SocketIO-Express-Unity.2020/issues/1#issuecomment-2137665165, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKWZPE2TTLOUP7H45AYBHTZEXWHDAVCNFSM6AAAAABINFLIT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZXGY3DKMJWGU . You are receiving this because you commented.Message ID: @.***>

-- Romain Ligneul

LesBonsOeufs commented 4 months ago

No problem man! Thank you for the responses!