colyseus / colyseus-unity-sdk

⚔ Colyseus Multiplayer SDK for Unity
https://docs.colyseus.io/getting-started/unity-sdk/
MIT License
371 stars 100 forks source link

Unable to Join GameRoom after migrating to 0.15.3 Version Unity #215

Closed VkDevPh closed 1 year ago

VkDevPh commented 1 year ago

Hi Team, After migrating Colyseus to 0.15.3 Version in Unity, I am not able to join Game room.

Our Colyseus server(0.15.0) is running on multiple instances with a unique publicAddress.

Stack Trace:

JoinGameRoom Error - Unable to connect to the remote server at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 at Colyseus.ColyseusClient+<ConsumeSeatReservation>d__251[T].MoveNext () [0x00200] in /Users/phonato-user/All Data/Bit Bucket/CamelCashCasino/Assets/Colyseus/Runtime/Colyseus/Models/ColyseusClient.cs:369 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 at Colyseus.ColyseusClient+<CreateMatchMakeRequest>d__261[T].MoveNext () [0x001c7] in /Users/phonato-user/All Data/Bit Bucket/CamelCashCasino/Assets/Colyseus/Runtime/Colyseus/Models/ColyseusClient.cs:416 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 at Colyseus.ColyseusClient+<JoinOrCreate>d__131[T].MoveNext () [0x00037] in /Users/phonato-user/All Data/Bit Bucket/CamelCashCasino/Assets/Colyseus/Runtime/Colyseus/Models/ColyseusClient.cs:113 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <9577ac7a62ef43179789031239ba8798>:0 at System.Runtime.CompilerServices.TaskAwaiter1[TResult].GetResult () [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 at SwRoomController+<JoinGameRoom>d__13.MoveNext () [0x00045] in /Users/phonato-user/All Data/Bit Bucket/CamelCashCasino/Assets/Scripts/SlotsWar/Controllers/SwRoomController.cs:38 UnityEngine.Debug:Log (object) SwRoomController/<JoinGameRoom>d__13:MoveNext () (at Assets/Scripts/SlotsWar/Controllers/SwRoomController.cs:42) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Colyseus.ColyseusRoom1<SlotsWarGameState>>:SetException (System.Exception) Colyseus.ColyseusClient/<JoinOrCreate>d__131:MoveNext () (at Assets/Colyseus/Runtime/Colyseus/Models/ColyseusClient.cs:113) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Colyseus.ColyseusRoom1>:SetException (System.Exception) Colyseus.ColyseusClient/d261<SlotsWarGameState>:MoveNext () (at Assets/Colyseus/Runtime/Colyseus/Models/ColyseusClient.cs:416) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Colyseus.ColyseusRoom`1>:SetException (System.Exception) Colyseus.ColyseusClient/d251<SlotsWarGameState>:MoveNext () (at Assets/Colyseus/Runtime/Colyseus/Models/ColyseusClient.cs:369) System.Threading.Tasks.TaskCompletionSource1<Colyseus.ColyseusRoom1<SlotsWarGameState>>:SetException (System.Exception) Colyseus.ColyseusClient/<>c__DisplayClass25_01:gOnError|1 (int,string) (at Assets/Colyseus/Runtime/Colyseus/Models/ColyseusClient.cs:351) Colyseus.ColyseusRoom`1/<>cDisplayClass31_0:b1 (string) (at Assets/Colyseus/Runtime/Colyseus/Room/ColyseusRoom.cs:232) NativeWebSocket.WebSocket/d24:MoveNext () (at Assets/Colyseus/Runtime/WebSocket/WebSocket.cs:403) UnityEngine.UnitySynchronizationContext:ExecuteTasks () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)

endel commented 1 year ago

Hi @VkDevPh, I've spent a few hours and couldn't reproduce this issue.

I see you also reported an error "error CS0173: Type of conditional expression cannot be determined because there is no implicit conversion between 'method group' and '<null>'" on Discord (screenshot), which I also failed to reproduce.

Can you provide a reproduction scenario for these issues?

VkDevPh commented 1 year ago

Hi @endel , Thanks for your time.

For the issue I reported, error CS0173: Type of conditional expression cannot be determined because there is no implicit conversion between 'method group' and null, on Discord, Please check the video I've sent to your e-mail (endel@colyseus.io). https://drive.google.com/file/d/1fzbvYBC6_P7KfTqBJkYrMKgfZ855U3hF/view?usp=sharing. Simply create a new project In Unity (2020.2.2f1) and import the Colyseus package (0.15.3). The error appears in the console.

Also for the above issue, reported here, I have shared server details over email. Please check and try to connect to the given room, I think an error should come. (Unable to connect to remote server ..) Let me know if you need any other details.

Thanks

VkDevPh commented 1 year ago

Thanks a lot @endel. :)