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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

CryptographicException: Invalid input block size.

Discussion in 'Assets and Asset Store' started by mcbauer, Mar 9, 2016.

  1. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    I get this error now on several asset packages that I have purchased.

    Here is the full error:

    CryptographicException: Invalid input block size.
    Mono.Security.Cryptography.SymmetricTransform.FinalDecrypt (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
    Mono.Security.Cryptography.SymmetricTransform.TransformFinalBlock (System.Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
    System.Security.Cryptography.CryptoStream.Read (System.Byte[] buffer, Int32 offset, Int32 count) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs:205)
    UnityEditor.AssetStoreUtils.DecryptFile (System.String inputFile, System.String outputFile, System.String keyIV) (at C:/buildslave/unity/build/artifacts/generated/common/editor/AssetStoreUtilsBindings.gen.cs:86)

    Any help would be greatly appreciated.

    using Unity 5.3.3
     
  2. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    Now getting this error on more assets that I purchased....
     
  3. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    So far the only way around this is contacting the publishers directly to get a direct link from them.
     
  4. lasse

    lasse

    Unity Technologies

    Joined:
    Oct 26, 2011
    Posts:
    52
    You should read this as: "Downloaded fewer bytes than expected." It means the download is incomplete - usually because or network hiccups of lack of disk space, etc. (Yes, it's a S***ty error message that we should improve.)
     
  5. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    Gracias. I went in and saw that those files were in fact sitting at zero bytes. Thanks.
     
  6. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    ok so, this still isn't helping me.

    I get that it is fewer bytes than expected, but my problem remains. I delete the package from my PC, then it shows up as needing to be downloaded again, I hit download, and it returns to giving me the same error.

    How do I fix this???
     
  7. lasse

    lasse

    Unity Technologies

    Joined:
    Oct 26, 2011
    Posts:
    52
    Which package(s) are you having problems with? Also, check your editor log - there might be another error from the download, before the decryption error.
     
  8. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Also, how much space do you have on each of your drives?

    With a 1.6Gb package, that could be an issue (needing space to download a package and then decompress it). The package gets downloaded compressed (900Meg) to your C: drive, decompressed and followed by actually importing the assets into your project (so potentially another 1.6Gb).
     
  9. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    I have a terabyte free.

    I get this error currently with Gaia, World Creator, and SkyMasterUltimate. I just bought World Creator, and it happened right away.

    The other 2 started happening after updating them a latest version.

    Other than showing you the error I get for the CryptographicException, which appears in the console, how do I find the editor log?
     
  10. lasse

    lasse

    Unity Technologies

    Joined:
    Oct 26, 2011
    Posts:
    52
  11. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    Windows 7
     
  12. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    Nothing is showing in the editor log
     
  13. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    And it happens on everything now it seems. probably 85% of what I have bought I get the error on.
     
  14. lasse

    lasse

    Unity Technologies

    Joined:
    Oct 26, 2011
    Posts:
    52
    My bad. It's not in the editor log but in a tool-tip if you hover over the download button after it changes to error. E.g.:
    dl-error.png

    What error do you get?
     
  15. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    can't decrypt package
     
  16. cjackcandy

    cjackcandy

    Joined:
    Sep 8, 2013
    Posts:
    23
    I get the exact same error when trying to download assets when I'm located on my workplace network (no issue when at home). The hover error shows: Error: could not decrypt package file. I'm guessing my work's firewall may be blocking?
     
  17. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    I'm at work too, but if that was the case, then shouldn't it do it for all the assets? it blocks maybe 80% of them, but 20% I can download with no issue.
     
  18. Dave-Hampson

    Dave-Hampson

    Unity Technologies

    Joined:
    Jan 2, 2014
    Posts:
    150
    Are the packages it blocks maybe bigger than the others? Could that account for the difference in whether the data is allowed (assuming it is something about your Internet connection which is affecting the Asset Store downloads)?

    Maybe you can take the proxy out of the equation by testing via another internet connection, for example, by tethering your PC to your phone, or by connecting to a WiFi access point or a different Ethernet?
     
    jminht likes this.
  19. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    I cannot take the proxy out of the equation at work.

    Yes the packages it typically blocks are large (Gaia, World Creator...)

    But it is also giving the same error on Ultimate Joystick, which is 618kb.
     
  20. Nic360

    Nic360

    Joined:
    Mar 30, 2016
    Posts:
    1
    I have the same exact situation. Same error and working from office.
    If this issue resolved, if so what was the resolution.
     
  21. mcbauer

    mcbauer

    Joined:
    Oct 10, 2015
    Posts:
    496
    No real solution Nic, I had to just download all packages from home and bring them in. haven't bought anything new lately so I'm not sure if this truly has fixed it--plus no updates have come out yet.
     
  22. v.nikolaev

    v.nikolaev

    Joined:
    Sep 11, 2015
    Posts:
    7
    Having the same issue in Unity 5.3.4f1:
     

    Attached Files:

    Last edited: Jul 1, 2016