Search Unity

Web Player: "Bad File Length"

Discussion in 'Editor & General Support' started by JRule, Dec 21, 2009.

  1. JRule

    JRule

    Joined:
    Nov 17, 2009
    Posts:
    11
    Hey,

    We've recently released a Facebook game.
    http://apps.facebook.com/trainsetgo

    We're getting reports of some users having a "Bad File Length" error when loading our game in the web player.

    Is this a problem on our side or a problem with our users addon? If it can't be controlled by us, can our browser somehow catch the error for a solution?
     
  2. Captnian_legacy

    Captnian_legacy

    Joined:
    Aug 14, 2008
    Posts:
    25
    Did you or anyone who is experiencing this figure it out? Our community has been reporting instances of this bug as well and we can't reproduce it. We've been advising to clear browser cache and reinstall unity. It seems to work for some, but others say they keep getting the error. It seems to have started about the same time as 2.5 was released. I know cause I started getting calls while at Unite.

    Hopefully someone has a solution for this as it seems to be a big issue, at least with our community.
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    never experienced that.

    perhaps the users had the 2.5 plugin installed as administrator and not correctly uninstalled before installing the 2.6 one without admin
     
  4. JRule

    JRule

    Joined:
    Nov 17, 2009
    Posts:
    11
    The only thing we have found is that it seems to be related to the browser caching a bad version of the game.

    It seems to be more frequent on slower connections, or connections that have a higher probability of dropped packets.

    Our current "fix" is to tell our users to clear out their browser cache if it happens, and it will clear out the bad version of the file for re-download. We're still wanting a better fix, but no luck yet.

    We've only been able to reproduce it on a wireless connection, but is still rare for us.
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    ah well against download errors, the only thing you can do is host it on an hoster that has generally a better connection and especially one with far lower packet loss
     
  6. TheMadGamer

    TheMadGamer

    Joined:
    Mar 12, 2010
    Posts:
    8
    We have this same issue. We have just released a game for a major client - one of the client testers is seeing this same issue. A browser cache clear did not seem to solve the issue unfortunately. This is an XP / IE7 user. Needless to say, our client is not happy.
     
  7. TheMadGamer

    TheMadGamer

    Joined:
    Mar 12, 2010
    Posts:
    8
    We have this same issue. We have just released a game for a major client - one of the client testers is seeing this same issue. A browser cache clear did not seem to solve the issue unfortunately. This is an XP / IE7 user. Needless to say, our client is not happy.
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    do a longer ping against your webhost that hosts the file and see how many packet drops and high latency spikes you have so you know if you are forced to host it in a better place.
     
  9. Captnian_legacy

    Captnian_legacy

    Joined:
    Aug 14, 2008
    Posts:
    25
    I appoligize - I should have come back and posted when we figured out our issue. We had started hosting it on CDN and it turned out that was when we started having a very small population get this error. We finally had a machine in our office do this and we found it was like a light switch. We would re-direct to CDN and the one machine would get the "Bad File Length" error. We would remove the re-direct and it would be fine.

    I'm not sure exactly why re-directing to CDN effects a very small population of our users, but it does. So, we just serve the unity file locally on our servers.

    Hope that helps.
     
  10. eheimburg

    eheimburg

    Joined:
    Apr 1, 2009
    Posts:
    34
    Any news on this from Unity? Is this caused by version mismatches? Corrupted data due to a Unity bug? What?

    (For the record, saying "you have lots of packet loss" or "your connection is too slow" is a 100% unacceptable "answer". The initial download is supposed to be a TCP-based download, so if it completes it must succeed, and if it doesn't, there are bugs in the client downloading process.)

    We have zero control over this issue and it is very frustrating to get reports from preview-testers that the game is just failing. This demands urgent action from Unity.
     
  11. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Its normally a download error, caused by bad connections or wanna-be security app inference caused by the realtime check of the data stream.

    If you want to blame someone for these errors, please visit your browser developers page and let them know that you are not accepting that they offer such a bad technology.
    Unity uses the browsers networking within the webplayer for any WWW related stuff (so caching, session etc is working), nothing own or 3rd party, so a failure on download is 100% browser caused, with unity as well as you being the victim.

    You can get download errors even with the most modern browser and with bad connections or better bad connection quality you will get download errors. Unity can't adress problems that are an inherent part of the technology and WWW itself.
    But what you can do is prepare for such misserable connections, have a FAQ or offering any other kind of instructions so the users know that a cache refresh (ctrl - F5) can solve it.
     
  12. eheimburg

    eheimburg

    Joined:
    Apr 1, 2009
    Posts:
    34
    While I acknowledge that some browsers' download managers can sometimes cause trouble, that is completely not what's happening here.

    I maintain a large Flash portal with thousands of Flash games, many of which are very large. There are never issues with file corruption in Flash. It is purely a Unity issue, and with files that are much smaller than many of the Flash games. In short, it is a Unity bug and it needs to be fixed ASAP.

    Is Unity even going to acknowledge this issue officially? Googling for this issue, I see various blogs saying "I talked to Unity and they said they are working on it..." but that was last year. I need a status update. This is extremely important! We've invested several months in developing a Unity game, are on the verge of buying pro licenses, and hit this, quite out of the blue, during very early testing. It is quite a problem.

    This is the forum Unity developers read, right? (Serious question)
     
  13. eheimburg

    eheimburg

    Joined:
    Apr 1, 2009
    Posts:
    34
    Just as a follow-up to this, we seem to have fixed it for our handful of preview testers by switching to a CDN for downloading the main file. But I am really afraid we're just obscuring the issue, rather than really fixing it.
     
  14. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    if moving it to a stable hoster solves it I would expect that either your webserver is running on its edge.
    Also Unity does not redownload the file again and again and again, which is defacto the only thing they could do upon detection that the data are incorrect.
    Thats likely also what flash does given you have flash games in a comparable size which I doubt though. Such corruptions are often a thing of larger files, small files even on many of the really bad hosters, go through without problems.
     
  15. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    hi,

    any news on this?
    my unity3d file is on a CDN but some users are having this issue.

    is it at least possible to catch the error so to show a message like "try to clean your cache"?
     
  16. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    @arioch82: is there any way you can make the webplayer available? It would be very useful in helping to diagnose the problem.
     
  17. arpst0rm

    arpst0rm

    Joined:
    Jan 26, 2011
    Posts:
    8
    Anyone find a solution to this? We are getting a few users getting this error. Clearing cache etc. does nothing to solve the problem.
     
  18. Fooo

    Fooo

    Joined:
    Mar 11, 2011
    Posts:
    41
    We have the same issue. We're deployed on the Akamai CDN. Some users only started seeing this once we went to the CDN.
     
  19. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    I would recommend that anyone who sees this error file a bug report about it, if possible. It is proving very hard to track down and any additional information about it would be useful.
     
  20. Fooo

    Fooo

    Joined:
    Mar 11, 2011
    Posts:
    41
    Filed. If you have any tests you can send us, we can give it to affected users to gather information. I can't see that we can change anything from our side to make this better for the users (besides randomly switching CDNs/file locations).
     
  21. arioch82

    arioch82

    Joined:
    Dec 3, 2009
    Posts:
    253
    we're getting this issue more and more often now.
    as it is an actual game published on facebook we're building a test page for this issue, should i send a pm to you with the link or mail the support?

    we're even having it here in the office with a 20MB line and the unity3d file is stored on a CDN, I don't think it's only a bandwith issue; and anyway with a TCP connection it should always be safe
     
    Last edited: Jun 8, 2011
  22. cherchieh

    cherchieh

    Joined:
    Jun 10, 2011
    Posts:
    1
    training, playing...everything has this error on! and the worst part is, the game that i've missed because of this error will come back to haunt me because i will not score any goal obviously and in the end i lost one match...

    i have bad experience for a lot of things, two times at half time i couldn't continue and is forced to reload the page and in the end the two goals i've scored has been deleted...and some other issues but still acceptable...and now this, what ever bad file length it is...it's getting annoying now...
     
  23. al_biglan

    al_biglan

    Joined:
    Jan 19, 2011
    Posts:
    4
    Agreed with many here. We produce content with Unity for clients with sometimes "iffy" connections. Getting them to upgrade isn't an option. It is frustrating for a 1% problem that isn't reproducible (easily) to diagnose/resolve. Our end users aren't gamers and the error message is cryptic. Would be nice if we (as developers) had the hooks to intercept this and display our own error message (at the absolute minimum) or be able to offer some resiliency in the process.
     
  24. Samson245

    Samson245

    Joined:
    Mar 17, 2014
    Posts:
    2
    I have a piece of info for you guys, even though I have not read through the whole thread yet. The issue is on your side. I can play Red Crucible 2, which is Unity heavy, perfectly fine.
     
  25. Samson245

    Samson245

    Joined:
    Mar 17, 2014
    Posts:
    2
    I guess since this is old, The game Rush Team is having issues with it. If you guys could help them out, I would appreciate it