Client Exception: Server Scene Handle already exists!

Hi there!

I am getting an exception (on the client side) when switching scenes:

Exception: Server Scene Handle (-128) already exist! Happened during scene load of LoadingScreenScene with Client Handle (-88458)
Unity.Netcode.NetworkSceneManager.OnSceneLoaded (System.UInt32 sceneEventId) (at Library/PackageCache/com.unity.netcode.gameobjects@1.2.0/Runtime/SceneManagement/NetworkSceneManager.cs:1416)
Unity.Netcode.SceneEventProgress.<SetAsyncOperation>b__37_0 (UnityEngine.AsyncOperation asyncOp2) (at Library/PackageCache/com.unity.netcode.gameobjects@1.2.0/Runtime/SceneManagement/SceneEventProgress.cs:262)
UnityEngine.AsyncOperation.InvokeCompletionEvent () (at <ba783288ca164d3099898a8819fcec1c>:0)

Couldn’t find any infos using search and google. Can you hint me to the relevant documentation part?

Thank you in advance!!!

I am getting the same erro and for some reason the client with this erro dont start proplely.

Hi @mariuskleiner and @Sleins , what NGO version(s) are you using?

hello @PaoloAbela I am using
Multiplay Version 1.0.0-pre.10 - April 28, 2023
Matchmaker Version 1.0.0 - March 24, 2023
Netcode for GameObjects - Version 1.2.0 - December 09, 2022
Unity 2021.3.20f1.
In my project, I am using the base architecture structure used on the unity multiplay sample project.
From what I could debug so far my server is loading my battle scene correctly but the client logs on to the server before the server loaded the battle scene so the receives one call to load the Bootstrap scene and this call bugs everything on the client because he tries to load his bootstrap what causes the problem to have Server Scene Handle (-128) already exist!. Sometimes in the worst clients, I can see it loading multiple battle scenes at the same time. in one of my tests, my client loaded 3 battle scenes for no reason before unloading two of them, in another I have one loading and maintaining 2 battle scenes one the correct and the other that bugs the project receiving the Server Scene Handle (-128) already exist!.

Thanks for the answer. Not sure if you did changes to the Unity Multiplay Sample Project (do you have a link to the sample?), but I’d recommend to try implementing the switch-logic in a separate project to understand where the issue is, as it can be related to your custom code.

the sample project. GitHub - Unity-Technologies/com.unity.services.samples.matchplay: A Matchmaking with Multiplay Unity example project. Implements the Unity Matchmaking and Multiplay SDK to create an end to end matchmaking game experience.

The project is this one. I have made some changes but most of my changes were outside of the part where I think it is bugging.

I think I find the solution my client-server connection is stable now.

The problem is on the class MatchplayNetworkServer and in the Class ServerGameManager on the

On the server game Manager we have this method:

 public async Task StartGameServerAsync(GameInfo startingGameInfo)
        {
            Debug.Log($"Starting server with:{startingGameInfo}.");

            // The server should respond to query requests irrespective of the server being allocated.
            // Hence, start the handler as soon as we can.
            await m_MultiplayServerQueryService.BeginServerQueryHandler();

            try
            {
                var matchmakerPayload = await GetMatchmakerPayload(k_MultiplayServiceTimeout);

                if (matchmakerPayload != null)
                {
                    Debug.Log($"Got payload: {matchmakerPayload}");
                    startingGameInfo = PickGameInfo(matchmakerPayload);

                    MatchStartedServerQuery(startingGameInfo);
                    await StartBackfill(matchmakerPayload, startingGameInfo);
                    m_NetworkServer.OnPlayerJoined += UserJoinedServer;
                    m_NetworkServer.OnPlayerLeft += UserLeft;
                    m_StartedServices = true;
                }
                else
                {
                    Debug.LogWarning("Getting the Matchmaker Payload timed out, starting with defaults.");
                }
            }
            catch (Exception ex)
            {
                Debug.LogWarning($"Something went wrong trying to set up the Services:\n{ex} ");
            }

            if (!m_NetworkServer.OpenConnection(m_ServerIP, m_ServerPort, startingGameInfo))
            {
                Debug.LogError("NetworkServer did not start as expected.");
                return;
            }

            //Changes Map and sets the synched shared variables to the starting info
            m_SynchedServerData = await m_NetworkServer.ConfigureServer(startingGameInfo);
            if (m_SynchedServerData == null)
            {
                Debug.LogError("Could not find the synchedServerData.");
                return;
            }

            m_SynchedServerData.serverID.Value = m_ServerName;

            m_SynchedServerData.map.OnValueChanged += OnServerChangedMap;
            m_SynchedServerData.gameMode.OnValueChanged += OnServerChangedMode;
            //Set the count to connected players
            m_MultiplayServerQueryService.SetPlayerCount((ushort)NetworkServer.PlayerCount);

        }

