PreLogin issue with FUniqueNetIdRepl - From UE 4.19 to UE 4.21

So this started to happen when we changed from UE 4.19 to UE 4.21

I’m having trouble with a how the UniqueNetId is replicated from client to server during the login message. My client seems to be transmitting the proper information, but when the server receives the FUniqueNetIdRepl the Type of the FUniqueNetId is lost and becomes “UNSET”. It’s been particularly tricky to figure out where in this client-server connection this information seems to be getting lost, so any ideas are greatly appreciated.

The NetId of my online subsystem inherits from FUniqueNetIdString and I’ve been wondering if there has been some change in between unreal version on how the type is stored and packed, but I didn’t found anything that could be significant.

The correct ID and platform name still gets through, is just the type being lost.

So I figured it out. When creating replication data inside FUniqueNetIdRepl it would find a hash for my type, but the hash was not being reverted back to a type. Manage to fix it by doing some changes into the override of GetType on my FUniqueNetId.

These helped:

https://forums.unrealengine.com/community/general-discussion/1551415-from-4-19-to-4-21-incompatible_unique_net_id

https://forums.unrealengine.com/unreal-engine/feedback-for-epic/1518161-fix-incoming-seriously-damaging-change-to-online-subsystems-in-4-20