Why is my NetworkList not syncing correctly?

Hi, how are you?. First, some context.

Basic info:
Unity Version: Unity 6 Preview (6000.0.7f1)
Netcode For Gameobjects Version: 2.0.0-pre.1

Explanation:
I am trying to make a Distributed Authority turn based game with Netcode for Gameobjets. As one would do, im trying to establish the connection, and taking my first steps on learning this new version of Netcode, where quite a few things have changed from version 1.

I have this MultiplayerManager which manages player names and colors, player connections, and some other things.

using System;
using System.Collections.Generic;
using Unity.Collections;
using Unity.Netcode;
using Unity.Services.Authentication;
using UnityEngine;
using Random = UnityEngine.Random;

public class MultiplayerManager : SingletonNetwork<MultiplayerManager>
{
    public event Action OnPlayerDataListChanged;

    private const string PLAYER_PREFS_PLAYER_NAME_KEY = "PlayerName";

    [SerializeField]
    private List<Color> availablePlayerColors = new()
    {
        Color.red,
        Color.blue,
        Color.green,
        Color.yellow,
        Color.cyan
    };

    private NetworkList<PlayerData> playerDataList;
    private string localPlayerName;

    protected override void Awake()
    {
        base.Awake();

        DontDestroyOnLoad(gameObject);

        playerDataList = new NetworkList<PlayerData>();
        playerDataList.OnListChanged += PlayerDataList_OnListChanged;

        string defaultPlayerName = "PlayerName" + Random.Range(1000, 10000);

        //localPlayerName = PlayerPrefs.GetString(PLAYER_PREFS_PLAYER_NAME_KEY, defaultPlayerName);
        localPlayerName = defaultPlayerName;
    }

    private void PlayerDataList_OnListChanged(NetworkListEvent<PlayerData> _)
    {
        OnPlayerDataListChanged?.Invoke();
    }

    public override void OnNetworkSpawn()
    {
        Debug.Log("MultiplayerManager.OnNetworkSpawn");
        Debug.Log("IsSessionOwner: " + IsSessionOwner);

        if (IsSessionOwner)
            NetworkManager.OnConnectionEvent += Server_OnConnectionEvent;
        else
            NetworkManager.OnConnectionEvent += Client_OnConnectionEvent;
    }

    public string GetLocalPlayerName() => localPlayerName;

    public void SetLocalPlayerName(string playerName)
    {
        localPlayerName = playerName;
        PlayerPrefs.SetString(PLAYER_PREFS_PLAYER_NAME_KEY, playerName);
        PlayerPrefs.Save();
    }

    private void Client_OnConnectionEvent(NetworkManager networkManager, ConnectionEventData connectionEventData)
    {
        Debug.Log("Client_OnConnectionEvent");
        Debug.Log("Event Type: " + connectionEventData.EventType);
        Debug.Log("Client ID: " + connectionEventData.ClientId);
        Debug.Log(connectionEventData);

        if (connectionEventData.EventType == ConnectionEvent.ClientConnected)
        {
            string playerName = GetLocalPlayerName();
            string playerId = AuthenticationService.Instance.PlayerId;

            Debug.Log("Client connected: " + connectionEventData.ClientId);
            Debug.Log("PlayerName: " + playerName);
            Debug.Log("PlayerId: " + playerId);

            SetPlayerNameRpc(playerName, connectionEventData.ClientId);
            SetPlayerIdRpc(playerId, connectionEventData.ClientId);
        }
    }