This code is responsible for starting the server Multiplay Server Query Service connecting the clients, Open Connection and start the server. After all that he call the method NetworkServer.ConfigureServer with calls the

m_NetworkManager.SceneManager.LoadScene(startingGameInfo.ToSceneName, LoadSceneMode.Single);

The NetworkManager sceneManager load scene is completely unreliable. My client was connecting to the server before he completely load the correct scene and unload the previews scene with the bootstrap scene.

  • To Correct that the first thing I have done is a Scene manager class to receive and handle all the load and unload calls. I called NetworkSceneManager.

  • on my StartGameServerAsync the first thing that I do is to call the NetworkServer.ConfigureServer before everything and I make the server wait for My battle scene to be fully loaded and my bootstrap scene to be fully unloaded even before I open the server connection or start the BeginServerQueryHandler.

  • Another thing is I am not using the NetworkManager.SceneManager.LoadScene(). i chose to use the normal SceneManager.LoadScene because I load the scene before starting the server and only start after the process is fully completed on the server.

I am adding bellow my code for reference from this methods

            //Changes Map and sets the synched shared variables to the starting info
            bool serverSetup = await networkServer.ConfigureServer(startingGameInfo);
            if (serverSetup == false)
            {
                Debug.LogError("Could not setup the server");
                return;
            }

            if (!networkServer.OpenConnection(serverIP, serverPort, startingGameInfo))
            {
                Debug.LogError("NetworkServer did not start as expected.");
                return;
            }

            NetworkSceneManager.Instance.InitNetworkSceneManager();

            Debug.Log($"Starting server with:{startingGameInfo}.");

            // The server should respond to query requests irrespective of the server being allocated.
            // Hence, start the handler as soon as we can.
            await multiplayServerQueryService.BeginServerQueryHandler();

            try
            {
                var matchmakerPayload = await GetMatchmakerPayload(multiplayServiceTimeout);

                if (matchmakerPayload != null)
                {
                    Debug.Log($"Got payload: {matchmakerPayload}");
                    startingGameInfo = PickGameInfo(matchmakerPayload);

                    MatchStartedServerQuery(startingGameInfo);
                    await StartBackfill(matchmakerPayload, startingGameInfo);
                    networkServer.OnPlayerJoined += UserJoinedServer;
                    networkServer.OnPlayerLeft += UserLeft;
                    startedServices = true;
                }
                else
                {
                    Debug.LogWarning("Getting the Matchmaker Payload timed out, starting with defaults.");
                }
            }
            catch (Exception ex)
            {
                Debug.LogWarning($"Something went wrong trying to set up the Services:\n{ex} ");
            }
var localNetworkedSceneLoaded = false;

            //NetworkSceneManager.Instance.LoadNetworkScene(startingGameInfo.ToSceneName, LoadSceneMode.Additive, (ulong clientId, string sceneName, LoadSceneMode sceneMode) =>
            //{
            //    void bootStrapUnloadCompleted()
            //    {
            //        localNetworkedSceneLoaded = true;
            //        NetworkSceneManager.OnBattleSceneLoaded -= bootStrapUnloadCompleted;
            //    }
            //    NetworkSceneManager.OnBattleSceneLoaded += bootStrapUnloadCompleted;
            //});
            NetworkSceneManager.Instance.IsServer = true;
            NetworkSceneManager.Instance.LoadScene(startingGameInfo.ToSceneName, LoadSceneMode.Additive, (Scene sceneName, LoadSceneMode sceneMode) =>
            {
                void bootStrapUnloadCompleted()
                {
                    localNetworkedSceneLoaded = true;
                    NetworkSceneManager.OnBattleSceneLoaded -= bootStrapUnloadCompleted;
                }
                NetworkSceneManager.OnBattleSceneLoaded += bootStrapUnloadCompleted;
            });

            while (!localNetworkedSceneLoaded) await Task.Delay(50);

            await Task.Delay(1000);

            Debug.Log("Battle scene loading completed");

            return true;
