You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
I'm actually try to initialize a Relay service with this simple code based on the Codemonkey Relay-Service tutorial. Authorization has been completed successfully:
Starting everything from Unity, this code works like a charm and the service is initialized successfully.
If I use a (Development) Build this code fails when calling StartHost() with this failure:
UnloadTime: 0.905900 ms
Data created: Main Menu
Signed in Anonymously: fuiSi2okDQL0SDCXWWF8QB8D86Q9
best region is europe-west2
JoinCode generated: K6DNCD
Relay Server initialized
ArgumentException: An item with the same key has already been added. Key: -1
at System.Collections.Generic.Dictionary2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000dd] in <605bf8b31fcb444b85176da963870aa7>:0 at System.Collections.Generic.Dictionary2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <605bf8b31fcb444b85176da963870aa7>:0
at Unity.Netcode.NetworkSceneManager.GenerateScenesInBuild () [0x0004a] in :0
at Unity.Netcode.NetworkSceneManager..ctor (Unity.Netcode.NetworkManager networkManager) [0x00091] in :0
at Unity.Netcode.NetworkManager.Initialize (System.Boolean server) [0x0013f] in :0
at Unity.Netcode.NetworkManager.StartHost () [0x00030] in :0
at binrev.netcode.UIHostConnection.OpenConnection () [0x00066] in <9624421bb2774c9980efe3ed0782b5b9>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) [0x00000] in <605bf8b31fcb444b85176da963870aa7>:0
at UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () [0x00002] in <420f675e2d6b4f17877563ada0d329b3>:0
at UnityEngine.UnitySynchronizationContext.Exec () [0x0005d] in <420f675e2d6b4f17877563ada0d329b3>:0
at UnityEngine.UnitySynchronizationContext.ExecuteTasks () [0x00014] in <420f675e2d6b4f17877563ada0d329b3>:0
NullReferenceException: Object reference not set to an instance of an object
at Unity.Netcode.NetworkManager.NetworkUpdate (Unity.Netcode.NetworkUpdateStage updateStage) [0x0004c] in :0
at Unity.Netcode.NetworkUpdateLoop.RunNetworkUpdateStage (Unity.Netcode.NetworkUpdateStage updateStage) [0x00021] in :0
at Unity.Netcode.NetworkUpdateLoop+NetworkPostLateUpdate+<>c.b__0_0 () [0x00000] in :0
The NullReferenceException then is thrown endless every second.
The Code is triggert by a simple UIScript UIHostConnection, listen to a Button which invokes the OpenConnection method.
This method only triggers this code. The UI script is inherited from MonoBehaviour.
I also tried to use NetworkBehaviour, but this has no different effect.
Reproduce Steps
Run this snipped in Unity, anything works like expected.
Create a Build (Development), this snipped crashes on StartHost call
Description
I'm actually try to initialize a Relay service with this simple code based on the Codemonkey Relay-Service tutorial. Authorization has been completed successfully:
Starting everything from Unity, this code works like a charm and the service is initialized successfully.
If I use a (Development) Build this code fails when calling StartHost() with this failure:
The NullReferenceException then is thrown endless every second.
The Code is triggert by a simple UIScript UIHostConnection, listen to a Button which invokes the OpenConnection method.
This method only triggers this code. The UI script is inherited from MonoBehaviour.
I also tried to use NetworkBehaviour, but this has no different effect.
Reproduce Steps
Environment
Additional Context
Player.log
HostConnection.txt
The text was updated successfully, but these errors were encountered: