Search Unity

WebGL issues with addressables from remote server

Discussion in 'Addressables' started by Siberdt, Aug 19, 2019.

Thread Status:
Not open for further replies.
  1. Siberdt

    Siberdt

    Joined:
    Dec 15, 2009
    Posts:
    59
    Good day. I'm using 2019.2.1f1 with 1.1.7

    There are no problems with remote addressables for local and remote web servers on PC builds.

    On WebGL build I can only load assets from local web server, but remote server send me this error:

    upload_2019-8-19_20-4-54.png

    This error log looks the same like after refreshing the build page with local web server off.

    I found not so much info about fusion of addressables and WebGL and have no idea how to resolve my problem: load remote addressable bundle from remote web server. Can you help me with?

    P.S. The flag Use Asset Bundle Cache for remote schema is off.

    Thank You.
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    hmm. a couple things to check on.

    1. your PC stand alone builds successfully load from that same URL (except "/windows/" where "/WebGL/" is now), right? Have you tried running that build on a different PC? maybe outside your network? just in case there's some weird auth thing.
    2. I think if you have an incompatible compression setting on remote bundles, WebGL will give an error that actually says "incompatible compression" or something like that. But just in case, perhaps try changing your compression settings to see what happens.
    3. what do you mean by "local web server"? On the same machine? Network?
     
    Siberdt likes this.
  3. Siberdt

    Siberdt

    Joined:
    Dec 15, 2009
    Posts:
    59
    Thank You for the responce.

    1. Yes, my PC stand alone build works great with remote addressables as from local 127.0.0.1:8887/WebGL as from remote fictionware.com/addressables/WebGL.

    I will try to test the issue with another PC/network


    2. I set compression to "Uncompressed" and got the same like "LZ4" error:
    "Asset bundle download complete but not data have been received..."
    Local bundle is loaded. Remote bundle - not.

    I set compression to "LZMA" and got the error:
    "Decompresdsing file format (1) is not supported on this platform... ...failed to decompress data"
    Both local and remote bundles are not loaded.


    3. I'm using Web server for Chrome addon for tests on localhost.
    All bundles (local and remote) work perfect when stored in http://127.0.0.1:8887/WebGL
     
  4. Siberdt

    Siberdt

    Joined:
    Dec 15, 2009
    Posts:
    59
    I've got the update with some fresh tests:

    upload_2019-8-20_14-26-20.png

    So, looks like only a "Build and Run" builds, that launched from localhost: portNumber have problems with loading remote addressables from remote web-server.

    There are no problems with bundles loading for WebGL builds uploaded to web-server.
     
    Last edited: Aug 20, 2019
  5. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    That's weird. It makes me think it's an issue with blocked network connections. One test you could do would be to just put something (say a txt file) on your host, and have your game code try to access it via https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest.html
    If that doesn't work, then it's not an addressables specific issue. Its instead something to do with connecting two network endpoints. Well outside my expertise unfortunately.
     
    Siberdt likes this.
  6. Siberdt

    Siberdt

    Joined:
    Dec 15, 2009
    Posts:
    59
    You were right.
    WebRequest tests have the same behavior like Addressable tests.

    Build, launched from localhost: portNumber gives me the "Unknown Error" as webRequest.error
    PC Stand Alone build and WebGL build on remote server work great.

    Thanks a lot for your worries. In any cases, I know how to avoid the problem and can continue my devs.
     
    unity_bill likes this.
  7. androshchuk-vladyslav

    androshchuk-vladyslav

    Joined:
    Dec 13, 2015
    Posts:
    127
    Spend all the day yesterday for this. Firstly I had CORS issue which was solved by server admins. Secondly I have some unknown issue by downloading assets on localhost build(
     
  8. valerialukaj4

    valerialukaj4

    Joined:
    Jul 4, 2019
    Posts:
    1
    I have the same problem, with downloading asset bundles from remote server. How did you solve it?
     
  9. Siberdt

    Siberdt

    Joined:
    Dec 15, 2009
    Posts:
    59
    Only my WebGL builds can load WebGL remote addressables.
    My standalone builds and editor tests (desktop or WebGL, not matters) only can load standalone remote addressables.
     
    Last edited: Feb 17, 2020
  10. vlukaj4

    vlukaj4

    Joined:
    Feb 11, 2020
    Posts:
    4
    I get this error:
    Asset Bundle download is complete, but no data have been received

    Unknown Error
    (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    InvalidOperationException: Unknown Error
    at UnityEngine.Networking.DownloadHandler.GetCheckedDownloader [T] (UnityEngine.Networking.UnityWebRequest www) [0x00000] in <00000000000000000000000000000000>: 0

    (Filename: currently not available on il2cpp Line: -1)
    should I use addressable assets to get a .dlc file from a remote server?
    Thank you for the answers
     
  11. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I had this problem after changing the folder name in addresses. I tried fixing it many ways (clearing cache, etc). nothing worked. Finally, I solved this by deleting my "AddressablesAssetsData" folder, letting the addressables system recreating it, and setting everything back up from scratch.

    I'm seeing a lot of other problems with WebGL, though, so be prepared. I no longer get "completed" events if the bundles are cached locally. As well, the normal maps have to be reset if I do a webgl build, because it reswizzles them on load from the bundle.
     
    vlukaj4 likes this.
  12. vlukaj4

    vlukaj4

    Joined:
    Feb 11, 2020
    Posts:
    4
    Thanks Jaimi for the answer. So is better to use addressable asset system in Unity for load a scene from a remote server? I'm not able to find a solution for that and I read that with the addressable asset system is better to work than asset boundle. I've been looking for a solution to this for a long time but nothing works!
     
    Last edited: Feb 18, 2020
  13. vlukaj4

    vlukaj4

    Joined:
    Feb 11, 2020
    Posts:
    4
    It seems that the file.dlc is send by the server. It works on Standalone, and webGL with local folder path, but not works for webGL and remote server. Any solution about that?
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    Addressables appears to currently be a layer on top of Asset Bundles. While this may change in the future, for right now it's doing all the management of building bundles, caching them, etc. So if you have a problem with Asset Bundles, you'll probably see the same thing with Addressables.
     
  15. vlukaj4

    vlukaj4

    Joined:
    Feb 11, 2020
    Posts:
    4
    Thaks for the answer. How I can solve the problem of load a scene with .dlc file from a remote server on WebGL application? I create asset bundle with asset browser, I load the .dlc file to remote server and I try to download it from the server to webGL, but I have the problem that I posted on. Any idea about that?
     
  16. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,208
    I have no clue on DLC, sorry.
     
Thread Status:
Not open for further replies.