Search Unity

Addressables 1.1.9 keeps losing assets!

Discussion in 'Addressables' started by CDF, Aug 24, 2019.

  1. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    So updated to 1.1.9 today, and randomly Addressables keep going missing.
    Can't pinpoint why this is happening. But whenever it does, I need to close and re-open Unity.
    When it does happen, I can't clean or build player content. Nothing happens.

    missingAddressables.png

    Enter play mode:

    addressableErrors.png

    Code (CSharp):
    1. Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[UnityEngine.GameObject], result='', status='Failed': Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=b2a8a8a8a65113b4585433020eac0723
    2. UnityEngine.AddressableAssets.AssetReference:InstantiateAsync(Transform, Boolean)
     
  2. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    I second this critical bug - relaunch unity editor will mark all paths as *missing file*. So the [build player content] will do nothing.

    unity 2019.1.8f1
    addressables 1.1.9

    @unity_bill
     
    Last edited: Aug 24, 2019
  3. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    This is happening to me to, starting with 1.1.9. Reverted to 1.1.7, and it's no longer happening.

    In my case, if I restart the editor, it seems to work for a bit. But after entering play mode once or twice, every asset will have a path of "Missing File", despite the actual assets being where they've always been. I'm not sure what other information I can provide. For now, I'm back to 1.1.7.
     
    TextusGames likes this.
  5. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    350
    Same. I also experience this.
    Unity 2018.4.6f1
    Addressables 1.1.9

    Reverting to Addressables 1.1.7 restored the files with no apparent issue.

    Am not using cloud build. All builds are local.
     
  6. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    429
    Omg.
    Same errors. (1.1.9) 2019.2.2f
    upload_2019-8-25_23-27-29.png

    I am starting to lose faith in the addressables......
     
    Last edited: Aug 25, 2019
    RecursiveFrog likes this.
  7. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    429
    I did not even have "missing reference" words in addressables window, only absence of icons. It happened for only one whole group but not for every group.
     
  8. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Yeah, 1.1.9 fixed a dependency issue for me but introduced like 5 more
     
  9. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Seems to happen mostly when adding new addressables into the system.
    The old addressables become missing. I'll try and get a repo bug report soon
     
    Favo-Yang likes this.
  10. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    So, when you first launch Unity, the paths are there, then you take some action, and they go away? Or when you launch Unity they are gone?

    This is definitely something we want to work out asap.
     
  11. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Yes, when I launch Unity they are there.
    It seems whenever new addressable prefabs or changes to existing addressable prefabs are made, the system is unable to find any other addressable assets. The only way to recover from this is to close and re-open Unity.

    It's already happened 3 times for me today, will try and submit a bug report later.
     
    unity_bill likes this.
  12. LeonardoADS

    LeonardoADS

    Joined:
    Aug 10, 2014
    Posts:
    10
    Same here, but in my case not was at the same time when I updated addressables to 1.1.9, I was working like two days without problem with 1.1.9, and today all the paths are lost.
     

    Attached Files:

  13. zvinless

    zvinless

    Joined:
    Oct 6, 2014
    Posts:
    18
    Same issue with Unity 2018.4.5f1
     
  14. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Still trying to reproduce this. Seems that it doesn't happen when the addressables window is open.
     
  15. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Well, we have been unable to repro this, but looking at the code diff, I'm 83% sure I've found the issue. Since we can't actually verify the fix, I'm hoping someone on this thread can. I've attached a zip that is identical to version 1.1.9 except for a small change that hopefully fixes this.

    Those that have run into this, please unzip this in your Packages directory and see if the issue goes away.
     

    Attached Files:

    hayashi_bxj and TextusGames like this.
  16. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Wish I saw this post earlier before deleting and rebuilding all my addressables and then having issue just pop back up again.

    Anyway, after downloading the updated version you just posted it appears to have solved my issue. Going to be doing a few more hours work on this project today so will try to confirm.
     
  17. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
  18. tarahugger

    tarahugger

    Joined:
    Jul 18, 2014
    Posts:
    129
    This bug has hosed off my entire setup multiple times now.
    • Once after attaching VS debugger and then hitting play.
    • Once when I was playing around with installing and removing various packages.

    • And just now the first run after rebooting from a computer blue screen. I added a new addressable, added a new group, dragged an asset into the group (all the Path references still showed up in the UI at this point). After hitting PLAY it seemed to compile a bunch of shaders or something with a progress bar (running in Virtual mode). Once it started playing, all the references in the UI now showed "Missing File".
     
  19. JL_Tech_BBW

    JL_Tech_BBW

    Joined:
    Jun 22, 2017
    Posts:
    32
    On my side switching from 1.1.7 to 1.1.9 lose all the references to the groups and assets.
    Event the default Built In Data group.

    Edit : I was able to recover the Built In Data group by changing EditorGUI.DisabledScope(true) to false on the line 139 of the following file AddressableAssetSettingsInspector. And add the group to the list again.
     
  20. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks for testing it. We'll get a patch fix out soon.
     
  21. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Yes the patch seems to be working for me as well.
    Just curious what the issue was?
     
  22. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Basically our code was this:
    Code (CSharp):
    1. string cachedPath;
    2. public AssetPath
    3. {
    4. get
    5. {
    6.   if(cachedPath == null)
    7.   { cachedPath = SomeLogicBasedOnGUID... }
    8. }
    9. }
    The issue is that there is apparently some temporary state you can somehow get in where the GUID is invalid for a very short amount of time. While it was invalid, it was setting the cachedPath to "". So our check for null was always false, and it was stuck as "" forever. Changing
    cachedPath == null
    to
    string.IsNullOrEmpty(cachedPath)
    was the meat of the fix (there's some other small cleanup in there, but that fix is the main part).
     
  23. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Ah nice. Well, thanks for for the prompt fix, looking forward to next update
     
    JesOb and TextusGames like this.
  24. Glaswyll

    Glaswyll

    Joined:
    Feb 13, 2014
    Posts:
    103
    Addressables 1.1.10 released a short while ago. It fixed the issue I was having with Cloud Build.
     
    JesOb and Favo-Yang like this.