    private void Server_OnConnectionEvent(NetworkManager networkManager, ConnectionEventData connectionEventData)
    {
        Debug.Log("Server_OnConnectionEvent");
        Debug.Log("Event Type: " + connectionEventData.EventType);
        Debug.Log("Client ID: " + connectionEventData.ClientId);

        if (connectionEventData.EventType == ConnectionEvent.ClientConnected ||
            connectionEventData.EventType == ConnectionEvent.PeerConnected)
        {
            string playerName = GetLocalPlayerName();

            Debug.Log("Client (or peer) connected: " + connectionEventData.ClientId);
            Debug.Log("PlayerName: " + playerName);

            CreatePlayerDataIfNotExists(connectionEventData.ClientId);

            if (connectionEventData.ClientId == OwnerClientId)
            {
                SetPlayerNameRpc(GetLocalPlayerName(), connectionEventData.ClientId);
                SetPlayerIdRpc(AuthenticationService.Instance.PlayerId, connectionEventData.ClientId);
            }
        }
    }

    [Rpc(SendTo.Authority)]
    private void SetPlayerNameRpc(string playerName, ulong clientId)
    {
        Debug.Log("SetPlayerNameRpc");

        int playerDataIndex = GetPlayerDataIndexFromClientId(clientId);

        PlayerData playerData = playerDataList[playerDataIndex];

        playerData.playerName = (FixedString64Bytes) playerName;
        playerDataList[playerDataIndex] = playerData;

        // Print player data
        PrintPlayerData();
    }

    [Rpc(SendTo.Authority)]
    private void SetPlayerIdRpc(string playerId, ulong clientId)
    {
        Debug.Log("SetPlayerIdRpc");

        int playerDataIndex = GetPlayerDataIndexFromClientId(clientId);

        PlayerData playerData = playerDataList[playerDataIndex];

        playerData.authenticationPlayerId = (FixedString64Bytes) playerId;
        playerDataList[playerDataIndex] = playerData;
    }

    private int GetPlayerDataIndexFromClientId(ulong clientId)
    {
        for (int i = 0; i < playerDataList.Count; i++)
        {
            if (playerDataList[i].clientId == clientId)
                return i;
        }

        return -1;
    }

    private void RemovePlayerDataIfExists(ulong clientId)
    {
        for (var i = 0; i < playerDataList.Count; i++)
        {
            if (playerDataList[i].clientId != clientId)
                continue;

            playerDataList.RemoveAt(i);
            PrintPlayerData();
            break;
        }
    }

    private void CreatePlayerDataIfNotExists(ulong clientId)
    {
        if (playerDataWithClientIdExists(clientId))
            return;

        PlayerData playerData = new()
        {
            clientId = clientId,
            colorId = ((int)clientId - 1) % availablePlayerColors.Count
        };

        playerDataList.Add(playerData);
        PrintPlayerData();
    }

    private bool playerDataWithClientIdExists(ulong clientId)
    {
        foreach (PlayerData playerData in playerDataList)
            if (playerData.clientId == clientId)
                return true;

        return false;
    }

    public Color GetColorFromColorId(int colorId)
    {
        return availablePlayerColors[colorId];
    }

    private void PrintPlayerData()
    {
        foreach (PlayerData playerData in playerDataList)
            Debug.Log(playerData);
    }

    public PlayerData GetPlayerDataFromClientId(ulong clientId)
    {
        foreach (PlayerData playerData in playerDataList)
        {
            if (playerData.clientId != clientId)
                continue;

            return playerData;
        }

        return default;
    }
}

My first game (Authority, clientId = 1) initializes perfectly, calling Server_OnConnectionEvent once and calling the corresponding ServerRpc. (Im calling Authority -> Server and NotAuthority -> Client becuase of a habit from doing client-server architecture.

But, when my second game (NotAuthority, clientId = 2) connects, and, with enabling debug mode on network manager, it gets stuck on this message [Netcode] [Client-2] Connection approved! Synchronizing...
I have pinpointed that the problem has to do with the
NetworkList<PlayerData> playerDataList
Because when I remove it the connection can work correctly (even though obviously the color and name of each player will not be set as I commented all that logic). But im stuck here, I dont understand why this would not work as it is.

What could be going on here?
If you need more context of the code, please ask for it.

Thank you very much in advance :smile:

9906906--1431345--upload_2024-6-24_18-48-23.png
Some more context. Both logs of both games with debug mode enabled. Autohority is on the left.

Bump