Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Web Player - Failed to Download Data

Discussion in 'Editor & General Support' started by kinetiknz, Sep 13, 2011.

  1. kinetiknz

    kinetiknz

    Joined:
    May 5, 2010
    Posts:
    173
    Hi there,
    I am hosting a unity file on godaddy.com (Windows servers) and I can't get any Unity content to be useable.

    Firefox: loads page and instantly says: "Failed to download datafile"
    Firefox: loads the page and displays the Unity logo, the progress bar does nothing and no error occurs.
    Internet Explorer: invalid data file, data is corrupt or not a unity file.

    I'm hoping that whatever the problem is will fix all three at once!

    The HTML seems to be looking in the right place and I can't think of any other things to change.
    Does anyone know of a proper cause of the problem??

    Thanks

    Here is the current link:
    http://www.vistele.com/Webplayer/webplayer.html
     
    Last edited: Sep 13, 2011
  2. vakis

    vakis

    Joined:
    Aug 29, 2011
    Posts:
    1
    did you find the solution? i have the same issue
     
  3. kinetiknz

    kinetiknz

    Joined:
    May 5, 2010
    Posts:
    173
    Hey yeah I did, you need to create a file in the root of your site (and add some code to it) that adds the unity file type association for the server. i know this is very vague, but after googling it, I found a post which mentioned it, created the file, copy pasted the content and it worked instantly. Didn't have to contact godaddy, which is lucky because their help centre is a copy/paste centre. I would get it for you but my dreamweaver license just ended :/

    I'll post the file when im home, so u can just DL, then UL and it should work. Are you hosted on Windows? Don't think it will work on Linux
     
    Last edited: Sep 26, 2011
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    What you need to do and what he did was adding the custom file required to define own MIME Types.
    Microsoft IIS (the webserver used on windows servers and required for ASP.NET) does not handle unknown MIME types like Apache does and so it just fails basically with Unity content.

    There are a few threads on it where the whole thing is more or less listed indetailed form if I recall right
     
  5. rickb123

    rickb123

    Joined:
    Jun 27, 2011
    Posts:
    2
    Hi, I had similar problem but my issue was that it will load in firefox but not in internet explorer 8 - crashing everytime.

    The funny thing is that it works on my two other machines i mean loading in IE 8 without crashing. Now i am checking the antivirus that could prevent from loading my player.
     
  6. fiddystorms

    fiddystorms

    Joined:
    Mar 24, 2012
    Posts:
    7
    Why is it that there are no solutions to what seems to be a very common error? Same error "failed to download data file"... changed the MIME settings by adding application/vnd.unity as the MIME type and both .unity3d .unityweb as MIME extensions. No change, still getting error.

    This error keeps popping up all over this forum, but there hasn't been one solution that has been confirmed to actually solve the problem.
     
  7. kinetiknz

    kinetiknz

    Joined:
    May 5, 2010
    Posts:
    173
    Hey, there is a fix, it's been around for years.
    Change the .unity3d MIME type. Some apache servers don't understand what a unity file is. Most hosts allow you to do this manually, or you could just ask them to do it. I'm with webhostinghub.com and can do it from the control panel, though it was setup already. Also Linux hosts are fine hosting unity content. There are rumours around that you need a windows host, but it's not true.

    I would triple check the grammer in the MIME type, and then try someone else's computer? Not sure if the MIME doesn't fix it.
     
    Last edited: Mar 24, 2012
  8. vgabex

    vgabex

    Joined:
    May 8, 2012
    Posts:
    1
    Try renaming "WebPlayer.unity3d" to "webplayer.unity3d" + change it also in the html code.
     
  9. steel

    steel

    Joined:
    Nov 20, 2012
    Posts:
    8
    @kinetikinz : hi ,what should be the file name and the contents inside it? i uploaded files through server
     
  10. FilipeGevaerd

    FilipeGevaerd

    Joined:
    Mar 17, 2013
    Posts:
    1
    Hey everyone, I had the same problem using the IIS 7.5.
    I resolve it, adding the MIME Type.

    Folow these steps:

    1. Double-Click MIM Types in your application folder.
    2. Click Add, at the Actions menu.
    3. Fill the "File name extension:" with ".unity3d".
    4. Type "application/unity3d" at "MIME type:" field.
    5. Click OK.
    6. Restart your site on ISS.

    This steps solve the problem to me.

    See you!
     
    Tony_N and rsimsek50 like this.
  11. LEO-MICHEL

    LEO-MICHEL

    Joined:
    Feb 20, 2013
    Posts:
    5
    The solution for me was to put a custom web.config in the same folder of the "*.unity3d" files

    you can put thats lines on a "*.txt" and rename it after to "web.config"

    <configuration>
    <system.webServer>
    <staticContent>
    <mimeMap fileExtension=".unity3d" mimeType="TYPE/SUBTYPE" />
    </staticContent>
    </system.webServer>
    </configuration>

    I'm with a Godaddy hosting on a Windows server (ASP Apache)
     
    Last edited: May 27, 2013
    GamesMoby and pcorazao like this.
  12. GD-Darren

    GD-Darren

    Joined:
    Jan 12, 2013
    Posts:
    53
    Thanks LEO MICHEL, your solution worked great.

    TO SOLVE IT all you have to do is copy paste what LEO MICHEL wrote under the </body> of the html file!
     
  13. LEO-MICHEL

    LEO-MICHEL

    Joined:
    Feb 20, 2013
    Posts:
    5
    Thats true good to !o) the solve of GD.Darren,
    but dont forget if you do this, you need to rewrote the lines eatch time after the html file was generated. Peraps with the "web.config" you dont need to.
     
    Last edited: May 27, 2013
  14. 101chris

    101chris

    Joined:
    Jun 13, 2013
    Posts:
    2
    thanks that was driving me nuts. FF didnt even show me an error, just sat there at the unity screen.
     
  15. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,697
    Hi guys,
    I am following along with this thread and I can not get my player to not show an error. (Failed to Download...)

    1. I pasted in @LEO MICHEL's code into the HTML body.
    2. I have uploaded the HTML and the UnityObject.js to my public root folder.
    3. I renamed the HTML file to index.html

    I still get the "Failed to Download Data" error.



    I am unsure what to do.
     
  16. Linthu

    Linthu

    Joined:
    Aug 28, 2013
    Posts:
    10
    Thanks FilipeGevaerd, this solved my problem.

    On a side note - we were only seeing this issue on some machines. So, even if you guys are not seeing this issue, you may want to make sure the mime type is set up in IIS as described below.

    Anyway thanks again!

     
  17. siddhu446

    siddhu446

    Joined:
    Dec 20, 2013
    Posts:
    1
    :D thankyou sooooooooooooooooooo much
     
  18. EricO64

    EricO64

    Joined:
    Feb 6, 2014
    Posts:
    1
    My sentiments exactly. Until I entered that little setting in Web Config and things finally started working, I thought I was going to go nuts!!
     
  19. sreveloc

    sreveloc

    Joined:
    May 9, 2013
    Posts:
    2
    I have this problem too trying to add my game to Facebook (with unity integration you just only need the .unity3d file). And i solved just adding the MIME Type to the iis in my server.
    Thank you.
     
  20. Goodzilaaa

    Goodzilaaa

    Joined:
    Mar 19, 2014
    Posts:
    1
    Hi guys
    I was playing one of unity plays (cs_portable.net), I played it many times but now it is giving me the same error
    You gave many answers but I didnt understand
    For doing your steps I went to the unity web player folder, then I changed the MIME type to .txt, next I copied the LEO MICHEL s text in to it, then it didnt work
    Where I did wrong?
    Tanks for your answers
     
  21. andywarz23

    andywarz23

    Joined:
    May 14, 2014
    Posts:
    1
    how do you do that
     
  22. spirit13

    spirit13

    Joined:
    Jun 5, 2014
    Posts:
    2
    it use to say erroe launching unity player now its saying failed to download data file so what should i do now
     
  23. Hims

    Hims

    Joined:
    Jul 9, 2012
    Posts:
    2
    I have been able to solve this.

    you need to set the MIME type in web.config file.

    in web.config's , the extension for the file be 'unity' only , it should not be 'unity3d'. and the file sub type should be 'unity' instead 'unity3d'.

    here is the code to set the MIME type.

    1. <configuration>
    2. <system.webServer>
    3. <staticContent>
    4. <mimeMapfileExtension=".unity"mimeType="application/unity"/>
    5. </staticContent>
    6. </system.webServer>
    7. </configuration>
     
  24. Skyboard_Studios

    Skyboard_Studios

    Joined:
    Jul 20, 2013
    Posts:
    51
    I totally fixed this!!

    Solved

    I was amazed I tried everything that was written on the net about this... and nothing worked...

    Here is the background ... All of a sudden during development I uploaded a fresh .unity file to my webserver (apache) and I kept getting this "Failed To Download Data File"

    "Download Failed" over and over again...

    I tried uploading new files...checking the MIME types... updating / uninstalling webplayers....

    A big joke was that Chrome was my only way I could get unity working... with all the chrome issues here I am using it to test out my upload...Long story short here is the answer:

    1) goto FF Help / Menu (F10 if Menubar is not showing)

    2) select "Restart with Add Ons Disabled"

    3) Answer YES to restart Firefox

    4) Wait a moment. FF will restart and immediately show you a window stating you are about to enter safe mode .... you will have 2 buttons.... Hit the "REFRESH" button.

    5) Another Message box will Appear hit "REFRESH" button AGAIN

    6) Let Firefox do it's Refreshing and Bingo. You are back in business.

    Unity Answers Link with Picture
     
  25. Tony_N

    Tony_N

    Joined:
    Aug 30, 2017
    Posts:
    1
    This worked fine for me! Thanks!!!!