• Continuing the discussion from This thread has likes enough to hold merry men!:

    @aliceif said:

    And that seems to indeed cause jellypotato.

    @Onyx said:


    A nonsense bug that neither users nor Discodevs can figure out. Currently used to refer to a bug where clicking a user's avatar causes scrolling of the page and/or hijacking of usercard content. It is posible this term might encompass other bugs, but such use has not yet been encountered in the wild.

    Hijacking and you

    Any subsequent usercards you view will have the content of jellypotato causing usercard. While highly entertaining it also causes huge amount of confusion to unsuspecting users.

    Current known jellpotato carriers

    • @aliceif
    • @ChaosTheEternal
    • @tar

    First occurence: A post in /t/1000

    (Just for the sake of having a thread titled "jellypotato...")

    The issue seems to involve the horrible bundle of mis-minification known as _vendor-a597...8ef3.js, and -- if we believe any part of the machinery involved -- is a problem originating inside RequireJS or jQuery replaceText. It's difficult to debug in that environment since there's no meaningful source mapping, no lines to set breakpoints on (only entire libraries, and only when they're first loaded), and no easy way to know which part of a library is responsible for the failure. "Thankfully", Discourse includes its own error reporting, which gives us access to otherwise-unavailable information.

    When you attempt to pop open a usercard, Discourse fetches a JSON describing the content on the card, including the raw and cooked of the user's bio as well as a specially bakéd version that only includes a few lines and strips most formatting. After substituting several elements into the usercard template, Discourse attempts to detect if the the provided bio is too long (exceeds the 60 vertical pixels allocated for that purpose), and runs a script that's supposed to automatically truncate it and add ellipses. For whatever reason, that script fails with a TypeError: h(...).get(...) is undefined, but at an impossible location: _vendor-a597...8ef3.js line 11 > eval:24:1582.

    My understanding, such that it is, is that this is where the jellypotato behavior comes in: Discourse Logster client-side detects that a JS error occurred, and submits information on what happened and where to Discourse Logster server-side. As part of the data collection process, Logster &&'s the tab's location with itself, and -- due to the weirdness of the location object -- inadvertently triggers the browser refreshing the page. Logster finally submits the error. At that point, jQuery AJAX is configured to execute whatever JavaScript is returned, but instead only the barestring OK makes it back. The browser throws another JS error since this can't be executed, and only Logster's lockout timer on reporting multiple errors prevents recursive death.

    @sam: Server-side reporter.rb:28 and client-side logster.js.erb:26 to fix jellypotato behavior. Still unsure what to do about the original auto-truncation error.

    Also, who wants a headache? line 11 > eval:24:1853


    Damn it man, did you just kill it?

    ... I kinda liked having it around. As annoying as it is at times ...

  • By the way, for those who were curious, line 24 of RequireJS (which is line 11 in the vendor bundle) is finalizer(); in the code below:

      function tryFinally(tryable, finalizer) {
        try {
          return tryable();
        } finally {

    Nothing that's anywhere near column 15821853 though.

  • @Onyx said:

    Damn it man, did you just kill it?


    Only until the next regression.

  • That's not what regression means around these parts.

  • Banned

    I think the fix here is to ship an excerpted / cleaned html chunk to client and then shorten it. The excerpting libraries client side seem to be falling over on lots of edge cases.

    I will get the logster bug fixed ... sounds bad.

    Can you repro the weird && behavior?

  • I was wrong about the && behavior; jellypotato seems to be triggering off something else instead (attempt to move to the user page due to user card failure, maybe?). I've done some more detailed investigation with a rested mind and a fresh pot of coffee, and struck through parts of the post above (and updated the stack trace, now with line breaks!).

    I've determined that the line that's causing problems is this one:

    Apparently getLastTextNode is not returning a jQuery object under some circumstances. ¯\(ツ)
    I don't know whether it's the bundle-with-sourceID or the minification, but Firefox's debugger does not want to set breakpoints anywhere near that part of the code, even though it does break it out of the bundle and unminifies it for me.

    You already ship a bio_excerpt in addition to a bio_raw and a bio_cooked, which has no block tags, so maybe use that instead?

  • Banned

    I think this fixes it ... try to see if you can break it on try

    yeah bio_excerpt was good just needed a bit of tweaking to allow newlines.

Log in to reply

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.