Addressables Profile does not recognize installed CCD Management package

Just trying to get Addressables with CCD Delivery set up and there is an issue trying to select Cloud Content Delivery in the Addressables Profile Manager. Even though CCD Management 2.2.2 is installed, it claims it is not and offers to install 1.0.0 Beta. If I install the 1.0.0 Beta, I can modify the Remote Load Path but it reverts to Custom next time the Unity Editor is launched. Any idea of what I can do to fix this?

UnityEditor 2021.3.23f1

Thanks,
Cam

Hi Cambrose303,

Thanks for posting on the forum,
I have seen this error before, could you try and update to Addressables version 1.21.9?
You can update to the latest version by going to the package manager clicking on the + and adding the following package name : com.unity.addressables

Make sure to backup your project prior to making any changes.

Let me know if this solves it for you.

Thank you. That fixed it. Follow up question…
If I set the Remote CCD Setting to Automatic, does it automatically select the correct bucket based on platform and when it says (Set with CCD Manager), where do I find those settings?

Anyone explain this?

As you can see, i dont even have the options im suppose to have after installing CCD. Also tried latest 1.21. Same thing happens.

Hi Cambrose303,

Glad that helped you out.

Automatic will automatically build and create a bucket for your use in the environment you specified.
You should have a bucket that was automatically created for you when you use the option “Build to CCD”
More info on the created bucket by going to your Unity dashboard.
Unity Dashboard > LiveOps > Cloud Content Delivery > Buckets

@markmozza

Please see the following thread

Let me know if this helps you.

@SebT_Unity

When i open Addressable Profiles i get the following error. Althouh i can see the drop down now thanks to that guide. The error happens when i click the refresh on getting the environments from CCD.

