LoadContentCatalogAsync fails with null exception on Android, despite address being accessible

We use this code to load a remote catalog:

        try {
            AsyncOperationHandle<IResourceLocator> operation = Addressables.LoadContentCatalogAsync(url);
            await operation.Task;
            Debug.Log("State of loading Addressables remote catalog: " + operation.Status);
        } catch (System.Exception e) {
            Debug.LogWarning("LoadContentCatalogAsync failed with exception:\n\n" + e);
        }

It works fine on Windows. However, when it runs on Android, it crashes with this exception:

We confirmed that the URL for the catalog is accessible and it opens correctly in an Android browser, so this seems like a bug…?

The crash happens here, in InitalizationObjectsOperation.cs due to the result of the operation (rtd) being null:

The operation seems to be started from here, in InitializationOperation.cs:

Any ideas?

This is using Unity 2019.4.1f1 and Addressables 1.10.

We have our Addressables in a separate project, so that we can keep using the same Unity version and keep retro-compatibility with the app, even if users use an older version. Is this a problem in any way? It means that there are no Addressable groups in the app project itself. Again, Windows builds work fine with the same code.

Thanks!

Seems like it’s fixed in either version 1.11 or 1.12. I had to forcefully work around the bugs/breaking changes in those versions to reach this conclusion.

Hi CanisLupus, how you work around it? I have the same issue. my code here:

        AsyncOperationHandle<IResourceLocator> loadContentCatalogAsync = Addressables.LoadContentCatalogAsync(
         @catalogPath);
        loadContentCatalogAsync.Completed += OnCompleted;
    }
    private void OnCompleted(AsyncOperationHandle<IResourceLocator> obj)
    {
        IResourceLocator resourceLocator = obj.Result;
        Debug.Log(obj.Status);
        if (obj.Status.ToString() == "Succeeded")
        {
            InitAndWaitUntilLocLoaded();
        }
        else
        {
            canvas.transform.Find("ErrorMsg").GetComponent<Text>().text = "File not found in " + catalogPath;
        }

I can get the Status “Succeeded” in Unity Editor, but get “Failed” when run from Android phone

Hi @zhouhong , what I meant was that the problem I originally had was fixed in version 1.11 or 1.12, but those versions had other problems at the time, around which I had to work before being able to confirm that they fixed it.

I don’t know about your specific case but the problem shouldn’t happen in current versions! Well, unless there was a regression. NOTE: I haven’t used Addressables in a while.