public class NetworkSceneManager : MonoBehaviour
    {
        private bool isServer = false;

        public bool IsServer
        {
            get { return isServer; }
            set { isServer = value; }
        }

        public static NetworkSceneManager Instance
        {
            get
            {
                if (networkSceneManager != null) return networkSceneManager;
                networkSceneManager = FindObjectOfType<NetworkSceneManager>();
                if (networkSceneManager == null)
                {
                    Debug.LogError("No NetworkSceneManager in scene, did you run this from the bootStrap scene?");
                    return null;
                }

                return networkSceneManager;
            }
        }

        private Scene previewActiveScene;

        public static Action OnBattleSceneLoaded;

        private static NetworkSceneManager networkSceneManager;

        private NetworkManager networkManager;
        #region properties
        public void Awake()
        {
            networkManager = GetComponent<NetworkManager>();
            SceneManager.sceneLoaded += OnSceneLoaded;
            SceneManager.sceneUnloaded += OnSceneUnloaded;
         
        }

        public void InitNetworkSceneManager()
        {
            networkManager.SceneManager.OnLoad += OnSceneNetworkLoaded;
            networkManager.SceneManager.OnUnload += OnSceneNetworkUnloaded;
        }

        public void DisposeNetworkSceneManager()
        {
            networkManager.SceneManager.OnLoad -= OnSceneNetworkLoaded;
            networkManager.SceneManager.OnUnload -= OnSceneNetworkUnloaded;
        }

        #endregion
        #region privateMethods
        private void OnSceneLoaded(Scene scene,LoadSceneMode loadMode)
        {
            Debug.Log("Loaded Scene: " + scene.name);
            if(IsServer && scene.name == "BattleArena")
            {
                SceneManager.SetActiveScene(scene);
                UnloadSceneAsync(0);
            } else if(networkManager.IsClient)
            {

            }
        }

        private void OnSceneUnloaded(Scene scene)
        {
            Debug.Log("UnLoaded Scene: " + scene.name);
            if (IsServer && scene.name == "BootStrap")
            {
                OnBattleSceneLoaded?.Invoke();
            }
         
        }

        private void OnSceneNetworkLoaded(ulong clientId, string sceneName, LoadSceneMode loadSceneMode, AsyncOperation asyncOperation)
        {
            Debug.Log("Loaded Network Scene: " + sceneName);
        }

        private void OnSceneNetworkUnloaded(ulong clientId, string sceneName, AsyncOperation asyncOperation)
        {
            Debug.Log("Unload Network Scene: " + sceneName);
        }
        #endregion
        #region publicMethods
        public void LoadNetworkScene(string sceneName, LoadSceneMode mode = LoadSceneMode.Single, Action<ulong, string, LoadSceneMode> OnCompleteLoading = null)
        {
            Debug.Log("Loading Network Scene: " + sceneName);
            networkManager.SceneManager.LoadScene(sceneName, mode);
            if (OnCompleteLoading != null)
            {
                networkManager.SceneManager.OnLoadComplete += CreateAndSetSynchedServerData;

                void CreateAndSetSynchedServerData(ulong clientId, string sceneName, LoadSceneMode sceneMode)
                {
                    if (clientId != networkManager.LocalClientId)
                        return;

                    OnCompleteLoading.Invoke(clientId, sceneName, sceneMode);
                    networkManager.SceneManager.OnLoadComplete -= CreateAndSetSynchedServerData;
                }

            }

        }

        public void LoadScene(string sceneName, LoadSceneMode mode = LoadSceneMode.Single, Action<Scene, LoadSceneMode> OnCompleteLoading = null)
        {
            Debug.Log("Loading Scene: " + sceneName);
            SceneManager.LoadScene(sceneName, mode);
            if(OnCompleteLoading != null) {

                SceneManager.sceneLoaded += CreateAndSetSynchedServerData;

                void CreateAndSetSynchedServerData(Scene scene, LoadSceneMode sceneMode)
                {
                    OnCompleteLoading.Invoke(scene, sceneMode);
                    SceneManager.sceneLoaded -= CreateAndSetSynchedServerData;
                }
            }

        }

        public void UnloadSceneAsync(Scene scene)
        {
            SceneManager.UnloadSceneAsync(scene);
        }

        public void UnloadSceneAsync(string sceneName)
        {
            SceneManager.UnloadSceneAsync(sceneName);
        }

        public void UnloadSceneAsync(int sceneIndex)
        {
            Debug.Log("unload scene: " + sceneIndex);
            AsyncOperation loadOpt = SceneManager.UnloadSceneAsync(sceneIndex);

        }

        public Scene GetActiveScene() => SceneManager.GetActiveScene();
        #endregion
    }