JsonReaderException: JSON integer 3244960947 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 881.
Newtonsoft.Json.JsonTextReader.ParseReadNumber (Newtonsoft.Json.ReadType readType, System.Char firstChar, System.Int32 initialPosition) (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:2238)
Newtonsoft.Json.JsonTextReader.ParseNumber (Newtonsoft.Json.ReadType readType) (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:1973)
Newtonsoft.Json.JsonTextReader.ReadNumberValue (Newtonsoft.Json.ReadType readType) (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:972)
Newtonsoft.Json.JsonTextReader.ReadAsInt32 () (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:472)
Newtonsoft.Json.JsonReader.ReadForType (Newtonsoft.Json.Serialization.JsonContract contract, System.Boolean hasConverter) (at /root/repo/Src/Newtonsoft.Json/JsonReader.cs:1199)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues (Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Type objectType) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:2232)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.Serialization.ObjectConstructor`1[T] creator, System.String id) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:1970)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract objectContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id, System.Boolean& createdFromNonDefaultCreator) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:2327)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:493)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:309)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues (Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Type objectType) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:2243)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.Serialization.ObjectConstructor`1[T] creator, System.String id) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:1970)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract objectContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id, System.Boolean& createdFromNonDefaultCreator) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:2327)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:493)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:309)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList (System.Collections.IList list, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:1713)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue, System.String id) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:886)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:311)
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) (at /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:202)
Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) (at /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:904)
Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) (at /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:883)
Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) (at /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:831)
Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) (at /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:787)
Unity.Services.Ccd.Management.Http.ResponseHandler.TryDeserializeResponse[T] (Unity.Services.Ccd.Management.Http.HttpClientResponse response) (at Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/Http/ResponseHandler.cs:55)
Rethrow as ResponseDeserializationException: JSON integer 3244960947 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 881.
Unity.Services.Ccd.Management.Http.ResponseHandler.TryDeserializeResponse[T] (Unity.Services.Ccd.Management.Http.HttpClientResponse response) (at Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/Http/ResponseHandler.cs:59)
Unity.Services.Ccd.Management.Http.ResponseHandler.HandleAsyncResponse[T] (Unity.Services.Ccd.Management.Http.HttpClientResponse response, System.Collections.Generic.Dictionary`2[TKey,TValue] statusCodeToTypeMap) (at Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/Http/ResponseHandler.cs:251)
Unity.Services.Ccd.Management.Apis.Buckets.BucketsApiClient.ListBucketsByProjectEnvAsync (Unity.Services.Ccd.Management.Buckets.ListBucketsByProjectEnvRequest request, Unity.Services.Ccd.Management.Configuration operationConfiguration) (at Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/Apis/BucketsApi.cs:744)
Unity.Services.Ccd.Management.WrappedCcdManagementService.TryCatchRequest[TRequest,TReturn] (System.Func`3[T1,T2,TResult] func, TRequest request, System.Boolean doEnvironmentLookup) (at Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:910)
Rethrow as CcdManagementException: JSON integer 3244960947 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 881.
Unity.Services.Ccd.Management.WrappedCcdManagementService.ResolveErrorWrapping (System.Int32 reason, System.Exception exception) (at Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:1008)
Unity.Services.Ccd.Management.WrappedCcdManagementService.TryCatchRequest[TRequest,TReturn] (System.Func`3[T1,T2,TResult] func, TRequest request, System.Boolean doEnvironmentLookup) (at Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:927)
Unity.Services.Ccd.Management.WrappedCcdManagementService.TryCatchRequest[TRequest,TReturn] (System.Func`3[T1,T2,TResult] func, TRequest request) (at Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:884)
Unity.Services.Ccd.Management.WrappedCcdManagementService.ListBucketsAsync (Unity.Services.Ccd.Management.PageOptions pageOptions) (at Library/PackageCache/com.unity.services.ccd.management@2.2.2/Editor/SDK/WrappedCcdManagementService.cs:217)
UnityEditor.AddressableAssets.Settings.ProfileDataSourceSettings.GetAllBucketsAsync (System.String environment) (at Library/PackageCache/com.unity.addressables@1.21.10/Editor/Settings/ProfileDataSourceSettings.cs:357)
UnityEditor.AddressableAssets.Settings.ProfileDataSourceSettings.UpdateCCDDataSourcesAsync (System.String projectId, System.Boolean showInfoLog) (at Library/PackageCache/com.unity.addressables@1.21.10/Editor/Settings/ProfileDataSourceSettings.cs:318)
UnityEditor.AddressableAssets.GUI.ProfileWindow.Awake () (at Library/PackageCache/com.unity.addressables@1.21.10/Editor/GUI/ProfileWindow.cs:122)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <4a4789deb75f446a81a24a1a00bdd3f9>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0)
UnityEngine.UnitySynchronizationContext.Exec () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0)

When I onboarded the buckets in the CCD dashboard, it set up separate buckets for iOS and Android but in the Profile Manager, it doesn’t appear to understand Build Targets. Regardless of what platform I’m building for, all content builds locally into one folder and it seems to want to only address a single bucket in the Remote Load Path. Is there a way to set a separate bucket ID per platform? To keep things simple, I might just start over and build a single production bucket.

1 Like

I think I am running into this same/similar problem. I am able to build and upload to CCD (via the Build to CCD option in Addressables Groups tab) and I see a bucket for each platform target I’ve tried it on (iOS, Android, and StandaloneWindows64). They also update as expected depending on what my build target is selected as in the editor.

However, when I build to Android and run on device, it’s attempting to download from the iOS bucket ID. I get a 404 error and the URL that is logged is using the iOS bucked ID.

I can see in Addressables Profiles tab that Remote.LoadPath appears to be set correctly with Automatic(profile) setting like so:

https://***.client-api.unity3dusercontent.com/client_api/v1/environments/{CcdManager.EnvironmentName}/buckets/{CcdManager.BucketId}/release_by_badge/{CcdManager.Badge}/entry_by_path/content/?path=

But apparently, CcdManager.BucketId is somehow using the iOS bucket ID when I build the game for Android. Any ideas on how I can set CcdManager.BucketId correctly when building?

Unity 2022.3.9f1, Addressables 1.21.17, CCD Management 2.2.2

