adrenak / univoice

Voice chat/VoIP solution for unity.
http://www.vatsalambastha.com/univoice
MIT License
355 stars 36 forks source link

IL2CPP Build Runtime Issue #11

Closed evrenacigul closed 8 months ago

evrenacigul commented 2 years ago

Hello, I guess Airpeer or Unimic doesn't support IL2CPP build. I've got error constantly in Update method. Is there any solution for that? I'd need to use that in a project that I build in IL2CPP... Thanks in advance! (It works in Mono build btw)

UnloadTime: 0.580600 ms Using workaround for the SslStream.AuthenticateAsClient unity bug UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) Byn.Net.WebRtcNetworkFactory:TryStaticInitialize() Byn.Net.WebRtcNetworkFactory:.ctor() UnityEngine.GameObject:AddComponent() Byn.Common.UnitySingleton`1:get_Instance() Adrenak.AirPeer.APNetwork:New(String, String[], String) Adrenak.AirPeer.APNode:.ctor(String, String[], String) Adrenak.AirPeer.APNode:.ctor(String, String) Adrenak.UniVoice.InbuiltImplementations.InbuiltChatroomAgentFactory:Create() VoipRoomSample:InitializeAgent() VoipRoomSample:Start()

Initializing native webrtc for windows ... UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) Byn.Net.WebRtcNetworkFactory:TryStaticInitialize() Byn.Net.WebRtcNetworkFactory:.ctor() UnityEngine.GameObject:AddComponent() Byn.Common.UnitySingleton`1:get_Instance() Adrenak.AirPeer.APNetwork:New(String, String[], String) Adrenak.AirPeer.APNode:.ctor(String, String[], String) Adrenak.AirPeer.APNode:.ctor(String, String) Adrenak.UniVoice.InbuiltImplementations.InbuiltChatroomAgentFactory:Create() VoipRoomSample:InitializeAgent() VoipRoomSample:Start()

NotSupportedException: To marshal a managed method, please add an attribute named 'MonoPInvokeCallback' to the method definition. The method we're attempting to marshal is: WebRtcCSharp.WebRtcSwigPINVOKE+SWIGExceptionHelper::SetPendingApplicationException at WebRtcCSharp.WebRtcSwigPINVOKE+SWIGExceptionHelper..cctor () [0x00000] in <00000000000000000000000000000000>:0 at WebRtcCSharp.WebRtcSwigPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 at WebRtcCSharp.WebRtcWrap.GetVersion () [0x00000] in <00000000000000000000000000000000>:0 at Byn.Net.WebRtcNetworkFactory.TryStaticInitialize () [0x00000] in <00000000000000000000000000000000>:0 at Byn.Net.WebRtcNetworkFactory..ctor () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <00000000000000000000000000000000>:0 at Byn.Common.UnitySingleton1[T].get_Instance () [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNetwork.New (System.String signalingServer, System.String[] iceServers, System.String gameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNode..ctor (System.String signalingServer, System.String[] iceServers, System.String apNetworkGameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNode..ctor (System.String signalingServer, System.String apNetworkGameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.UniVoice.InbuiltImplementations.InbuiltChatroomAgentFactory.Create () [0x00000] in <00000000000000000000000000000000>:0 at VoipRoomSample.InitializeAgent () [0x00000] in <00000000000000000000000000000000>:0 at VoipRoomSample.Start () [0x00000] in <00000000000000000000000000000000>:0 Rethrow as TypeInitializationException: The type initializer for 'WebRtcCSharp.WebRtcSwigPINVOKE.SWIGExceptionHelper' threw an exception. at WebRtcCSharp.WebRtcSwigPINVOKE..cctor () [0x00000] in <00000000000000000000000000000000>:0 at WebRtcCSharp.WebRtcWrap.GetVersion () [0x00000] in <00000000000000000000000000000000>:0 at Byn.Net.WebRtcNetworkFactory.TryStaticInitialize () [0x00000] in <00000000000000000000000000000000>:0 at Byn.Net.WebRtcNetworkFactory..ctor () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <00000000000000000000000000000000>:0 at Byn.Common.UnitySingleton1[T].get_Instance () [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNetwork.New (System.String signalingServer, System.String[] iceServers, System.String gameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNode..ctor (System.String signalingServer, System.String[] iceServers, System.String apNetworkGameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNode..ctor (System.String signalingServer, System.String apNetworkGameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.UniVoice.InbuiltImplementations.InbuiltChatroomAgentFactory.Create () [0x00000] in <00000000000000000000000000000000>:0 at VoipRoomSample.InitializeAgent () [0x00000] in <00000000000000000000000000000000>:0 at VoipRoomSample.Start () [0x00000] in <00000000000000000000000000000000>:0 Rethrow as TypeInitializationException: The type initializer for 'WebRtcCSharp.WebRtcSwigPINVOKE' threw an exception. at WebRtcCSharp.WebRtcWrap.GetVersion () [0x00000] in <00000000000000000000000000000000>:0 at Byn.Net.WebRtcNetworkFactory.TryStaticInitialize () [0x00000] in <00000000000000000000000000000000>:0 at Byn.Net.WebRtcNetworkFactory..ctor () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <00000000000000000000000000000000>:0 at Byn.Common.UnitySingleton1[T].get_Instance () [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNetwork.New (System.String signalingServer, System.String[] iceServers, System.String gameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNode..ctor (System.String signalingServer, System.String[] iceServers, System.String apNetworkGameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNode..ctor (System.String signalingServer, System.String apNetworkGameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.UniVoice.InbuiltImplementations.InbuiltChatroomAgentFactory.Create () [0x00000] in <00000000000000000000000000000000>:0 at VoipRoomSample.InitializeAgent () [0x00000] in <00000000000000000000000000000000>:0 at VoipRoomSample.Start () [0x00000] in <00000000000000000000000000000000>:0 UnityEngine.GameObject:AddComponent() Byn.Common.UnitySingleton1:get_Instance() Adrenak.AirPeer.APNetwork:New(String, String[], String) Adrenak.AirPeer.APNode:.ctor(String, String[], String) Adrenak.AirPeer.APNode:.ctor(String, String) Adrenak.UniVoice.InbuiltImplementations.InbuiltChatroomAgentFactory:Create() VoipRoomSample:InitializeAgent() VoipRoomSample:Start()

NullReferenceException: Object reference not set to an instance of an object. at Byn.Net.WebRtcNetworkFactory.CreateDefault (System.String websocketUrl, Byn.Net.IceServer[] urls) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNetwork.New (System.String signalingServer, System.String[] iceServers, System.String gameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNode..ctor (System.String signalingServer, System.String[] iceServers, System.String apNetworkGameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.AirPeer.APNode..ctor (System.String signalingServer, System.String apNetworkGameObjectName) [0x00000] in <00000000000000000000000000000000>:0 at Adrenak.UniVoice.InbuiltImplementations.InbuiltChatroomAgentFactory.Create () [0x00000] in <00000000000000000000000000000000>:0 at VoipRoomSample.InitializeAgent () [0x00000] in <00000000000000000000000000000000>:0 at VoipRoomSample.Start () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

NullReferenceException: Object reference not set to an instance of an object. at VoipRoomSample.Update () [0x00000] in <00000000000000000000000000000000>:0

Harsh-Khambhadiya commented 11 months ago

still facing this issue any solution? @evrenacigul

adrenak commented 8 months ago

Airpeers native libraries are not il2cpp complaint (and I don't have its source). This cannot be fixed