1 Like

Also intermittently having this issue.

Client is in “Tropical Scene”, enters a ticket for “Arena Scene”, matchmaker accepts and the player starts loading. The player immediately disposes of their current scene and loads up a “Loading Screen” scene.

Server meanwhile is loading up the arena scene in response to the allocation payload.

Client connects and the error message mentioned in this thread occurs at random, maybe 1/10 times.

Best guess is my client is managing to load in the scene before the server is done loading it.

I don’t call ReadyServerForPlayersAsync() at all. It doesn’t seem like this does anything, players get matched into the server regardless. In fact, I commented this line out because it was crashing. Should matchmaking tickets be getting fulfilled when the server hasn’t said they’re ready? If not then what is the point in this method?

EDIT: I noticed whenever this happens, the client has the scene loaded twice. But the scene is only ever loaded once on the server. There is no client side scene switching code other than opening the “loading screen” which only has a camera, image and music, so I’m at a loss why this scene would get loaded twice. It’s also really hard to get this to trigger, given I can go through 10+ matches without it ever triggering.

After many hours of debugging I believe I have solved this issue, for my use case at least!

My server start flow goes something like

  • Bootstrap (loads network, starts the server, etc)

  • Wait for allocation before doing anything else

  • On allocate → change the map

I believe the “start the server” vs “wait for allocation” bit is backward here. So clients were able to load in while the server was still on the bootstrap scene waiting for allocation. I explicitly set my clients to ignore server requests to change scene to bootstrap, but that isn’t enough.

To fix this, you can use ConnectionApproval.Pending = true, to temporarily pause the connection attempt (the client will not try to load any scene yet) until your scene has loaded on the server. Note that at this stage you have to begin managing the client connection state because if you change the pending state from true to false, and the client since disconnected, you’ll get an exception. So you have to start manually checking if the client is in the NetworkManager’s ConnectedClients before changing their Pending status. Unfortunately the connection approval process isn’t async so you’ll need to either start using dictionaries with the network ID in them, or use something like a coroutine.

Alternatively, just leave them as pending and let them time out so they’ll reconnect.

I do thoroughly believe this is a bug with NetworkSceneManager. The client should not be trying to load the same scene multiple times when the server only changed their scene once.

1 Like

When does it get fixed?!?!?!?!?!
I started getting this dumb message after switching protocol from dtls to udp and updating unity transport package to fix another NGO bug…

