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. Dismiss Notice

WebGL Asset Bundle crash.

Discussion in 'WebGL' started by doutho, Nov 7, 2017.

  1. doutho

    doutho

    Joined:
    Sep 11, 2013
    Posts:
    7
    Ok so guys i have a game that i want to run with asset bundles.

    So the scenario is the following. I put them in the streaming assets path and then build the game.

    I tested it on one server and it is working correctly on any browser.

    Though when i tried to upload it on another server that i need to make a presentation build i get the following error.

    Error while downloading Asset Bundle: Failed to decompress data for the AssetBundle '****.com/demogames/Stars_Project/StreamingAssets/AssetBundles/data'.

    Checking the debug of the console gives the following error.

    Could not load the source for blob:http://****.com/c35f9972-1ff0-4576-9a56-903ecfe85d2f.
    [Exception... "Failed to open input source 'file:////****.com/c35f9972-1ff0-4576-9a56-903ecfe85d2f'" nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)" location: "JS frame :: resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/DevToolsUtils.js :: mainThreadFetch :: line 529" data: yes]
    Stack: mainThreadFetch@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/DevToolsUtils.js:529:5
    _getSourceText/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/source.js:404:27
    process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23
    walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7
    scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:742:11
    Line: 529, column: 0

    Does anyone have a clue what could possible go wrong ?

    I suspect being a problem with the mime types on my Apache but i do not know what kind of mime types i should set on my .htaccess.


    I would appreciate some help on that.
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    perhaps the problem is how you configured the server?
     
  3. doutho

    doutho

    Joined:
    Sep 11, 2013
    Posts:
    7
    Yes i am quite sure about this. But i really do not know what to search first about it.

    @Marco-Trivellato do you have any example of an .htaccess with proper asset bundle mime types for apache server in your disposal that you can share? I would really appreciate some help as my sanity is starting to wane.
     
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    You may want to check this page of the manual.