Search Unity

CRC Mismatch

Discussion in 'Addressables' started by Wawro01, Jul 25, 2019.

  1. Wawro01

    Wawro01

    Joined:
    Apr 23, 2014
    Posts:
    44
    Hey how to deal with this? I have android build, that was built with Unity 2018.4.3f1 and installed on device. Then I upgraded to 2018.4.4f1 rebuilt it and got this error when running on device. Obviously CRC of bundles changed and is different from cached ones, but hashes stayed the same.

    Code (CSharp):
    1. Error while downloading Asset Bundle: CRC Mismatch. Provided 80fa3744, calculated 6f98367 from data. Will not load AssetBundle
    2.  'jar:file:///storage/emulated/0/Android/obb/com.company.product/main.230067.com.company.product.obb!/assets/aa/Android/Android/assets-gui_assets_all_b5609a652ee5a44e2175258937fa7653.bundle'
    Is this the case? https://forum.unity.com/threads/bug-retry-load-with-failed-crc.693751/

    Thanks
     
    Last edited: Jul 25, 2019
  2. Wawro01

    Wawro01

    Joined:
    Apr 23, 2014
    Posts:
    44
    Bump, is this a bug? Or is there a way to detect this and redownload?
     
  3. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    this feels like a bug, and yes, it does seem to be the same thing as the linked post. We'll look into it
     
  4. OmnifunGames

    OmnifunGames

    Joined:
    Feb 28, 2017
    Posts:
    1
    I have same error when upgrading from 2019.2.7 to 2019.2.8 (before upgrade was working fine):

    Error Unity Error while downloading Asset Bundle: CRC Mismatch. Provided 5e94fde7, calculated 7be4dddd from data. Will not load AssetBundle 'jar:file:
    Error Unity: Exception encountered in operation Resource<IAssetBundleResource>(defaultlocalgroup_unitybuiltinshaders_42d35f3191ce5f155b13754293d36a91.bundle): RemoteAssetBundleProvider unable to load from url jar:file:.bundle, result='Request aborted'.
    Error Unity: Exception encountered in operation Dependencies: RemoteAssetBundleProvider unable to load from url jar:file:/result='Request aborted'.

    Edit:
    I Uninstalled manually app from android device and then build & run from unity again (cleared and rebuilded addresables content) and now i dont see crc error anymore.
    Looks like some caching problem after upgrading from older version of unity. Dont know if its related to addresables or not but im using 1.1.4 right now.
     
    Last edited: Oct 11, 2019
  5. Fingerbob

    Fingerbob

    Joined:
    Sep 6, 2014
    Posts:
    24
    I just saw the same issue. Moving from Unity 2019.3.0f6 to 2019.3.3f1. I have a selection of addressable files (all binary) which are present in 6 groups with 3 files in each addressable group.
    I saw the CRC mismatch error. Cleaning and rebuilding my data did not resolve the issue. full uninstall on device, cleaning and rebuilding data did not resolve the issue.
    The only way I've managed to fix it is to rename the group containing the three files related to the bundle that is causing the CRC error, then a clean / rebuild / build to device generates a working build.

    Given it's now working, I'll hopefully leave it there, if you want me to repro and bug it then I probably can.
     
  6. alicht

    alicht

    Joined:
    Jan 22, 2019
    Posts:
    6
    We had a similar experience, updating from Unity 2019.3.0f6 to 2019.3.4f1. The app could recover though after retrying to load the addressable. @unity_bill Do you have more information about this?
     
  7. JonathanBartel

    JonathanBartel

    Joined:
    Jun 24, 2019
    Posts:
    47
    Might be a coincidence, but I never received this error until this week and now I receive it A LOT. Also updated to Addressables 1.8.2 earlier this week. Like I said, might be a coincidence.

    Anyone else?
     
    aka3eka likes this.
  8. ctapp1

    ctapp1

    Joined:
    Jan 11, 2016
    Posts:
    9
    Yes using 1.8.2 and 2019.2.15 as well and its happening a lot (was getting it with 1.7.5 as well). I found it happens for me when I switch from streaming assets to remote cdn paths or vice versa. I am doing a lot of testing and rebuilding bundles regularly so it’s a huge pain. The only way I found how to fix is to create a new group name that I haven’t used before.

    Is this something we can get fixed soon @unity_bill ?
     
  9. mgyanm

    mgyanm

    Joined:
    Jul 6, 2012
    Posts:
    9
    +1 for this bug to be fixed asap, our game is broken now after i update unity and update the addressable package. 2 folder will not be downloaded becaused of crc mismatch
     
    bennyb3bil likes this.
  10. ctapp1

    ctapp1

    Joined:
    Jan 11, 2016
    Posts:
    9
    Fix: I have been using Bundle Naming: 'Filename', switching to 'Append Hash to Filename' seemed to have fixed it for now but it could just be temporary. Seems like the issue has something to do with the naming of the bundles.
     
    andriilytvynenko and bennyb3bil like this.
  11. aka3eka

    aka3eka

    Joined:
    May 10, 2019
    Posts:
    32
    Same problem here with Unity 2019.3.13f1 and Addressables 1.8.3.
     
  12. bennyb3bil

    bennyb3bil

    Joined:
    Jul 15, 2018
    Posts:
    1
  13. androshchuk-vladyslav

    androshchuk-vladyslav

    Joined:
    Dec 13, 2015
    Posts:
    127
    Upgraded our Unity from 2019.3.2f1 to 2019.3.12f1. Got same thing on production. Android. Really need fix. The second time you enter the game - everything is okay.
     
    Last edited: May 23, 2020
    DavidZobrist likes this.
  14. PacoLabs

    PacoLabs

    Joined:
    Jun 29, 2017
    Posts:
    31
    From what I experienced, it seems that a possible workaround is to manually trigger another download if the first one failed.
    Another workaround is, in case of a Unity engine version change in a new build, to clear all the assets cache when the app starts.

    If some assets are on a server, then a new version of all the assets (built with the new unity) must be published on that server, in a different folder than the previous one.

    This is really annoying because it highly increase the disk space on the server, and it also causes a redowload of all the assets for users who already downloaded them.

    I've raised those issues in this thread:
    https://forum.unity.com/threads/how-to-upgrade-unity-without-breaking-addressable-bundles.846907/
    But I could not get someone form Unity to clarify how new engine versions are supposed to be handled in regards to Addressables.
     
    Last edited: Jun 8, 2020
    doneykoo and aka3eka like this.
  15. RiccardoAxed

    RiccardoAxed

    Joined:
    Aug 29, 2017
    Posts:
    119
    Same problem on 2019.4.0f1.
    Any news/fixes about that?
     
  16. hotrodfuel

    hotrodfuel

    Joined:
    May 8, 2020
    Posts:
    10
    I'm running into this same issue myself , happy I'm not alone, it's a major blocker to our pipeline for our gmae.
     
  17. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    154
    [Unity 2018.4.18; Addressables 1.10]

    I have this issue on some Android devices. The bundle in question is local (part of the obb). Restarting the game only temporarily fixes the issue, it can happen again at any time. For the moment it seems that it is not bound to a specific scene/bundle.

    Capture.JPG
     
  18. glitchers

    glitchers

    Joined:
    Apr 29, 2014
    Posts:
    64
    Have this issue in Unity 2019.4.5, Addressables 1.13.1.

    Upgraded recently from 2019.2.17. I'm using only local bundles.

    Trying now to disable CRC + CRC for Cached Bundles as it is currently only affecting 1 Group (Single scene inside)
     
  19. Patrick_PS

    Patrick_PS

    Joined:
    Sep 9, 2019
    Posts:
    154
    A temporary solution (I do not remember were I found it) is to try loading the scene/asset a second time if the first one fails. This "solved" the issue for me.
     
    glitchers likes this.
  20. Lukas-Labaj

    Lukas-Labaj

    Joined:
    Nov 22, 2012
    Posts:
    36
    Hi, using Unity version ([UnityEngine.Application.unityVersion]) as part of BuildPath and LoadPath solved the issue for us.
     
    ProtoTerminator likes this.
  21. AlfEspinosaN

    AlfEspinosaN

    Joined:
    Jan 14, 2019
    Posts:
    9
    This issue happens to me only on Android devices while using Addressables. On iOS it works nice, except for a very few rare occasions... Does anyone know why the Android platform might be causing this specific issue?
     
  22. AlfEspinosaN

    AlfEspinosaN

    Joined:
    Jan 14, 2019
    Posts:
    9
    You mean to write: [UnityEngine.Application.unityVersion] instead of [BuildTarget] at the end of our path? If we are using both Android and iOS, will it generate a problem?
     
  23. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    No, you write both.
    [BuildTarget]/[UnityEngine.Application.unityVersion]
    or
    [UnityEngine.Application.unityVersion]/[BuildTarget]
     
    Claytonious likes this.
  24. ickydime

    ickydime

    Joined:
    Nov 20, 2012
    Posts:
    110
    Hitting this in Unity 2019.4.9f1 and deploying to webgl.

    I did a clean on the asset build pipeline. I deleted everything on Azure's blob. Re-uploaded addressables there.
    Deleted everything on the ftp and re-uploaded a fresh build.

    I don't get any errors when I use Play Mode use existing build in the editor. But I do get the error in Webgl running in Chrome.

    Only 1 of our 4 bundles has the error.
     
  25. Sylker

    Sylker

    Joined:
    Sep 22, 2012
    Posts:
    22
    The problem is still there in Addressables 1.8.5, unfortunately :/

    Gonna try the "retry download" solution...

    Can you please, elaborate this? I am new to Addressables. Should I set up remote and addresses to <custom> to achieve this solution? Thanks.
     
  26. BenHymers

    BenHymers

    Joined:
    Dec 16, 2014
    Posts:
    30
    I've just found this happened in a test run on our CI machine - so it's happened once and I don't have a repro. We just use local bundles, no downloads.

    Reading this thread, it doesn't sound like anyone has logged a bug with Unity, so they won't be looking at this. Can someone with a solid repro log a bug and mention the bug number here?
     
  27. Shaunyowns

    Shaunyowns

    Joined:
    Nov 4, 2019
    Posts:
    328
    Yeah this would help us a ton! I'll let the team know about this also!
     
  28. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    @BenHymers so we have looked into some of the CRC mismatch issues that have arisen. If you're on an older version of Addressables try upgrading if you're still running into the problem.

    I'm also curious what platform you're building for on your CI. Is it WebGL or Android by chance? If it's not one of those I have no idea how you'd get CRC mismatches for local bundles.

    There is also the option on the Content Packing & Loading Schema to turn off CRC checking if that's something you think would help in the interim. It's under Advanced Options.
     
    AndyKun, asa989 and neoHDH like this.
  29. BenHymers

    BenHymers

    Joined:
    Dec 16, 2014
    Posts:
    30
    Thanks @Shaunyowns and @DavidUnity3d ! If we get a proper repro I'll be sure to log a bug, but for now it's just one of the many random failures we're trying to stamp out.

    We're on 1.15.1 of Addressables, so pretty recent.

    Platforms being built on CI are Windows Standalone, PS4, Xbox One, and Switch.

    If this becomes a more noisy problem we'll try disabling CRC checking - though will that just allow problems to manifest later on in the run?
     
  30. i_cassell

    i_cassell

    Joined:
    Apr 6, 2019
    Posts:
    21
    Unity 2020.1.2 ,addressable 1.16.1, build platform windows, same problem.
    But Android is OK.
    Is a bug or something?
     
  31. AlfEspinosaN

    AlfEspinosaN

    Joined:
    Jan 14, 2019
    Posts:
    9
    Yeah. At the remote and local build path you add that at the end of your address. Unfortunately, didn't work for me
     
  32. Apollo-Meijer

    Apollo-Meijer

    Joined:
    Mar 30, 2015
    Posts:
    31
    I think I have the same issue mentioned here and I'm just wondering if I'm using it wrong?
    I'm using addressable version 1.15.1
    Going from Unity 2019.4.10 to 2019.4.12
    Building for Android

    I'm loading one of the groups from the remote and it's marked as "Can Change Post Release" with Append Hash to Filename.

    When I build the bundles with unity version 2019.4.12, the bundles are different and it updated the version in the file.
    upload_2020-10-21_10-58-19.png
    I added an image to show the difference in the file.

    The problem is that this file still has the same hash as it did when building with unity 2019.4.10.
    What would happen now is that my Unity 2019.4.12 build is not able to load the files created with .10 and my 2019.4.10 build that is already on the store is not able to load the new bundles!

    It throws a CRC mismatch error:
    2020-10-21 09:39:25.366 16690-17162/? E/Unity: Error while downloading Asset Bundle: CRC Mismatch. Provided 3b0ad501, calculated ad1ae218 from data. Will not load AssetBundle 'https://cdn-files-accept.gop3.nl/ad...kdrop_50119efb6ea3e4834683b077f6b09ec6.bundle'2020-10-21 09:39:25.374 16690-17103/? E/Unity: Exception encountered in operation Resource<GameObject>(r1a2l0_backdrop.prefab), status=Failed, result= : Unable to load dependent bundle from location Assets/com/youdagames/gop_tt/client/resources_moved/ex_assets/SaloonBackdrops/r1a2l0_backdrop.prefab

    Now, I have solutions.
    1 : Disable CRC in the new build and not update the files on the remote.
    But I would really want to keep CRC I think?
    2: Do the solution @ProtoTerminator suggested and add the unity version in the remote load and build paths but this would make it so every user downloads the bundles again when we update the engine.

    So is this supposed to work like this? @DavidUnity3d or is it a bug.. because this is kinda weird right now?
     
    jeanluch_playtika likes this.
  33. FMoreno

    FMoreno

    Joined:
    Jun 21, 2018
    Posts:
    4
    Hi all,

    Just to provide more info about this issue. We are suffering this issue as well but we are not using addressable assets so I think it could be related to the core of asset bundles feature. We have our custom solution to deal with asset bundles and we persist the CRC of every bundle and at download we pass the CRC as parameter. In 2018.4.25 works perfectly but as soon as we ported our project to 2019.4.13 we started to suffer this problem.

    Regards
     
  34. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    @Apollo-Meijer Changing Unity versions will break CRC, yeah. The issue comes from the fact that we don't want to change the asset hash based on Unity version when all the data is unchanged. This would mean you'd have to re-downloaded all your remote bundles for literally no asset change.

    I was pretty sure there was an option somewhere to strip the unity version from the Asset Bundle build but that may have been with the old BuildPipeline (ie not the Scriptable Build Pipeline). If you could file a bug with that info and a good project we might can use that engine feature in the SBP to allow users to strip the Unity version.

    Unfortunately, at the moment there's not any good work around that I know of other than disabling CRC checks.
     
  35. Apollo-Meijer

    Apollo-Meijer

    Joined:
    Mar 30, 2015
    Posts:
    31
    Hey @DavidUnity3d
    This is extremely strange, to be honest. what is the benefit of having the hash be the same if the bundles do not work across different unity version? We tested this and I'm sure that when we tried to load asset bundles from 2019.4.12 with a build from 2019.4.14 it did not work.
     
    felipe-shida-playkids likes this.
  36. KarimTA

    KarimTA

    Joined:
    Jan 8, 2019
    Posts:
    27
    @BenHymers
    We also had random CRC Mismatch issues on our CI machine.
    It turned out that one of our RAM sticks was faulty and would effectively corrupt the bundles.
     
  37. suixin567

    suixin567

    Joined:
    Dec 18, 2020
    Posts:
    1
    CRC Mismatch too,unity2019.4.15f1c1 A ddressable 1.16.10 Android
     
  38. nauroman

    nauroman

    Joined:
    Nov 1, 2014
    Posts:
    13
    I have this error when running in Unity Editor.

    Error while downloading Asset Bundle: CRC Mismatch. Provided 603c3b5c, calculated 5826517c from data. Will not load AssetBundle

    Unity 2020.2.2f1
     
    J1wan and tokar_dev like this.
  39. therobby3

    therobby3

    Joined:
    Jan 30, 2019
    Posts:
    131
    Also having some of these appear for me. It is happening in the WebGL version for players.

    Unity version: 2019.4.19f1
    Addressables version: 1.16.16
     
    tokar_dev likes this.
  40. Jalict

    Jalict

    Joined:
    Nov 3, 2014
    Posts:
    20
    We have been running into CRC mismatch a lot here as well and our fix (before seeing this post) was also to disable CRC checks, which improved our experience a lot!

    Can you describe briefly some of the issues this could introduce and how likely they may be, and which situations?

    I am just a little unsure how the CRC check may benefit us and if we even need it at all.
     
  41. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    586
    You don't need CRC checks in WebGL because the browser already has it built in. CRC checks just slow it down for no reason.
     
  42. YLahin

    YLahin

    Joined:
    Jun 22, 2018
    Posts:
    2
    CRC Mismatch too...

    Steps:
    1) (Clean Build -> All) + (New build -> Default build script).
    2) Build standalone application A.
    3) Reopen unity (important!).
    4) (Clean Build -> All) + (New build -> Default build script).
    5) Build standalone application B.
    6) Upload bundles to server (url/[BuildTarget]).

    On application A: error, crc mismatch.
    On application B: all ok

    File has changes. This is normal?
    upload_2021-2-28_15-56-25.png
    upload_2021-2-28_15-52-46.png
    Without reopen unity the files are the same.
     
  43. diegoa_unity231

    diegoa_unity231

    Joined:
    Jan 11, 2021
    Posts:
    4
    I am also having the same problem here with my Android build.
    I built the addressables with my machine with Unity 2019.4.17f1, however the game is being built with UCB to the last LTS version, which is 2019.4.22f1.

    I will try to update my local unity version and build all again to see if it works.
     
  44. Hybrid_8974

    Hybrid_8974

    Joined:
    Oct 14, 2020
    Posts:
    1
    Hi there, any suggestions?
    We meet this problem with Android build too, in Unity 2019.3.4f1 and the version of addressables is 1.16.7.
    Then we upgrade it to 1.16.16, but still the problem exists.
    Well I guess is might be related to reopen Unity, cuz I had some tests, with same content of assetgroups and assets, after reopen the Unity and BuildPlayerContent, the crc of which bundles has changed.
    btw, those bundles were scenes, and only scenes bundles had crc changed (for me).
     
  45. Morphus74

    Morphus74

    Joined:
    Jun 12, 2018
    Posts:
    174
    Have that issue also, when I start my build, it will download, complaint about crc mismatch, and once I restart the player, it work without complaining
     
  46. FloBeber

    FloBeber

    Joined:
    Jun 9, 2015
    Posts:
    166
    I'm also often encountering that CRC mismatch issue when building/testing for Android

    EDIT: when this happens, the easy fix is to update Bundle version and/or code and to build again
     
    Last edited: Apr 1, 2021
  47. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    @Jalict The checks ensure that a downloaded bundle has valid data. Loading a bundle with corrupt data will cause the client to crash. It also prevents the bundles from being modified locally by users. We are also currently investigating the performance issues caused by the CRC checks.

    @Apollo-Meijer The bundle hash identifies the source asset versions in the bundle. When building bundles on different unity versions, the hash can potentially change but most likely stays the same.

    The unity version serialized in a bundle file is used to determine if bundle can be loaded by the specific player runtime when type trees are disabled. This is necessary for older unity versions (2017 or older) as certain platforms did not support type trees. There is now an SBP build option ContentBuildFlags.StripUnityVersion that can be used to exclude the version number. Note that if StripUnityVersion is enabled, ContentBuildFlags.DisableTypeTree cannot be enabled.

    Would someone be able to submit a bug report with a repro project? I wasn't able to reproduce it locally, might be missing something.

    Also you can use WebExtract and binary2text to convert the .bundle files to a readable format, and see what exactly changed. https://support.unity.com/hc/en-us/articles/217123266-How-do-I-determine-what-is-in-my-Scene-bundle-
     
    KwahuNashoba likes this.
  48. onurerler

    onurerler

    Joined:
    Apr 10, 2013
    Posts:
    35
    If scene doesnt changed but only some of assets used in the scene changed. crc mismatch issue happening. If you make some changes to scene's itself from unity editor, the problem is gone.

    This is the reason that why unity devs. didn't reproduce this issue yet.

    If you change any scene dependencies. you need to make some even unnoticable changes on scene's itself to prevent this issue until a fix released.
     
  49. AkhmedAbasov

    AkhmedAbasov

    Joined:
    Mar 13, 2014
    Posts:
    163
    I am having this error at the moment and am unable to fix it. The problem occurred after updating the Unity version and building new bundles. I removed all bundles from the server and downloaded new ones and clients started getting this error. To fix the situation, I tried to disable the CRC check, collected new bundles and uploaded them to the server and also updated the build - does not help.

    upload_2021-5-20_15-51-49.png

    Error while downloading Asset Bundle: CRC Mismatch. Provided 6ca615e1, calculated 5aa7f2fc from data. Will not load AssetBundle
     
  50. apiotuch_unity

    apiotuch_unity

    Joined:
    Jun 28, 2019
    Posts:
    138
    We are also experiencing this issue. It was fine for a few days, and then suddenly today, old releases were getting the CRC issue. Tried uploading old addressables, fresh install of app but that didn't solve the problem. Only a new build seems to work, old releases get numerous errors, first one being CRC.