UPD I switched back to dtls and it seem to help for some magic reason. Not sure if another bug comes back cause of it (really hope it does not but you know it’s unity so…

I referred to #8 and made modifications to pend in ApprovalCheck until m_NetworkManager.SceneManager.OnLoadEventCompleted finishes.

namespace Matchplay.Server
{
    public class MatchplayNetworkServer : IDisposable
    {
        public Action<UserData> OnPlayerLeft;
        public Action<UserData> OnPlayerJoined;

        NetworkManager m_NetworkManager;

        public int PlayerCount => m_NetworkManager.ConnectedClients.Count;

        //SynchedServerData m_SynchedServerData;

        Dictionary<string, UserData> m_ClientData = new Dictionary<string, UserData>(); // authId to UserData
        public Dictionary<string, UserData> ClientData => m_ClientData;
        Dictionary<ulong, string> m_NetworkIdToAuth = new Dictionary<ulong, string>(); // networkId to authId
        public Dictionary<ulong, string> NetworkIdToAuth => m_NetworkIdToAuth;

        bool m_localNetworkedSceneLoaded = false;
        Dictionary<ulong, NetworkManager.ConnectionApprovalResponse> m_pendingApprovals = new Dictionary<ulong, NetworkManager.ConnectionApprovalResponse>();

        const int k_MaxConnectPayload = 1024;

        public MatchplayNetworkServer(NetworkManager networkManager)
        {
            m_NetworkManager = networkManager;
            m_NetworkManager.ConnectionApprovalCallback += ApprovalCheck;
            m_NetworkManager.OnServerStarted += OnNetworkReady;
        }

        public bool OpenConnection(string ip, int port, GameInfo startingGameInfo)
        {
            var unityTransport = m_NetworkManager.gameObject.GetComponent<UnityTransport>();
            m_NetworkManager.NetworkConfig.NetworkTransport = unityTransport;
            unityTransport.SetConnectionData(ip, (ushort)port);
            Debug.Log($"Starting server at {ip}:{port}\nWith: {startingGameInfo}");

            return m_NetworkManager.StartServer();
        }

        public async Task<bool> ConfigureServer(GameInfo startingGameInfo)
        {
            m_NetworkManager.SceneManager.LoadScene(startingGameInfo.ToSceneName, LoadSceneMode.Single);

            m_localNetworkedSceneLoaded = false;
            //m_NetworkManager.SceneManager.OnLoadComplete += OnNetworkSceneLoadComplete;
            m_NetworkManager.SceneManager.OnLoadEventCompleted += SceneManager_OnLoadEventCompleted;

            var waitTask = WaitUntilSceneLoaded();

            async Task WaitUntilSceneLoaded()
            {
                while (!m_localNetworkedSceneLoaded)
                    await Task.Delay(50);
            }

            if (await Task.WhenAny(waitTask, Task.Delay(5000)) != waitTask)
            {
                Debug.LogWarning($"Timed out waiting for Server Scene Loading: Not able to Load Scene");
                return false;
            }

            return true;
        }

        private void SceneManager_OnLoadEventCompleted(string sceneName, LoadSceneMode loadSceneMode, List<ulong> clientsCompleted, List<ulong> clientsTimedOut)
        {
            Debug.Log("MatchplayNetworkServer: SceneManager_OnLoadEventCompleted");
            m_localNetworkedSceneLoaded = true;
            m_NetworkManager.SceneManager.OnLoadEventCompleted -= SceneManager_OnLoadEventCompleted;

            foreach (ulong clientId in clientsCompleted)
            {
                if (m_pendingApprovals.ContainsKey(clientId) &&
                    m_NetworkManager.ConnectedClientsIds.Any(id => id == clientId))
                {
                    NetworkManager.ConnectionApprovalResponse approvalResponse = m_pendingApprovals[clientId];
                    approvalResponse.Pending = false;
                }
            }

            m_pendingApprovals.Clear();
        }

        void ApprovalCheck(NetworkManager.ConnectionApprovalRequest request, NetworkManager.ConnectionApprovalResponse response)
        {
            if (request.Payload.Length > k_MaxConnectPayload)
            {
                //Set response data
                response.Approved = false;
                response.CreatePlayerObject = false;
                response.Position = null;
                response.Rotation = null;
                response.Pending = false;

                Debug.LogError($"Connection payload was too big! : {request.Payload.Length} / {k_MaxConnectPayload}");
                return;
            }

            var payload = System.Text.Encoding.UTF8.GetString(request.Payload);
            var userData = JsonUtility.FromJson<UserData>(payload);
            userData.NetworkId = request.ClientNetworkId;
            Debug.Log($"Host ApprovalCheck: connecting client: ({request.ClientNetworkId}) - {userData}");

            //Test for Duplicate Login.
            if (m_ClientData.ContainsKey(userData.UserAuthId))
            {
                ulong oldClientId = m_ClientData[userData.UserAuthId].NetworkId;
                Debug.Log($"Duplicate ID Found : {userData.UserAuthId}, Disconnecting Old user");

                // kicking old client to leave only current
                SendClientDisconnected(request.ClientNetworkId, ConnectStatus.LoggedInAgain);
                WaitToDisconnect(oldClientId);
            }

            SendClientConnected(request.ClientNetworkId, ConnectStatus.Success);

            //Populate our dictionaries with the playerData
            m_NetworkIdToAuth[request.ClientNetworkId] = userData.UserAuthId;
            m_ClientData[userData.UserAuthId] = userData;
            OnPlayerJoined?.Invoke(userData);

            //Set response data
            response.Approved = true;
            response.CreatePlayerObject = false;

            if (m_localNetworkedSceneLoaded)
            {
                response.Pending = false;
            }
            else
            {
                response.Pending = true;
                m_pendingApprovals[userData.NetworkId] = response;
            }
        }

        void OnNetworkReady()
        {
            m_NetworkManager.OnClientDisconnectCallback += OnClientDisconnect;
        }

        private void OnClientDisconnect(ulong networkId)
        {
            SendClientDisconnected(networkId, ConnectStatus.GenericDisconnect);
            if (m_NetworkIdToAuth.TryGetValue(networkId, out var authId))
            {
                m_NetworkIdToAuth?.Remove(networkId);
                OnPlayerLeft?.Invoke(m_ClientData[authId]);

                if (m_ClientData[authId].NetworkId == networkId)
                {
                    m_ClientData.Remove(authId);
                }
            }
        }

        async void WaitToDisconnect(ulong networkId)
        {
            await Task.Delay(500);
            m_NetworkManager.DisconnectClient(networkId);
        }

        /// <summary>
        /// Sends a message that a client has connected to the server
        /// </summary>
        /// <param name="networkId"> id of the client to send to </param>
        /// <param name="status"> the status to pass to the client</param>
        void SendClientConnected(ulong networkId, ConnectStatus status)
        {
            var writer = new FastBufferWriter(sizeof(ConnectStatus), Allocator.Temp);
            writer.WriteValueSafe(status);
            Debug.Log($"Send Network Client Connected to : {networkId}");
            MatchplayNetworkMessenger.SendMessageTo(NetworkMessage.LocalClientConnected, networkId, writer);
        }

        /// <summary>
        /// Sends a DisconnectReason to the indicated client. This should only be done on the server, prior to disconnecting the client.
        /// </summary>
        /// <param name="networkId"> id of the client to send to </param>
        /// <param name="status"> The reason for the upcoming disconnect.</param>
        void SendClientDisconnected(ulong networkId, ConnectStatus status)
        {
            var writer = new FastBufferWriter(sizeof(ConnectStatus), Allocator.Temp);
            writer.WriteValueSafe(status);
            Debug.Log($"Send Network Client Disconnected to : {networkId}");
            MatchplayNetworkMessenger.SendMessageTo(NetworkMessage.LocalClientDisconnected, networkId, writer);
        }

        public void Dispose()
        {
            if (m_NetworkManager == null)
            {
                return;
            }

            m_NetworkManager.ConnectionApprovalCallback -= ApprovalCheck;
            m_NetworkManager.OnClientDisconnectCallback -= OnClientDisconnect;
            m_NetworkManager.OnServerStarted -= OnNetworkReady;

            if (m_NetworkManager.IsListening)
            {
                m_NetworkManager.Shutdown();
            }
        }
    }
}

This resolved the exception error: “Server Scene Handle (-128) already exists!”
However, this was not sufficient.
Although the error stopped occurring, there is still an issue where one of the clients fails to transition to the game scene.
After successful matchmaking, one client transitions from the menu scene to the game scene, but the other client fails to transition to the game scene and cannot start the game. This does not happen every time, but it does occur occasionally.
When a client fails the scene transition, the server log contains the following message:

[Netcode] Server detected a transport connection from Client-1, but timed out waiting for the connection request message.
UnityEngine.StackTraceUtility:ExtractStackTrace () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:37)
UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
UnityEngine.Logger:Log (UnityEngine.LogType,object)
UnityEngine.Debug:LogWarning (object)
Unity.Netcode.NetworkLog:LogWarning (string) (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.8.1/Runtime/Logging/NetworkLog.cs:28)
Unity.Netcode.NetworkConnectionManager/<ApprovalTimeout>d__60:MoveNext () (at ./Library/PackageCache/com.unity.netcode.gameobjects@1.8.1/Runtime/Connection/NetworkConnectionManager.cs:622)
UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr) (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/Coroutines.cs:17)

