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. Dismiss Notice

Bug WaitForCompletion hangs on error v1.17.17

Discussion in 'Addressables' started by Shawn-Halwes, Apr 30, 2021.

  1. Shawn-Halwes

    Shawn-Halwes

    Joined:
    Jul 17, 2013
    Posts:
    51
    I'm trying to use WaitForCompletion API and an error is logged but the method hangs and does not return. I would expect this method to return null and throw an exception if an error occurs before the process completes.

    The error I get is:
    Unable to read header from archive file: Library/com.unity.addressables/aa/Windows/StandaloneWindows64/persistent_assets_prefabiddata.bundle
    (Filename: C:\buildslave\unity\build\Runtime/VirtualFileSystem/ArchiveFileSystem/ArchiveStorageReader.cpp Line: 74)

    The error does not occur when running with Play Mode Script set to "Simulate Groups..." it only occurs when Play Mode Script is set to "Use Existing Build...".

    I have made a new build of asset bundles so that should not be an issue.

    Any suggestions?
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,795
    I'll flag for the team to have a look!
     
  3. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    736
    Hey @Shawn-Halwes sorry you're running into that. It sounds like a bug on our end. We haven't seen anything on our end that I'm aware of so would you mind filing a bug? Also since you got the cpp file in the error log I assume you/your team are using your own custom build of the Editor, is that right? If so that could make it more difficult to track down. But, either way, if you don't mind filing a bug we'll take a look and see what we can do
     
  4. Shawn-Halwes

    Shawn-Halwes

    Joined:
    Jul 17, 2013
    Posts:
    51
    @davidla_unity We are not using a custom build of the editor. We are on v2019.4.24f1 and v1.17.17 of addressables package via the Package Manager.

    The issue went away after rebuilding the bundles a couple more times with no other changes and no errors reported when building the bundles. Which is disconcerting since building bundles takes hours to complete.

    I'll write a bug if I can get a smaller repro project together.
     
  5. Aa22041100

    Aa22041100

    Joined:
    Oct 22, 2015
    Posts:
    7
    I am having a similar situation.

    Currently, I build my addressable bundle with Unity 2020.1.10f1 and Addressable 1.8.5.
    and use it on another project with Unity 2019.4.4f1 and Addressable 1.8.5.

    Here is my flow:
    1. Load the remote JSON file from the server by calling LoadContentCatalogAsync (succeed)
    2. Call LoadAssetAsync() (failed)

    And the error message is "unable to read header from archive file".

    I am wondering can I use the addressable that build with another Unity version even the addressable version is the same.