Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Editor unable to fetch CCD data

Discussion in 'Unity Cloud Content Delivery' started by Alex_Bo, Mar 18, 2023.

  1. Alex_Bo

    Alex_Bo

    Joined:
    Sep 18, 2014
    Posts:
    19
    Hi!

    I use Unity 2021.3.20 with Addressables 1.21.8 and CCD Management 2.2.2

    When I try to setup CCD management the editor and select the environment for Remote profile variable I get the following error.

    Please help. It used to work before I upgraded Unity version.

    ====
    JsonReaderException: JSON integer 3932854049 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 875.
    Newtonsoft.Json.JsonTextReader.ParseReadNumber (Newtonsoft.Json.ReadType readType, System.Char firstChar, System.Int32 initialPosition) (at /root/repo/Src/Newtonsoft.Json/JsonTextReader.cs:2059)
    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:2230)
    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:1968)
    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:2318)
    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:2241)
    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:1968)
    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:2318)
    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:1712)
    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 3932854049 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 875.
    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 3932854049 is too large or small for an Int32. Path '[0].last_release.content_size', line 1, position 875.
    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.8/Editor/Settings/ProfileDataSourceSettings.cs:357)
    UnityEditor.AddressableAssets.Settings.ProfileDataSourceSettings.UpdateCCDDataSourcesAsync (System.String projectId, System.Boolean showInfoLog) (at Library/PackageCache/com.unity.addressables@1.21.8/Editor/Settings/ProfileDataSourceSettings.cs:318)
    UnityEditor.AddressableAssets.GUI.ProfileDataSourceDropdownWindow.DrawCcdEnabledDropdownHeader (UnityEngine.Rect window, UnityEngine.Rect horizontalBarRect, UnityEngine.Rect backButtonRect, UnityEngine.Rect refreshButtonRect, UnityEngine.Event evt, System.String title, UnityEditor.AddressableAssets.GUI.ProfileDataSourceDropdownWindow+DropdownState dropdownState, UnityEditor.AddressableAssets.GUI.ProfileDataSourceDropdownWindow+CCDDropdownState prevState) (at Library/PackageCache/com.unity.addressables@1.21.8/Editor/GUI/ProfileDataSourceDropdownWindow.cs:417)
    UnityEditor.AddressableAssets.GUI.ProfileDataSourceDropdownWindow.OnGUI (UnityEngine.Rect window) (at Library/PackageCache/com.unity.addressables@1.21.8/Editor/GUI/ProfileDataSourceDropdownWindow.cs:267)
    System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <88e4733ac7bc4ae1b496735e6b83bbd3>:0)
    UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <e8a406da998549af9a2680936c7da25a>:0)
    UnityEngine.UnitySynchronizationContext.Exec () (at <e8a406da998549af9a2680936c7da25a>:0)
    UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <e8a406da998549af9a2680936c7da25a>:0)

    ====
     
  2. SebT_Unity

    SebT_Unity

    Unity Technologies

    Joined:
    Jun 21, 2021
    Posts:
    283
    Hi Alex,
    Thanks for reporting this.
    Did you upgrade from a specific version of the addressables package and ccd management packages?
    What Unity version were you using previously?
     
  3. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    Yeah, im still getting this issue, i started a fresh bucket, one for each OS release (Android, iOS) but once i "Build to CCD" i get the same error once its finished, and now i can no longer use it. I have over 400 files as addressables. We are basically building a "Sing It!" app for mobile. Theres over 30 albums each containing 7-15 tracks, each track is an addressable, but each track also contains 2 mp3s (backing track and vocal track). Why does it need to pull each file back in the json? Why cant it simply just return the buckets and environment. As in the CCD UI, there is no where that displays the informaiton, so i dont quite understand why its there.
     
  4. markmozza

    markmozza

    Joined:
    Oct 16, 2015
    Posts:
    86
    The issue is simple, any buckets over 2GB will get this as "content_size" is an integer and stored in bytes. 2GB in bytes exceeds the MAX integer value. Which is kind of crazy as i know most people surly have over 2GB in DLC. Either changing the variable to a LONG, or use Mb and not Bytes.

    Give me source code access ill fix myself today
     
    wbourchier and sampenguin like this.