Update: In case this helps someone else, I tried a variety of clearing cache, rebuilding, switching the Play Mode Script to use existing build, and debug logging the CccManager.* static variables which all looked correct in the editor after a call to Addressables.InitializeAsync().

In AddressableAssetSettings, I also checked Build Remote Catalog with Build and Load Paths set to Remote… although I did NOT do a Build to CCD after doing this.

I’m not sure what of those things finally fixed it, but it seems to work on device now… ?

OK so I just exposed this as NOT working for different environment buckets (e.g. testing-windows vs. production-windows). How are you supposed to reliably/correctly set the environment & bucket that any given game build is pointing to???

Steps:

  • Verified all environments have a current release in their buckets, from using Build to CCD from the Addressables Groups window by using separate testing-windows, staging-windows, and production-windows profiles.

  • I set my active Addressables Profile to my production-windows one.

  • I did a Clear Build Cache->All from the Addressables Groups window.

  • I did a Build->Default Script from the Addressables Groups window.

  • Play Mode Script is set to Use Existing Build (Windows).

  • I did a full standalone build of the game from the editor.

My game calls UnityServices.InitializeAsync and sets the environment to production (from a variable in a manager GameObject called environmentUGS):

options.SetEnvironmentName(environmentUGS.ToString());
await UnityServices.InitializeAsync(options);```

After that returns, I initialize Addressables:

```Addressables.InitializeAsync().Completed += OnAddressablesInitializeComplete;```

In the callback OnAddressablesInitializeComplete, I print out the CcdManager variables, and they are wrong. Still pointing at the testing environment and the wrong bucket ID.

Tested this both in Editor (with Settings->Services->Environments->Environment Selector set to production) and with a standalone windows build, same result.
1 Like

Found where this is happening. There is definitely a major bug of some kind here:

If you open AddressableAssetSettings object in the inspector, you’ll see at the bottom of the inspector something called “Cloud Content Delivery” and a checkbox to “Enable CCD Features”. In my case, ticking this box does nothing, it stays unselected. Despite the fact that I can “Build to CCD” from the Addressables groups windows.

However, if you set your inspector to Debug view, now at the bottom you’ll see a lovely little drop down of a struct or something called “Ccd Managed Data”
In there are all the wrong values that my game keeps using, despite the active profile being set. So there’s a bug in Addressables package right now that either/or that checkbox not working is preventing changing the active profile from updating this hidden little data store that then gets passed around at game build time.

Update: I can check “CCD Enabled” in Debug inspector. Doesn’t fix the issue.

So I guess the million dollar question is:
What sets/triggers the updating of “Ccd Managed Data” in AddressableAssetSettings object?

2 Likes

Here’s the response I got from Unity Support, which doesn’t exactly clear things up (and if I have to set these IDs at runtime then am I not “shipping references to dev and staging environments”???) but provided for everyone’s information:


Hi,

Thank you for submitting the issue.

After looking into your issue and reading the forum thread, I would like to give you some explanations. Firstly, Automatic by default creates a bucket based on your build target. So it will create something like Windows64 or Android as your bucket name and then use that. It will use the “latest” badge.

Then, when you’re building a production build, you’d switch to the “Production” profile, and all the CcdManager values would be set correctly and work by default. But it will not work by default for other environments like “Development“ or “Staging“. The editor doesn’t save all the profile information during the build because our team doesn’t want to ship games with references to people’s development and staging environments, so this doesn’t look at values from the profiles dynamically. As a workaround, you can manually set the needed values for Environment, BucketId, and Badge in runtime.

I found out that you are trying to set the environment for CCD by code:

var options = new InitializationOptions(); options.SetEnvironmentName(environmentUGS.ToString()); await UnityServices.InitializeAsync(options);
Instead of that, you must set these values in CcdManager before any Addressables call like in the example here: Addressable Asset system with Cloud Content Delivery | Addressables | 1.20.5

That said, if you have further questions, please feel free to contact us.


So I guess what I’m understanding from this is ultimately you have to roll your own method of specifying the CcdManager variables at runtime and the Unity system that implies it does that is basically not doing that.

1 Like