Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Addressables 1.3.3 Unknown error in AsyncOperation

Discussion in 'Addressables' started by iamarugin, Nov 1, 2019.

  1. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    202
    I am using Unity 2019.3b8 I've updated to Addressables 1.3.3, cleared build cache, rebuilt all assets. But every time I'm trying to run the game with Addressables in packed mode, I get exceptions in the console:

    Code (CSharp):
    1.  
    2. Exception encountered in operation Resource<Object>(catalog_2019.11.01.10.36.25.hash): Unknown error in AsyncOperation
    3. UnityEngine.AddressableAssets.Addressables:LoadAssetAsync(Object)
    4. Services.<LoadAssetAsync>d__2`1:MoveNext() (at Assets/Scripts/Services/AddresableHelper.cs:32)
    5. System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<LoadAssetAsync>d__2`1&)
    6. Services.AddresableHelper:LoadAssetAsync(String)
    7. Services.<Preload>d__9:MoveNext() (at Assets/Scripts/Services/cache/MusicCache.cs:16)
    8. System.Runtime.CompilerServices.AsyncVoidMethodBuilder:Start(<Preload>d__9&)
    9. Services.MusicCache:Preload(DataStore)
    10. Services.CacheStore:Preload(DataStore) (at Assets/Scripts/Services/cache/CacheStore.cs:48)
    11. Controller.Application:Awaken() (at Assets/Scripts/Controller/Application.cs:55)
    12. Controller.ApplicationUninit:Awake(Action) (at Assets/Scripts/Controller/State/ApplicationUninit.cs:10)
    13. Controller.Application:Awake() (at Assets/Scripts/Controller/Application.cs:44)
    14.  
    Code (CSharp):
    1.  
    2. Exception encountered in operation Resource<Object>(catalog_2019.11.01.10.36.25.hash): Unknown error in AsyncOperation
    3. UnityEngine.AsyncOperation:InvokeCompletionEvent()
    Code (CSharp):
    1.  
    2. Exception encountered in operation Dependencies: Unknown error in AsyncOperation
    3. UnityEngine.ResourceManagement.AsyncOperations.GroupOperation:OnOperationCompleted(AsyncOperationHandle)
    4. DelegateList`1:Invoke(AsyncOperationHandle) (at Library/PackageCache/com.unity.addressables@1.3.3/Runtime/ResourceManager/Util/DelegateList.cs:69)
    5. UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    6. MonoBehaviourCallbackHooks:Update() (at Library/PackageCache/com.unity.addressables@1.3.3/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs:19)
    7.  
    The only thing I am doing, is just loading asset with the simple helper function

    Code (CSharp):
    1. public static async Task<T> LoadAssetAsync<T>(string name) where T : Object {
    2.   AsyncOperationHandle<T> handle = Addressables.LoadAssetAsync<T>(name);
    3.  
    4.   await handle.Task;
    5.  
    6.   T result = null;
    7.  
    8.   if (handle.Status == AsyncOperationStatus.Succeeded) {
    9.     result = handle.Result;
    10.   } else {
    11.     Helpers.Error($"Can not load asset with name {name}, status {handle.Status}");
    12.   }
    13.  
    14.   return result;
    15. }
    I saw no breaking changes in the changelog. So, do you have any directions?
     
    Last edited: Nov 1, 2019
  2. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    202
    Here is group setting:
     
  3. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    202
    Also I see a warning in the console: Library\PackageCache\com.unity.addressables@1.3.3\Runtime\ResourceLocators\ContentCatalogData.cs(84,16): warning CS0649: Field 'ContentCatalogData.m_LocatorId' is never assigned to, and will always have its default value null
     
  4. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    202
    Ok, I turned "Build remote catalog" (I don't need it anyway) and everything is working now. But I think you need better error message for this case.
     
  5. DavidUnity3d

    DavidUnity3d

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    81
    Hey @iamarugin just a couple questions:

    1) when you had build remote catalog turned on would the web request been able to reach your remote build locations endpoint? Assuming you're using the Addressables Hosting service, had a service been added, was enabled, and the remote build and load paths pointed to the correct places?

    2) You said you saw this after cleaning your build cache, rebuilding and starting the game? Assuming everything I asked about in 1) is setup and enabled were you seeing this every time you stopped and started playmode or just the first time after clearing your build cache and rebuilding.

    I ask this because I just came across and fixed a bug that sounds very similar to what you're describing but I'd like to make sure it's not a different issue before I say one way or the other if I think it's fixed (in the next release).
     
  6. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    202
    1. The remote catalog settings were carried from the previous version from Addressables (may be I turned it on by mistake in v0.5 or so). I don't need remote catalog, so I didn't do anything to make it work.
    2. Issue reproduced every time I hit the play.
     
  7. jiahongzeng

    jiahongzeng

    Joined:
    Jul 24, 2019
    Posts:
    16
    Hi

    I have the same error too.
     
  8. DavidUnity3d

    DavidUnity3d

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    81
    Hey @iamarugin and @jiahongzeng I have some good news. After looking into the issue it does appear that I have already implemented a fix for your issue. Also good news is we've decided to add it, along with a few others, into a hotfix patch that we'll be releasing for 1.3. I can't give an exact time the patch will go out but it shouldn't be too long.
     
  9. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    202
    This is a great news, thanks!
     
  10. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    236
    I have the same issue. Or at least I think cause the message is barely the same even if it's not on an asset loading.
    Glad to hear there is already a fix on the way.
     
  11. kemoko

    kemoko

    Joined:
    Sep 5, 2019
    Posts:
    1
    Hi. I have the same issue. When I run the game in unity editor everything is correct but when I run a standalone build executable I have the error. Is there a setting to set before building a standalone application?

    Thanks