Search Issue Tracker

By Design

Votes

0

Found in [Package]

1.18.11

Issue ID

ADDR-2077

Regression

No

[Addressables] Corrupted local cached files are not detected prior loading

Package: Build Pipeline - Addressables

-

How to reproduce:
1. Open the user's attached project and Scenes/Menu scene
2. In the Addressables Groups window, select Menu
3. Set Build Path to LocalBuildPath and LoadPath to LocalLoadPath (make sure that Addressables Hosting is enabled)
4. In the Addressables Groups window select Build/New Build/Default Build Script
5. Select File/Build settings and enable Development Build and Build the Player
6. Select Menu again and set Build Path to RemoteBuildPath and LoadPath to RemoteLoadPath
7. In the Addressables Groups window select Build/New Build/Default Build Script
8. Run the Player and press Check for Catalog Update and Check for new Content (it downloads new content)
9. Close the Player
10. In the File Explorer, navigate to C:\\Users\\%UserName%\\AppData\\LocalLow\\Unity\\DefaultCompany_AddressablesCacheIntegrity and open the "_data" file in a HexEditor
11. Change the file to simulate corruption and save it
12. Run the Player and press Check for Catalog Update, Check for new Content, and Load
13. Observe the Development Console

Expected result: Addressables detects that cached content is corrupted when selecting Check for new Content
Actual result: "No content update available" is logged when selecting Check for new Content (meaning that corrupted cached content hasn't been detected) and an error appears once selecting Load

Reproducible with: 1.16.19 - 1.18.11 (2019.4.29f1, 2020.3.14f1, 2021.1.14f1, 2021.2.0b3, 2022.1.0a1)
Could not test with: 2018.4 (could not downgrade)

Notes:
1. Addressables successfully detects when cached content data is deleted prior loading
2. Error that appears when loading corrupted content:
"Error while downloading Asset Bundle: CRC Mismatch. Provided dce2b91e, calculated 0 from data. Will not load AssetBundle 'http://localhost:8080/StandaloneWindows64/menu_scenes_all_4b4e906f38f1994a9a4f9b734fd51f31.bundle'
Curl error 23: Failed writing body (0 \!= 15285)"

  1. Resolution Note:

    To check the local cached bundles for corruption. Enable Cached CRC checking in
    Group->BundledAssetGroupSchema->Advanced/Use Crc For Cached Asset Bundles
    in 1.19+ it is a drop down, located at: Group->BundledAssetGroupSchema->Advance/AssetBundle CRC.

    When attempting to load and there is a CRC mismatch, it will redownload the bundle and try again.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.