Subsequently, the client is disconnected.
The scene transition failure occurs about once every ten times, but it can also happen consecutively, which is frustrating. I would appreciate any suggestions on how to solve this issue.

Yeah this is nasty and needs a fix.
Seems to be more of an issue as the project grows and the scene takes longer to load.

Because I’m using lobbies my workaround was to wait until the host has completely loaded the scene and then update the lobby to tell the other players they can load now. Feels very hacky though and it means it will take longer for the game to start.

I was getting the issue about 1 in 4 times using unity 6 preview.

I’m having the same intermittent issue. I believe it has to do with a race condition or improper cleanup somewhere.

Exception Server Scene Handle (-413018) already exist!  Happened during scene load of [Scene Name] with Client Handle (-146320)
Unity.Netcode.NetworkSceneManager.OnSceneLoaded (System.:UInt32 sceneEventId) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/SceneManagement/NetworkSceneManager.cs:1846)
Unity.Netcode.SceneEventProgress.<SetAsyncOperation>b__37_0 (UnityEngine.AsyncOperation asyncOp2) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/SceneManagement/SceneEventProgress.cs:272)
UnityEngine.AsyncOperation.InvokeCompletionEvent () (at <eb019d4a63d44ca7a73547c38156dec2>:0)

Unity 6000.0.15f1, NGO 2.0.0-pre.4.