Search Unity

Bug Error after installing CCD Management on Addressable Profiles

Discussion in 'Unity Cloud Content Delivery' started by markmozza, Apr 19, 2023.

  1. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    When i open Addressable Profiles i get the following error. The error happens when i click the refresh on getting the environments from CCD.

    Code (CSharp):
    1.     JsonReaderException: JSON integer 3244960947 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 881.
    2.     Newtonsoft.Json.JsonTextReader.ParseReadNumber (Newtonsoft.Json.ReadType readType, System.Char firstChar, System.Int32 initialPosition) (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:2238)
    3.     Newtonsoft.Json.JsonTextReader.ParseNumber (Newtonsoft.Json.ReadType readType) (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:1973)
    4.     Newtonsoft.Json.JsonTextReader.ReadNumberValue (Newtonsoft.Json.ReadType readType) (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:972)
    5.     Newtonsoft.Json.JsonTextReader.ReadAsInt32 () (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:472)
    6.     Newtonsoft.Json.JsonReader.ReadForType (Newtonsoft.Json.Serialization.JsonContract contract, System.Boolean hasConverter) (at /root/repo/Src/Newtonsoft.Json/JsonReader.cs:1199)
    7.     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)
    8.     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)
    9.     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)
    10.     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)
    11.     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)
    12.     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)
    13.     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)
    14.     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)
    15.     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)
    16.     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)
    17.     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)
    18.     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)
    19.     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)
    20.     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)
    21.     Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) (at /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:904)
    22.     Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) (at /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:883)
    23.     Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) (at /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:831)
    24.     Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) (at /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:787)
    25.     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)
    26.     Rethrow as ResponseDeserializationException: JSON integer 3244960947 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 881.
    27.     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)
    28.     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)
    29.     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)
    30.     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)
    31.     Rethrow as CcdManagementException: JSON integer 3244960947 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 881.
    32.     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)
    33.     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)
    34.     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)
    35.     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)
    36.     UnityEditor.AddressableAssets.Settings.ProfileDataSourceSettings.GetAllBucketsAsync (System.String environment) (at Library/PackageCache/com.unity.addressables@1.21.10/Editor/Settings/ProfileDataSourceSettings.cs:357)
    37.     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)
    38.     UnityEditor.AddressableAssets.GUI.ProfileWindow.Awake () (at Library/PackageCache/com.unity.addressables@1.21.10/Editor/GUI/ProfileWindow.cs:122)
    39.     System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <4a4789deb75f446a81a24a1a00bdd3f9>:0)
    40.     UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0)
    41.     UnityEngine.UnitySynchronizationContext.Exec () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0)
    42.     UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <f712b1dc50b4468388b9c5f95d0d0eaf>:0)
    43.  
    upload_2023-4-19_22-41-9.png
     
  2. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    282
    Hi Markmozza.
    I saw your post on the following thread.

    Could you share your Org and Project ID through a DM, I would like to further investigate this issue.
    Do you have any environments? If you do how many total?

    Do you have any other packages in this project? If so could you share the versions of your packages?

    Look forward to your response.
     
  3. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    Hi @SebT_Unity, i have just sent a PM. We used to have 2 environments, but i deleted staging to see if it made a difference and it still failed. Whats strange though, we have a similar project using older BETA versions of CCD and that seems to work.

    We are now trying cloud build, but also having issues with that :D
     
    SebT_Unity likes this.
  4. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    282
    Hi Markmozza,
    We had a look at your project and see that the bucket has lots of entries.
    Our first recommendation would be to have one bucket per platform (I can see you started that) However the particular bucket that has an issue seems to have Android and Standalone.

    Could you try uploading through the dashboard and see if you get the same errors?
    Would it be possible to recreate the bucket? So the entries are reset? Keep in mind that this will break any links to the project that are live. So new build will probably need to be created.

    We have had a few reports of this type of error and have prioritized more eyes on the issue.
     
    markmozza likes this.
  5. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    We are currently in the process of creating a new build that involves incorporating new addressables. However, modifying the existing bucket is not feasible as it could cause disruptions for users of older apps. Consequently, for this build, we plan to use one bucket per platform, unlike our previous approach of organizing everything in a single bucket using folders. Uploading to the dashboard or using the command-line tool has never been problematic for us.

    The only issue we are encountering is related to the CCD Package. It appears that the package is returning excessive data, potentially including files, resulting in a JSON file that is too large to handle effectively. We are curious whether it is necessary for the package to return all the files or if there is a way to obtain only a list of environments, which is what we require.
     
  6. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    Any updates on this. Still having the same issues on new buckets. Seems like a dead system to me
     
  7. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    This is right after uploading to a fresh bucket with no entries. Once ive done this CCD becomes completely unuseable.

    upload_2023-9-11_15-14-43.png
     
  8. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    Simple fix is to store "content_size" as MB or instead of using a integer use a long. I have managed to fix this but theres other scripts relying on it being an integer which is limited the whole system as you cant have a bucket over 2GB. A dev team with such a large team, i find it hard to beleive this is still an issue for so long. Its actually very frustrating.
     
    KingKRoecks and kdchabuk like this.
  9. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    I have created a ticket regarding this issue #1656575
     
  10. KingKRoecks

    KingKRoecks

    Joined:
    Jul 28, 2013
    Posts:
    155
    I've run into this as well. Have you had any luck?
     
  11. kdchabuk

    kdchabuk

    Joined:
    Feb 7, 2019
    Posts:
    52
    I did too. It seems that the CCD Management SDK in the editor does not support buckets with size over
    Int32.MaxValue
    bytes (
    2147483647
    bytes). This limitation is not documented, as far as I can tell.
     
  12. KingKRoecks

    KingKRoecks

    Joined:
    Jul 28, 2013
    Posts:
    155
    I mean, I'm only at 256 mb.

    That many bytes would be 2gb+.
    Bits, on the other hand, is right around 268 mb, which is close to my addressable report size.
    upload_2023-11-20_18-43-48.png .
     
    kdchabuk likes this.
  13. KingKRoecks

    KingKRoecks

    Joined:
    Jul 28, 2013
    Posts:
    155
    I just emptied my bucket and was able to upload again. So maybe it's taking the entire bucket size into account including older artifacts?
     
  14. Luchianno

    Luchianno

    Joined:
    Nov 22, 2013
    Posts:
    9
    I've got similar problem as well - is there any solution?
     
  15. immersia_dataviz

    immersia_dataviz

    Joined:
    Mar 8, 2019
    Posts:
    8
    same problem, Build to CCD -> "update previous build" doesn't work
     
  16. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    We've run into this error, as well. Apparently, once you have uploaded > 2gb of stuff to a bucket, even if not in a current "release", you start getting this error. I can't see any way to delete a release. So do we have to manually manage obsolete data and delete it to get back under the limit?
     
  17. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    Hilariously, once you hit this limit, you can't even use the CCD SDK to try to delete old entries, either - you get this error immediately any time you try to interact with the bucket in any way from the SDK. So you must never, even temporarily, exceed this limit or are you are stuck (at least from an SDK perspective - and manually cleaning it up with the dashboard is preposterously difficult).
     
  18. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    (Also, 2GB is not very much, especially when you consider supporting live releases of a game where players have not yet necessarily updated to your most recent version).
     
  19. Luchianno

    Luchianno

    Joined:
    Nov 22, 2013
    Posts:
    9
    Claytonious likes this.
  20. mustafayilmazcakici

    mustafayilmazcakici

    Joined:
    Sep 13, 2023
    Posts:
    5
    This is annoying AF, everytime i need to refresh the buckets, I upgrade addressables and CCDManagement (from changing the version number from manifest.json and packages.lock), refresh the buckets and downgrade CCDManagement and Adressables again.
     
  21. Luchianno

    Luchianno

    Joined:
    Nov 22, 2013
    Posts:
    9
    I'd like to note that recent 1.21.20 version (2024-02-08) of Addressables finally patched CCDManagement compatibility with 3.0.0 version. However, I'm still sticking to CLI tools for now.
     
    kdchabuk likes this.