StartGameException

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Fusion.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

StartGameException: Error

ADubois
2022-01-19 16:30:07

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+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.d__255:MoveNext() (at Fusion/Fusion.Runtime/Runner/NetworkRunner.Matchmaking.cs:702)

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

Fusion.NetworkRunner:ShutdownWithException(Exception)

Fusion.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: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.<b__0>d:MoveNext() (at Fusion/Fusion.Realtime/RealtimeExtensions/LoadBalancingClientAsyncExtensions.cs:232)

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

Fusion.Photon.Realtime.Async.<>c__DisplayClass10_0: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/d__255:MoveNext () (at Fusion/Fusion.Runtime/Runner/NetworkRunner.Matchmaking.cs:707)

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

Fusion.NetworkRunner:ShutdownWithException (System.Exception)

Fusion.NetworkRunner/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: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/<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/<b__0>d> (Fusion.Photon.Realtime.Async.LoadBalancingClientAsyncExtensions/<>c__DisplayClass10_0/<b__0>d&)

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

UnityEngine.UnitySynchronizationContext:ExecuteTasks ()

Comments

squirrel
2022-01-23 01:15:03

Can we see your code?

ramonmelo
2022-01-24 16:51:21

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

jboss
2022-09-16 08:56:26

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+d__312.MoveNext () [0x00000] in <00000000000000000000000000000000>:0

Thanks!

DirtyFred
2023-04-03 08:45:34

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.

Back to top