#Netcode 1.9.1 - InvalidOperationException: Nullable object must have a value.

1 messages · Page 1 of 1 (latest)

left rapids
#

Hello,
I am not updating my NGO version because it asks to update Unity Version.
My question: New scene, any second player can't join: they are not spawned caused by this issue (but the first one can):

InvalidOperationException: Nullable object must have a value. at System.Nullable`1[T].get_Value () [0x00008] in <467a840a914a47078e4ae9b0b1e8779e>:0 at Unity.Netcode.NetworkObject.HostCheckForGlobalObjectIdHashOverride () [0x0007e] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.NetworkObject.GetMessageSceneObject (System.UInt64 targetClientId) [0x0005d] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.SceneEventData.WriteSceneSynchronizationData (Unity.Netcode.FastBufferWriter writer) [0x00093] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.SceneEventData.Serialize (Unity.Netcode.FastBufferWriter writer) [0x00110] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.SceneEventMessage.Serialize (Unity.Netcode.FastBufferWriter writer, System.Int32 targetVersion) [0x00000] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.NetworkMessageManager.SendMessage[TMessageType,TClientIdListType] (TMessageType& message, Unity.Netcode.NetworkDelivery delivery, TClientIdListType& clientIds) [0x000d8] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.NetworkMessageManager.SendMessage[T] (T& message, Unity.Netcode.NetworkDelivery delivery, System.UInt64 clientId) [0x00012] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.NetworkConnectionManager.SendMessage[T] (T& message, Unity.Netcode.NetworkDelivery delivery, System.UInt64 clientId) [0x0002d] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.NetworkSceneManager.SynchronizeNetworkObjects (System.UInt64 clientId) [0x0015a] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.NetworkConnectionManager.HandleConnectionApproval (System.UInt64 ownerClientId, Unity.Netcode.NetworkManager+ConnectionApprovalResponse response) [0x0031c] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.ConnectionRequestMessage.Handle (Unity.Netcode.NetworkContext& context) [0x00077] in <7ede0df37a48406f998f3632b182adf4>:0 at Unity.Netcode.NetworkMessageManager.ReceiveMessage[T] (Unity.Netcode.FastBufferReader reader, Unity.Netcode.NetworkContext& context, Unity.Netcode.NetworkMessageManager manager) [0x000c0] in <7ede0df37a48406f998f3632b182adf4>:0 at (wrapper delegate-invoke) <Module>.invoke_void_FastBufferReader_NetworkContext&_NetworkMessageManager(Unity.Netcode.FastBufferReader,Unity.Netcode.NetworkContext&,Unity.Netcode.NetworkMessageManager) at Unity.Netcode.NetworkMessageManager.HandleMessage (Unity.Netcode.NetworkMessageHeader& header, Unity.Netcode.FastBufferReader reader, System.UInt64 senderId, System.Single timestamp, System.Int32 serializedHeaderSize) [0x000ff] in <7ede0df37a48406f998f3632b182adf4>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) Unity.Netcode.NetworkMessageManager:HandleMessage(NetworkMessageHeader&, FastBufferReader, UInt64, Single, Int32) Unity.Netcode.NetworkMessageManager:ProcessIncomingMessageQueue() Unity.Netcode.NetworkManager:NetworkUpdate(NetworkUpdateStage) Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage(NetworkUpdateStage) Unity.Netcode.<>c:<CreateLoopSystem>b__0_0()

solid oar
#

Yea, you should be able to update to NGO 1.14 without updating the Editor

left rapids
#

thanks @solid oar , long time ago, I hope everything is going well for you 🙂

left rapids
#

Changing version doesn't help me

is there a way to get the network object reference id or name that are missing ?

solid oar
left rapids
#

Removing the Library folder doesn’t help.
Replacing my player prefab with a simpler one makes everything work… but then why does it work in other scenes and not in this one?

That’s what makes this so painful to debug.

The real issue here is the error itself:
it’s terribly designed.
It should clearly tell us which GameObject(s) contain the NetworkObject(s) causing the problem.

Instead, we get a generic error with zero context, which turns what should be a small, easy bug into a major debugging nightmare.
All because the error message is generic and gives no actionable information.

Honestly, this kind of error handling makes Netcode issues way harder than they need to be.