It looks like webclient.dart.js is included twice when it fails. @LummoxJR: Can this be the cause?

EDIT: Yeah, better reopen this one. The error definitely seems to be coming from the 2nd webclient.dart.js script.

Is there a quick fix for this? It's really annoying to develop like this, there's a 70/30 chance of getting the error condition so I keep having to reconnect over and over.
Workaround:

1. Open "c:\Program Files (x86)\BYOND\web\webclient.dart.js" in a text editor. (The path may be different depending on your OS and what you chose during installation.)

2. At the TOP of the file add the following bit:
var WORKAROUND_BYOND_BUG_1980108;

if (!WORKAROUND_BYOND_BUG_1980108)
{
WORKAROUND_BYOND_BUG_1980108 = true;


3. At the BOTTOM of the file add the following bit:
}


4. Save the file. Note that this requires administrator privileges on Windows 8 or higher - run Notepad in administrator mode.

This temporarily solves the issue until the next update.
Included twice? That's bizarre. That shouldn't be happening at all.
Lummox JR changed status to 'Open'
"WORKAROUND_BYOND_BUG_1980108"

I love arbitrary bug numbers like this. It makes it look like you've got nearly two million bug work arounds.
In response to Rushnut
Rushnut wrote:
"WORKAROUND_BYOND_BUG_1980108"

I love arbitrary bug numbers like this. It makes it look like you've got nearly two million bug work arounds.

;-)

Note that it does work: id:1980108
NQ, do you by any chance have two different .dart.js files in your BYOND/web directory?

I ask because there's really no way that sending the script twice should ever happen. When the /play page is generated by your server it includes all .dart.js files first, then all .js files in the web dir. It explicitly does not allow double-inclusion. This would also explain the bizarre line numbers you got, which bear no relation to anything used by current builds.
I'm sorry to tell you this, but I only have one "webclient.dart.js" file in "c:\Program Files (x86)\BYOND\web".



Have you considered:
- case-sensitivity of the files being looked up?
- byond caching issue (i.e., file stored in .flash.rsc file that's causing the duplicate)?
- maybe the file is included from byond.com somehow?
- asynchronous javascript loader? since the problem only sometimes occurs maybe it's the same problem I had with jQuery
Case-sensitivity isn't an issue, and there's no way a file in the .rsc would contribute to the files being sent in the source. But I do wonder if maybe some code in the webclient is seeing its own script tag as something it needs to deal with and load later. I'll see if I can find any info.
I'm not finding any way that the webclient.dart.js script can be included twice.

I'd like if you could take a look at the elements in the iframe; this will require you to remove the workaround so you know the problem has occurred. When it happens, open up the developer tools in your browser and go into the iframe. The <head> element should contain a number of scripts, the first of which is webclient.dart.js; the next should be ext.js. After that you should see a number of other scripts, and webclient.dart.js is not supposed to be in there anywhere else. (Nor should it show up anywhere in the document body.) If you do see it anywhere else, please let me know what you see and where. Screenshots of the dev tools may be helpful in that case.
Just chiming in:

I'm getting this issue as well, though mostly (exclusively, even - have not experienced this while actually hosting a game) while testing locally.

http://www.byond.com/rsc/video-js/videojs.ads.css Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
webclient.dart.js:37248 Uncaught SyntaxError: Unexpected identifier


It happens sporadically and isn't possible to reproduce on my end. It is VERY annoying, though.

EDIT: Workaround thus far seems to work, though!
When it does happen (I suggest altering the workaround so it spits something out to console.log() if it triggers), I'd like if you could get the info I requested then about what script tags you find in the document and where.

The server code is very explicitly only including this file once, so I have no idea what could be pulling it in a second time. The webclient code asynchronously loads any scripts it finds in the .dms skin and the controls, but at no point should it be loading webclient.dart.js again either.
So, this might actually be a browser bug.


If I attempt to join normally after some time has past, it doesn't work.

If I hit f5 with the console closed, no matter how many times, it doesn't work.

If I hit f5 with the console open, it works some times,

If I hit control+f5(reload without using cache) with or without the console open, it always works.
I wonder if it's reloading the iframe improperly.
Page: 1 2