Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Addressables - initialization failed problem with google storage and aws s3

Discussion in 'Addressables' started by CaptainSoap, Sep 25, 2019.

  1. CaptainSoap

    CaptainSoap

    Joined:
    May 14, 2015
    Posts:
    2
    This is very strange problem.When I use xampp for remote build and load, it's everything ok, no any warning and error on console, but I upload files to storage the console show these warning and errors:

    Addressables - initialization failed.
    UnityEngine.AddressableAssets.Initialization.<>c__DisplayClass14_0:<LoadContentCatalogInternal>b__0(AsyncOperationHandle`1)
    DelegateList`1:Invoke(AsyncOperationHandle`1) (at Library/PackageCache/com.unity.addressables@1.2.4/Runtime/ResourceManager/Util/DelegateList.cs:69)
    UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    MonoBehaviourCallbackHooks:Update() (at Library/PackageCache/com.unity.addressables@1.2.4/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs:19)

    Exception encountered in operation UnityEngine.AddressableAssets.Initialization.InitializationOperation, result='', status='Failed' - Chain<CreatureStatusScriptableObject,IResourceLocator>: ChainOperation of Type: CreatureStatusScriptableObject failed because dependent operation failed
    Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=10e36542c8eb2f54789effdec6e2a093
    UnityEngine.ResourceManagement.ChainOperation`2:OnWrappedCompleted(AsyncOperationHandle`1)
    DelegateList`1:Invoke(AsyncOperationHandle`1) (at Library/PackageCache/com.unity.addressables@1.2.4/Runtime/ResourceManager/Util/DelegateList.cs:69)
    UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    MonoBehaviourCallbackHooks:Update() (at Library/PackageCache/com.unity.addressables@1.2.4/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs:19)


    Here is my addressable setting:

    1569374369498.jpg

    1569377445664.jpg

    Here is how I get asset:

    Code (CSharp):
    1. public AssetReference creatureStatus_SO;
    2.     public Text text;
    3.  
    4.     private void Start()
    5.     {
    6.         Addressables.LoadAssetAsync<CreatureStatusScriptableObject>(creatureStatus_SO).Completed += OnLoadComplete;
    7.     }
    8.  
    9.     private void OnLoadComplete(AsyncOperationHandle<CreatureStatusScriptableObject> obj)
    10.     {
    11.         text.text = obj.Result.power.ToString();
    12.     }
     
  2. CaptainSoap

    CaptainSoap

    Joined:
    May 14, 2015
    Posts:
    2
    Update

    AWS E3 work correctly,but google storage still cannot work
     
  3. KrikeyAdmin

    KrikeyAdmin

    Joined:
    Feb 5, 2018
    Posts:
    29
    I'm experiencing the same issue specifically with Google Storage. If I host on AWS, it works fine.

    For me specifically, it fails when I try to load the Addressables from the Google Storage CDN URL, it seems to work fine when loading directly from the vanilla Google Storage URL. Obviously though, we want to be able to use the CDN...
     
  4. jscottartrix

    jscottartrix

    Joined:
    Dec 15, 2017
    Posts:
    2