Can't create games (multiple browsers)

Possibly related to Cannot create new game since a few days

Affected browsers

  • Chrome 37.0.2062.117 (Android 4.4.2)
  • Chrome 41.0.2272.101 (64-bit Ubuntu Linux)
  • Firefox 36.0.4 (ditto)

The bug comes up whenever I click a button to create a game, challenge a player, etc. Basically, anything that would open the new game dialog. When I click the button, nothing happens. I do, however, see messages in the developer console (see below). It looks like an object attribute that the button expects to call as a function is undefined.

This doesn’t always happen with every browser all the time; occasionally, I’ll be able to start a game, but there’s a lot of inconsistency with regards to when and with which browsers I can start games.

Chrome console message:

TypeError: undefined is not a function
at q.n.challenge (ogs.4.2-501-g8147904.min.js:1638)
at ve.functionCall (ogs.4.2-501-g8147904.min.js:556)
at ogs.4.2-501-g8147904.min.js:659
at q.$get.q.$eval (ogs.4.2-501-g8147904.min.js:481)
at q.$get.q.$apply (ogs.4.2-501-g8147904.min.js:481)
at HTMLButtonElement. (ogs.4.2-501-g8147904.min.js:659)
at HTMLButtonElement.u.event.dispatch (ogs.4.2-501-g8147904.min.js:272)
at HTMLButtonElement.b.dispatch (ogs.4.2-501-g8147904.min.js:1063)
at HTMLButtonElement.u.event.add.r.handle (ogs.4.2-501-g8147904.min.js:266)ogs.4.2-501-g8147904.min.js:456 (anonymous function)ogs.4.2-501-g8147904.min.js:430 $getogs.4.2-501-g8147904.min.js:481 $get.q.$applyogs.4.2-501-g8147904.min.js:659 (anonymous function)ogs.4.2-501-g8147904.min.js:272 u.event.dispatchogs.4.2-501-g8147904.min.js:1063 b.dispatchogs.4.2-501-g8147904.min.js:266 u.event.add.r.handle

Firefox console message:

Error: b.challenge is not a function

Just to get a bit more information that might help the Devs:

  • When did this start?
  • Which version of Ubuntu? Are you current with the patches?
  • Which desktop environment are you using?
  • Is your system on a network or directly connected to the Internet?
  • Do you connect to OGS through a proxy?

For Android:

  • Which device(s) are you using?

This started… probably in the past month or two? I didn’t mark it down initially, figuring it was momentary, but it’s gone from “sometimes, one of my browsers” to “usually, all of my browsers”.

I’m running Ubuntu 14.04 with the browser versions listed above (14.04 was an LTS release, and I’m current with the Ubuntu repos for each up to maybe a week ago), and 12.04 with potentially different versions of both browsers. If I’m recalling correctly, the issue has manifested in all four cases, but Firefox on 12.04 /might/ have been immune thus far. I’ll test it later today.

In both cases, I’m running the Awesome window manager on top of a GNOME environment.

Both desktop machines are connected to the Internet through routers over HTTPS, and I personally manage the certificates, so I’m pretty sure I’m not under a weirdly specific MITM attack. No proxying was involved.

The Android device is a Droid Razr M.

This problem is usually solved by clearing out cookies.

filler filler filler

FYI we’re looking into this, you’re not the only one with this issue by any means.

Clearing cookies worked in the meantime (thanks, crodgers), though it’s a pain logging in repeatedly.

1 Like

@chickadee or anyone else who can replicate this bug, if you’re interested in helping me debug a little, next time you get it into this state of not being able to challenge, can you do the following two things and let me know the results?

  1. Can you click on a user to bring up the little action box, then click the circle with a slash in it. Ideally this would pop up a dialog box that allows you to ignore chats from this user. Can you let me know whether this pops up for you, or if it gives you a similar error?

  2. In the javascript console, can copy and paste the following lines, then paste me the results?

console.log("challenge", !!window['challenge']);
console.log("challenge_modal_controller", !!window['challenge_modal_controller']);
console.log("announcement_controller", !!window['announcement_controller']);
console.log("accept_open_challenge_modal_controller", !!window['accept_open_challenge_modal_controller']);
console.log("openAcceptDialog", !!window['openAcceptDialog']);

That will help a lot in getting to the bottom of this, thanks!

1 Like

I believe this has been fixed, but I was never able to confirm it myself it’s just based on speculation. Please let me know if you see it again.

@anoek it hasn’t shown up again, but I’ll certainly pop back in here with more information if it reemerges.

Also, I had no idea JS uses double bangs to cast to boolean. That’s charming as hell.

1 Like

I’ve seen the same issue on my PC: I have Firefox 38.0.1 on Win 7 Enterprise. No response when I click on until I clear cookies and login to OGS again. The problem doesn’t happen when I try to create a game from IE 11. I’d gladly send you some javascript console info, but I don’t know how to get it to show. I’m ticked from the configuration app, to no avail.

…and just checked again on IE…no pop-up when trying to select the “ignore chats from this user” icon.

Firefox’s console log in response to “ignore chat”

Object { originalEvent: mousedown, type: “mousedown”, isDefaultPrevented: q(), timeStamp: 4438166, jQuery210028008427319314544: true, toElement: undefined, screenY: 205, screenX: 1242, pageY: 87, pageX: 1242, 21 more… } ogs.4.2-537-g174383a.min.js:2169:256
ReferenceError: openBlockPlayerControls is not defined

Any use? What else can I do to help?

1 Like

The problem reemerged, after lo these months. Firefox 38.0 on Ubuntu 14.04, awesome window manager, 64-bit architecture.

Stack trace:

Error: b.challenge is not a function

The block user widget does not come up.

Debug text:

console.log("challenge", !!window['challenge']);
console.log("challenge_modal_controller", !!window['challenge_modal_controller']);
console.log("announcement_controller", !!window['announcement_controller']);
console.log("accept_open_challenge_modal_controller", !!window['accept_open_challenge_modal_controller']);
console.log("openAcceptDialog", !!window['openAcceptDialog']);

"challenge" false
"challenge_modal_controller" true
"announcement_controller" true
"accept_open_challenge_modal_controller" true
"openAcceptDialog" false

Fixed in the latest patch! (4.2-636)


Thanks to the OGS team who helped with the interim workaround and the final fix…marvellous job, chaps… !