Web Player: "Bad File Length"

Hey,

We’ve recently released a Facebook game.

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?

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.

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

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.

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

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.

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.

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.

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.

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.

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.

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)

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.

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.

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”?

@arioch82: is there any way you can make the webplayer available? It would be very useful in helping to diagnose the problem.

Anyone find a solution to this? We are getting a few users getting this error. Clearing cache etc. does nothing to solve the problem.

We have the same issue. We’re deployed on the Akamai CDN. Some users only started seeing this once we went to the CDN.

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.

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).