Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Feedback [1.5.0] Sprites failed to load with LoadAssetAsync

Discussion in 'Addressables' started by iamarugin, Dec 22, 2019.

  1. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    863
    Unity 2019.3f3
    Today I tried to update Addressables from 1.3.8 to 1.5.0 and it seems like it can't load sprites anymore

    Code (CSharp):
    1.  
    2. Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[UnityEngine.Sprite], result='', status='Failed': Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=icons/engineer.png
    3. UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase`1:<.ctor>b__27_0(AsyncOperationHandle)
    4. DelegateList`1:Invoke(AsyncOperationHandle) (at Library/PackageCache/com.unity.addressables@1.5.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
    5. UnityEngine.AddressableAssets.Initialization.<>c__DisplayClass13_0:<LoadContentCatalogInternal>b__0(AsyncOperationHandle`1)
    6. DelegateList`1:Invoke(AsyncOperationHandle`1) (at Library/PackageCache/com.unity.addressables@1.5.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
    7. UnityEngine.ResourceManagement.ChainOperation`2:OnWrappedCompleted(AsyncOperationHandle`1)
    8. DelegateList`1:Invoke(AsyncOperationHandle`1) (at Library/PackageCache/com.unity.addressables@1.5.0/Runtime/ResourceManager/Util/DelegateList.cs:69)
    9. UnityEngine.ResourceManagement.ResourceManager:Update(Single)
    10. MonoBehaviourCallbackHooks:Update() (at Library/PackageCache/com.unity.addressables@1.5.0/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs:19)
    11.  
    As you can see, sprite is in group.



    Every update Addressables breaks, although there is usually no breaking changes in the Changelog. I love Addressables, but updates were always nightmare.
     
    Last edited: Dec 22, 2019
    zyc_dc and chanon81 like this.
  2. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    259
    @iamarugin InvalidKeyException.. same as in my case when loading TextAsset, posted here. Nobody replied yet, prob because of the holidays. But it does work in editor, how about yours? only when i make a build (windows/exe | android/apk), it fails to load my Addressable TextAsset-s.

    I made many tests, and it seems problem with the catalog/the keys (using IResourceLocators) are not there. Only in build ofc, in editor it (by default) doesnt use the built addressables content, only what you defined using addressable groups window - thats why in editor it works. When i put my addressable TextAsset into "Built In Data" group, it loads fine in build. Only fails when i put it inside custom group.

    Testing TextAsset loading inside 'Addressable Samples by Unity' which uses Addressables v1.1.3, TextAssets load correctly on build target, which is perfect! It does confirm our suspicion, that the new version of Addressables broke something! (or did it?) I do know that the Addressables Package UI was changed recently, no more can you "Build Player Content" you now have to "New Build/Default Build Script". Some people voiced their disagreement with that afaik, but i dont know if the build script itself was changed, thats causing these recent errors, or its some other issue. Its super simple to reproduce though. I hope someone from Unity can let us know soon! Like @unity_bill, Please!

    Happy holidays!

    EDIT: I now posted this in official thread also, so it gets more attention.
    EDIT2: I had some issues downgrading 1.5.0 ( i wanted to test older versions), so i decided to uninstall and install fresh 1.4.0, then 1.3.8 etc. What i have noticed is that my old Addressable settings stayed the same. Also the UI. Surely older Addressables versions cant be that backward compatible? So i decided to uninstall from package manager and make clean install of 1.3.8. To my surprise, after i removed, I could still open Addressables from Window/Asset Management! Surely that EditorWindow is part of Addressables plugin, which i just removed? EDIT: this menu was removed upon restart of Unity. So if you plan to downgrade, id recommend clean un/install and Editor restart. For me 1.3.8 is the last version without the bug (1.4.0 and 1.5.0 are bugged)
     
    Last edited: Dec 27, 2019
  3. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    513
    This needs to be submitted to the addressable team as a bug report through Unity's bug reporting system. Expecting them to find these forum posts is unlikely. I know that the addressable team has been kind by finding issues in the forums a lot, but a bug report is the real way we can get them to fix issues. I hate that we need to spend our time making these reports. I've spent days of company time submitting bugs to Unity, but it's the only way to get the dev team to realize the case that you're encountering.
     
  4. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    259
    I agree with you, and also as you said 'spending company's time' - rarely i have time to create a repo test project also. Considering this is a glaring bug, its gonna be found with high probability soon anyway. That coupled with the fact, that you can easily just use 1.3.8 as 1.5.0 doesn't change the base much, i'll just wait a bit longer. This post was also posted in the official thread, which is being frequented by unity folks more often. Anyways, after holidays, if its not reported, im gonna report it. Cheers
     
  5. zyc_dc

    zyc_dc

    Joined:
    May 11, 2018
    Posts:
    42
    Got the same issue with sprites.
     
  6. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    259
    use 1.3.8 or report the bug. i didn't report yet.
     
  7. matt_unity455

    matt_unity455

    Joined:
    Sep 25, 2019
    Posts:
    6
    Having the same issue - although it doesn't work in Editor. Works fine in build for me.

    The issue was introduced in 1.4.0. We were previously on 1.3.8 and recently upgraded to 1.5.0 - but after testing, it seems that it was created in 1.4.

    Any updates on this? It's not currently a massive issue for us but would like to get resolved soon.
     
  8. cg-adam

    cg-adam

    Joined:
    Jul 30, 2019
    Posts:
    44
    Any updates on this? Very frustrating issue, would love to know how to fix this. Rebuild of all groups maybe?
     
  9. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    259
    Yes it started @ 1.4, i mentioned this a week ago in the official thread. That's not enough. If you want this fixed, report a bug using Unity's Bug reporting feature. They also usually ignore reports without repo attached, so you'll need to make one (Just heads up). As many pointed out before, don't expect devs to scour the forum threads (like this one) for 'mentions of bugs', these are mostly completely missed or ignored, as forums are not a streamlined system for bug reports. There is a special case for preview-features and their threads where devs specifically ask you to mention bugs in the thread (and usually after you do that, they want you to report normally anyways).
     
    Last edited: Jan 7, 2020
  10. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    863
    I will open the case if it is not a known issue. @DavidUnity3d please advise.
     
    hololabs and davidla_unity like this.
  11. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    @iamarugin it does sound like an issue with sprites we are aware of. That said, go ahead and file a bug if you don't mind. If it ends up being a duplicate we can handle that on our end. I'd hate for this to get looked over because we fix a similar, but not exactly the same, bug.
     
    hololabs likes this.
  12. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    863
    davidla_unity and matt_unity455 like this.
  13. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    259
    TextAsset as well, as i mentioned in #2.
     
  14. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Awesome, thanks very much. We'll get that checked into
     
    _watcher_ likes this.
  15. matt_unity455

    matt_unity455

    Joined:
    Sep 25, 2019
    Posts:
    6
    Any news on this? 1.6 has been released and we are still dealing with this issue and it's making it extremely difficult to develop.
     
    zyc_dc likes this.
  16. mateuszjaworski

    mateuszjaworski

    Joined:
    Aug 8, 2019
    Posts:
    12
    Same problems on my end. I cannot load SpriteAtlases even though I could do it easily in previous versions.
     
  17. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    We've got a ticket on our end to look into it. I've made it a high priority so we can hopefully get to this and figure out what's going on soon. As per usual I can't make any promises as to the "when" but I figure some update is better than silence.
     
  18. cg-adam

    cg-adam

    Joined:
    Jul 30, 2019
    Posts:
    44
    Very frustrating bug, not sure how this slipped into a release. Makes it incredibly hard to test and one of our developers had to re-write some of our systems to get this working on editor and builds properly for testing. Please get a hot fix out for this asap.
     
  19. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    863
    Hi, any update on this issue? I really want to update to latest Addressables, but can't because of this.
     
  20. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    863
    Reproduced with 1.7.4
     
  21. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hey I just got confirmation by the dev that worked on this, that issue should be resolved in our next release (1.8.something).
     
    iamarugin likes this.
  22. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    863
    Thanks!
     
    davidla_unity likes this.
  23. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    513
    As a user this is a prime candidate of why I'm frustrated with the quality of this "production-ready" package. A bug that has no workaround, that prevents an entire class of asset loading was not fixed for three months should be an embarrassment.

    I stupidly already upgraded and committed our project with 1.7.5 not realizing that this was still a problem. I recognize that dates are fluid, but please give us a general timeline in regards to 1.8 (days, weeks, months away)? I need to know so I can try to downgrade back to 1.3.8 or if we can stick it out until what I'm hoping is a stable 1.8 release.
     
  24. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
  25. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    513
    I upgraded to 1.8.3, and I'm on 2019.3.1 and I'm still having the same problem. The changelog seems to indicate a lot of work was done to sprites/subassets. For me AssetReferenceSprite is still failing with InvalidKeyException. Did the fix for this get integrated into the 1.8.3 release? Is there any way to load sprites from addressables?

    EDIT: I needed to delete the old group and recreate the group from scratch. After doing that the sprites appear to be loading from Addressables again. Just an FYI if other's are still having problems.
     
    Last edited: Apr 21, 2020
  26. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    513
    I thought this was working in 1.8.3 and it is working for standalone sprites in an addressable group. However, I've been going through and starting to put some of the sprites into SpriteAtlas assets (not the packing tag) and noticed that Addressables doesn't load sprites with AssetReferenceSprite or AssetReferenceAtlasedSprite. I have submitted bug# 1244888 for further investigation and fixing.

    Also I'd LOVE it if these AssetReferences PropertyDrawers would support multi-object editing. It seems that they do but it only updates one of the objects (bug# 1244895). Thanks!
     
    Last edited: May 6, 2020
  27. zbyhoo

    zbyhoo

    Joined:
    Nov 18, 2013
    Posts:
    17
    Is it working in 1.8.3? I'm trying to integrate it on Android and iOS, but I'm unable to do it.

    In the editor, assets are loaded correctly, but when using remote assets on our custom server it fails to load with with "unknown error" message. When I switch to assets to be inside the build, everything works fine, but of course it's not a solution for a production build.

    Edit:
    I'm not using AssetReference, just a simple address name.