Invalid URI: Invalid port specified after updating a build.

Hello,
My team and I are having issues getting addressable to properly load in changes for editor and builds. Currently, when entering play mode, loading, and instantiating an asset it produces an error I will paste below. Here is the code block for the section where are instantiating the game object.

await Addressables.InitializeAsync();
await Addressables.CheckForCatalogUpdates();

sceneComposer.InstantiateAsync(transform.parent, false);

We are using CCD and accessing the bucket through CCD.dev.OurBucketName.latest remote path. Here is a link to an album containing relevant settings Addressable Port Issue Current Setup - Album on Imgur

This is on Addressables 1.20.5, Unity 2022.1.2f1

Steps causing error:

  1. Create new addressable build.
  2. Upload bundles and catalog files to the target bucket through the dashboard
  3. Test using “Use existing build”
  4. Loads successfully or port error.
  5. Make change to one of the addressable prefabs, i.e. adding a sphere
  6. Either making new build or updating a previous build (both have same results)
  7. Uploading changed bundles and catalog files to the target bucket through the dashboard
  8. Always port error.

Thank you. I will post error and relevant scripts below.

Pastebin for error:

Relevant code:

[SerializeField] List<string> addressablesToLoad = new List<string>();
    [SerializeField] List<string> prefabsToInstantiate = new List<string>();

    // Start is called before the first frame update
    IEnumerator Start()
    {
        Logger.Log("Starting scene composition");

        long totalSize = 0;
        foreach (string key in addressablesToLoad)
        {
            AsyncOperationHandle<long> getDownloadSize = Addressables.GetDownloadSizeAsync(key);
            yield return getDownloadSize;
            totalSize += getDownloadSize.Result;
        }

        long sizeFinished = 0;
        AsyncOperationHandle downloadHandle;
        foreach (string key in addressablesToLoad)
        {
            AsyncOperationHandle<long> getDownloadSize = Addressables.GetDownloadSizeAsync(key);
            yield return getDownloadSize;

            if (getDownloadSize.Result > 0)
            {
                downloadHandle = Addressables.DownloadDependenciesAsync(key, false);
                float progress = 0;

                while (downloadHandle.Status == AsyncOperationStatus.None)
                {
                    float percentageComplete = downloadHandle.GetDownloadStatus().Percent;
                    if (percentageComplete > progress * 1.1) // Report at most every 10% or so
                    {
                        progress = percentageComplete; // More accurate %
                        LoadingEvent loadingEvent = GameEventFactory.Create<LoadingEvent>();
                        loadingEvent.EventType = LoadingEventType.Progress;
                        loadingEvent.PercentProgress = (progress * getDownloadSize.Result + sizeFinished) / (float)totalSize;
                        loadingEvent.Message = "Downloading " + key;
                        loadingEvent.Publish();
                    }

                    yield return null;
                }

                Addressables.Release(downloadHandle);
                sizeFinished += getDownloadSize.Result;
            }
        }

        AsyncOperationHandle<IList<GameObject>> loadHandle;
        loadHandle = Addressables.LoadAssetsAsync<GameObject>(prefabsToInstantiate,
            addressable =>
            {
                //Gets called for every loaded asset
                Instantiate<GameObject>(addressable, transform.parent);
            }, Addressables.MergeMode.Union);

        while (loadHandle.Status == AsyncOperationStatus.None)
        {
            yield return null;
        }

        LoadingEvent finishedEvent = GameEventFactory.Create<LoadingEvent>();
        finishedEvent.EventType = LoadingEventType.Finished;
        finishedEvent.Publish();

        Logger.Log("Finished scene composition");
    }

Hi @MaxwellLovellWPS does the issue reproduce in 1.21.2? I recall there were some issues with the CCD integration in 1.20.5

1 Like

Thanks Pilla, didn’t think of testing that.
Just tried with 1.21.2, doing one addressable build worked but updating and uploading the updated content failed with the same error. Attempting to do a new default build also lead to the same error. Think we will stick with 1.21.1 for now since it looks a little bit nicer anyways

Bumping this, so far no luck still