ID:1980108
 
BYOND Version:509.1313
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 46.0.2490.80
Applies to:Webclient
Status: Open

Issue hasn't been assigned a status value.
Descriptive Problem Summary:
Connecting to my local server using the webclient fails occasionally. I don't see a red progress bar at the bottom of the page and the loader is stuck forever.

Reloading the page seems to solve the problem.

I'm testing Google Chrome, which also shows a syntax error:

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
Try testing without extensions (incognito mode or another browser). That error code is often given when running adblock or similar, although the fact that it apparently blocks loading completion silently is dumb.

It's also weird that a reload fixes it but hey whatever.
~The web~
I am using AdBlock so that could be the cause. Of course, I'd prefer not to alienate my players by telling them to disable it, so a warning message or fix would be nice.

Note that I'm connecting locally though (via 127.0.0.1) and I'm a BYOND Member, so ads shouldn't apply in my case.
It sounds like certain ad-related resources are trying to load regardless.

Anyway yes the fix is not to tell users to turn off adblock yourself, but for lummox to either:
1. Prevent failed-to-load ad resources from blocking game load (potentially not a good idea for revenue reasons).
2. Load ads in a different way that doesn't cause adblocker conflicts.
3. Handle the blocking non-silently by displaying a message to the user to turn off adblock (gross).

Edit: I do want to note I haven't tested this issue at all and it could be something entirely unrelated! I'm kinda just spitballing here I guess.
This line is not ad-related:

webclient.dart.js:37248 Uncaught SyntaxError: Unexpected identifier

The resource failing to load comes from adblock, but it's not the cause of your syntax error. When you click on the information, does Chrome give you a stack trace on where the error came from?

I've looked at line 37248 myself, but it can't be the cause of this error as far as I can see. In 1312 and 1313 the webclient.dart.js file is the same, and that line is entirely innocuous.
Unfortunately the problem is difficult to reproduce. Refreshing the browser (even with CTRL-F5) does not seem to reproduce the issue.

When I manage to reproduce I'll add it to this issue.
I have another thought here. Are you using any custom controls?

You've had an issue with script loading being asynchronous. That error might be printed out by a catch() in the webclient code as it's loading a control. A syntax error makes perfect sense if the control is relying on a script that hasn't loaded yet. This might simply be more fallout from the async load.
Yes, I'm using a custom output control... But wouldn't it either always fail, or always succeed?
No. The timing with which the other JavaScript loaded would make a big difference. Intermittent failure would be perfectly consistent with the results you're getting.
Right, asynchronous. Whoops.
I'm gonna close this as a non-issue since it ties in with the synchronicity thing.
Lummox JR resolved issue (Not a bug)
might want to re-open it,

/tg/ is getting it for the webclient and we don't have anything webclient custom.

(i know we have custom interface controls, but they are for DS and i'd assume the webclient could load them fine)

Edit:
http://byond.com/play/game.tgstation13.org:1337 (note, this is an active production server, webclient requires byond membership to cut back on ban evasion via the web client not having a real cid)

Chrome 47.0.2526.27

Happens on first load in a tab, but not after reloading.
What's the exact error you're getting, MSO?
I was pretty sure it was the same line number, but checking now, that doesn't seem to be the case.

It seems to happen on first load after some time, like an hour or so.

So I'm thinking it's something cache related, or cache allowing something to load faster.

I finally got it to happen with debugging tools open (chrome only stores stack info if the error happens while debugging tools are open) Since it only happens on first load, I would always forget.

Uncaught SyntaxError: Unexpected identifier(anonymous function) @ webclient.dart.js:58(anonymous function) @ webclient.dart.js:37368

(1313)
Oddly 37368 also doesn't make sense as an origin for this bug. But I'll see what I can do in the next release to make these control initialization errors clearer.
Uncaught SyntaxError: Unexpected identifier(anonymous function) @ webclient.dart.js:58(anonymous function) @ webclient.dart.js:37368

Line 58 is "init();" so that doesn't seem to help very much.
line 37368 is the end of the file, so that is also no help.
Line 58 probably refers to the control's script.
It is reproducible for now. Hm.
EDIT: After closing the inspect element screen it runs again. Hmm.
EDIT: And now it keeps failing again, even with inspect element closed.
Page: 1 2