Search Unity

  1. Dismiss Notice
  2. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice

Bug "Invalid path in AssetBundleProvider" - path length?

Discussion in 'Addressables' started by PixelLifetime, Jul 30, 2020.

  1. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    80
    This is a very weird error that I get when I follow simple steps. To reproduce you just need to:
    1. Create a new project.
    2. Install addressables.
    3. Create a test script that is going to instantiate AssetReference on Start.
    4. Make a prefab of Cube. Mark it addressable.
    5. Build addressables.
    6. Use built bundle for testing in the editor. Run playmode, it should work fine and instantiate the cube.
    7. Build Settings -> Build -> Create a folder named: Builds in directory containing Assets.
    8. Builds -> Create a folder named: something very long like "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".
    9. Build project in that folder.
    10. Run the project -> Open player log -> See error.
    So after 5-6 hours of pain, I actually renamed the folder to a shorter version something like `aaaa` and my previous build started working :D

    Here is the screenshot of all of my builds and a log with an error attached when I try to instantiate an addressable with name: "Cubero", the shorter named ones are working, first I thought that the max number of characters was 25, but then it didn't work with some folder names, idk what the problem is.

    upload_2020-7-30_13-50-21.png
     

    Attached Files:

  2. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    477
    Code (CSharp):
    1. https://storage.googleapis.com/addressables-example-project/StandaloneWindows/prefabs_assets_all_5ea9811ebeb9c96a8969e60ad511be99.bundle, result='HTTP/1.1 404 Not Found
    Your description of the problem and your logs don't make sense. The log says it can't find the bundle at that url, I don't see anything about long paths.
     
  3. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    80
    Same build, same actions = different logs because I have changed the name of the folder from something like `aaaaaaaaaaaaaaaaaaaaaa` to `a`.
    I understand where the http error is coming from. I have deleted files from the server, but it's the same with or without it, without it is just not the http error.

    WithoutHTTP_Player - same build, smaller name.
    WithoutHTTP_Player-prev - same build, bigger name.
     

    Attached Files:

  4. ProtoTerminator

    ProtoTerminator

    Joined:
    Nov 19, 2013
    Posts:
    477
    Hm, your path doesn't even look that long. You could try enabling long paths in Windows (if that's what you're using). If that doesn't work, this is probably a bug in addressables and you should report the bug.
     
  5. PixelLifetime

    PixelLifetime

    Joined:
    Mar 30, 2017
    Posts:
    80
    It's most likely not the path length, that is why I put the question-mark because I meant only the length of one folder (I understand that it's not intuitive, sorry). I have tested it in 2 different projects, 1 had a lot shorter path than the 2, but it worked the same way.

    I thought that this forum is the right place to report bugs since the change to move to forums. Issue tracker is still a thing?
     
unityunity