Addressables.LoadContentCatalogAsync throws null reference error in build

Im trying to load addressable catalog through script and it works fine in Unity Editor but throws null reference exception when run in build. The Unity version I’m using is 2019.4.9f1. Here’s my code.


public async Task LoadCatalog(string catalogPath)
{
LogsUtil.Log(LogsUtil.LOG_PRIORITY.P1, LogsUtil.LOGTYPE.LOG, "[AddressableProfilePath] [LoadCatalog] Addressable profile path is set to " + path); ;
if (File.Exists(catalogPath))
{
Debug.Log("Loading " + catalogPath);
try
{
AsyncOperationHandle asyncOperation = Addressables.LoadContentCatalogAsync(catalogPath, true);
await asyncOperation.Task;
Debug.Log(“Catalog loaded”);
}
catch(Exception e)
{
Debug.LogError("Catalog loading failed → " + e.Message);
}
}
else Debug.Log(catalogPath + “Doesn’t exist”);
}

@unity_bill

Facing the same issue and need help in resolving it. Using Unity 2020.3.8 and addressables version 1.16. @davidla_unity @TreyK-47 @unity_bill @DavidUnity3d.