StartGameException: Error

ADubois
ADubois
edited January 2022 in Fusion
Hello! I'm trying to reproduce an example from the Fusion documentation, but I can't get a player to join. Throws an error on shutdown.

StartGameException: Error

Fusion.NetworkRunner+<StartGameModeCloud>d__254.MoveNext () (at Fusion/Fusion.Runtime/Runner/NetworkRunner.Matchmaking.cs:665)

UnityEngine.Debug:LogException(Exception)

Fusion.Log:Exception(Exception) (at Fusion/Fusion.Common/Log.cs:126)

Fusion.<ShutdownWithException>d__255:MoveNext() (at Fusion/Fusion.Runtime/Runner/NetworkRunner.Matchmaking.cs:702)

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<ShutdownWithException>d__255&)

Fusion.NetworkRunner:ShutdownWithException(Exception)

Fusion.<StartGameModeCloud>d__254:MoveNext() (at Fusion/Fusion.Runtime/Runner/NetworkRunner.Matchmaking.cs:680)

System.Threading.Tasks.TaskCompletionSource`1:TrySetResult(ShutdownReason)

Fusion.CloudServices:OnDisconnected(DisconnectCause) (at Fusion/Fusion.Runtime/CloudServices/CloudServices.Callbacks.cs:51)

Fusion.Photon.Realtime.ConnectionCallbacksContainer:OnDisconnected(DisconnectCause) (at Fusion/Fusion.Realtime/Realtime/LoadBalancingClient.cs:4120)

Fusion.Photon.Realtime.LoadBalancingClient:OnStatusChanged(StatusCode) (at Fusion/Fusion.Realtime/Realtime/LoadBalancingClient.cs:3072)

ExitGames.Client.Photon.<>c__DisplayClass109_0:<EnqueueStatusCallback>b__0() (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PeerBase.cs:1181)

ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands() (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/EnetPeer.cs:440)

ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands() (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PhotonPeer.cs:1771)

ExitGames.Client.Photon.PhotonPeer:Service() (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PhotonPeer.cs:1685)

Fusion.Photon.Realtime.LoadBalancingClient:Service() (at Fusion/Fusion.Realtime/Realtime/LoadBalancingClient.cs:1399)

Fusion.Photon.Realtime.Async.<<CreateServiceTask>b__0>d:MoveNext() (at Fusion/Fusion.Realtime/RealtimeExtensions/LoadBalancingClientAsyncExtensions.cs:232)

System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start(<<CreateServiceTask>b__0>d&)

Fusion.Photon.Realtime.Async.<>c__DisplayClass10_0:<CreateServiceTask>b__0()

UnityEngine.UnitySynchronizationContext:ExecuteTasks()

========================================================

Failed Operation with Reason: Error

UnityEngine.Debug:LogError (object)

Fusion.Log:Error (object) (at Fusion/Fusion.Common/Log.cs:118)

Fusion.NetworkRunner/<ShutdownWithException>d__255:MoveNext () (at Fusion/Fusion.Runtime/Runner/NetworkRunner.Matchmaking.cs:707)

System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<Fusion.StartGameException>:Start<Fusion.NetworkRunner/<ShutdownWithException>d__255> (Fusion.NetworkRunner/<ShutdownWithException>d__255&)

Fusion.NetworkRunner:ShutdownWithException (System.Exception)

Fusion.NetworkRunner/<StartGameModeCloud>d__254:MoveNext () (at Fusion/Fusion.Runtime/Runner/NetworkRunner.Matchmaking.cs:680)

System.Threading.Tasks.TaskCompletionSource`1<Fusion.ShutdownReason>:TrySetResult (Fusion.ShutdownReason)

Fusion.CloudServices:OnDisconnected (Fusion.Photon.Realtime.DisconnectCause) (at Fusion/Fusion.Runtime/CloudServices/CloudServices.Callbacks.cs:51)

Fusion.Photon.Realtime.ConnectionCallbacksContainer:OnDisconnected (Fusion.Photon.Realtime.DisconnectCause) (at Fusion/Fusion.Realtime/Realtime/LoadBalancingClient.cs:4120)

Fusion.Photon.Realtime.LoadBalancingClient:OnStatusChanged (ExitGames.Client.Photon.StatusCode) (at Fusion/Fusion.Realtime/Realtime/LoadBalancingClient.cs:3072)

ExitGames.Client.Photon.PeerBase/<>c__DisplayClass109_0:<EnqueueStatusCallback>b__0 () (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PeerBase.cs:1181)

ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands () (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/EnetPeer.cs:440)

ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands () (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PhotonPeer.cs:1771)

ExitGames.Client.Photon.PhotonPeer:Service () (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PhotonPeer.cs:1685)

Fusion.Photon.Realtime.LoadBalancingClient:Service () (at Fusion/Fusion.Realtime/Realtime/LoadBalancingClient.cs:1399)

Fusion.Photon.Realtime.Async.LoadBalancingClientAsyncExtensions/<>c__DisplayClass10_0/<<CreateServiceTask>b__0>d:MoveNext () (at Fusion/Fusion.Realtime/RealtimeExtensions/LoadBalancingClientAsyncExtensions.cs:232)

System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<Fusion.Photon.Realtime.Async.LoadBalancingClientAsyncExtensions/<>c__DisplayClass10_0/<<CreateServiceTask>b__0>d> (Fusion.Photon.Realtime.Async.LoadBalancingClientAsyncExtensions/<>c__DisplayClass10_0/<<CreateServiceTask>b__0>d&)

Fusion.Photon.Realtime.Async.LoadBalancingClientAsyncExtensions/<>c__DisplayClass10_0:<CreateServiceTask>b__0 ()

UnityEngine.UnitySynchronizationContext:ExecuteTasks ()

Answers

  • Can we see your code?

  • Hi @ADubois ,


    Without a piece of code you are trying to run it is hard to tell what might be happening.

    Starting Fusion should be as easy as calling the NetworkRunner.StartGame method with the right parameters.

    Keep in mind that depending on the type of peer you are trying to start (Server/Host or Client) some values can be different.

    We also suggest taking a look at our Matchmaking Doc page: https://doc.photonengine.com/en-us/fusion/current/manual/matchmaking


    --

    Ramon Melo

    Photon Fusion Team

  • Did anyone find a solution for this? I'm running into the same issue when following the Fusion 102 tutorial.

    I can add my code, but it is basically the stuff from the tutorial example. I just rearranged the BasicSpawner script so that OnGui and StartGame are at the top of the script and then all the interface stubs.

    What I am doing is run a first instance of the build version of the game and select Host. This works fine, the player cube appears and I can move it around.

    Then I start another instance on the same PC and select join. Now not only does the player not appear in the second instance, the player in the host instance has disappeared as well.

    The error I get in the log is:

    StartGameException: ConnectionTimeout

     at Fusion.NetworkRunner+<StartGameModeCloud>d__312.MoveNext () [0x00000] in <00000000000000000000000000000000>:0 

    Thanks!

  • Hi,


    Did anyone find a solution for this?


    I have the same error when i call runner.Shutdown, while trying to join to a session.

    In my case, i have implemented a timeout coroutine, that will stop the runner if the session cannot be connected to.