[10:48:55] [[Tech]]; Bedpage5100; /* Palma - anuncios clasificados de empleos - administrativos y oficina */ new section; https://meta.wikimedia.org/w/index.php?diff=21424139&oldid=21422298&rcid=18122972 [11:27:14] [[Tech]]; 1234qwer1234qwer4; offtopic/spam; https://meta.wikimedia.org/w/index.php?diff=21424203&oldid=21424139&rcid=18123128 [12:09:03] Not sure but it seems LibUp is making duplicate patches? Spotted: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/685420 & https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/685333 which is exact [12:09:11] legoktm: ^^ [14:08:09] xSavitar: uh, not again :( I stopped it for now [14:08:13] thanks for pinging me [16:57:01] legoktm: You're welcome anytime! [20:08:38] Getting JS errors on every page on Commons unless I set &debug=true [20:09:25] https://dpaste.com/3WAJS7E3B [20:11:23] with debug=true there's no error (just a ton of cookie warnings, of course), so I'm guessing it's a caching thing [20:12:23] I tried purging the load.php url but that didn't help [20:15:03] purging the page itself doesn't help either [20:32:25] brennen, Jdlrobson: ^ [20:33:52] hrm. [20:37:26] AntiComposite: could it be a script? Do you see it logged out? [20:37:39] I can't see anything on my phone [20:37:46] And client errors dash hasn't spiked [20:37:50] not while logged out, no [20:37:59] AntiComposite: i can't reproduce and i'm not seeing much in logs, but i'm kind of out of my depth diagnosing client errors [20:38:10] https://grafana.wikimedia.org/d/000000566/overview?viewPanel=16&orgId=1&from=now-6h&to=now [20:38:24] AntiComposite: try disabling scripts you've got on then [20:39:16] not seeing it myself logged in or logged out (tested on Main Page) [20:39:24] again, it doesn't happen with debug mode, which is weird [20:40:02] alright, not coming from my common.js [20:40:13] Debug mode stops scripts and gadgets loading [20:41:00] you sure about that? https://www.mediawiki.org/wiki/Help:Locating_broken_scripts#Identify_the_problems [20:41:23] https://www.mediawiki.org/wiki/ResourceLoader/Architecture#Debug_mode [20:42:40] No I'm mixing debug and safe up [20:43:06] That makes even less sense though [20:43:08] looks like it's coming from mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&bcache=1&maxage=259200&action=raw&ctype=text/javascript'); [20:43:28] It goes away with debug=true, surely it should appear [20:44:56] I don't even see that in preferences under gadgets [20:45:07] it was in my global.js [20:45:14] but it's an enwiki gadget [20:45:32] Oh [20:45:43] Enwiki will be fine until tommorow [20:45:48] What does meta use [20:46:54] try running `mw.loader.load('//en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&bcache=1&maxage=259200&action=raw&ctype=text/javascript');` from a JS console on Commons, see what happens for you [20:47:09] because I can reliably reproduce the error with that [20:47:10] huh, I don't even see arguments in that script [20:48:00] https://commons.wikimedia.org/w/load.php?lang=en&modules=ext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CimpressionDiet%2CkvStore%2CstartUp%7Cext.centralauth.ForeignApi%7Cext.centralauth.centralautologin.clearcookie%7Cext.echo.api%2Cinit%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.uls.common%2Ccompactlinks%2Cinterface%2Cpreferences%2Cwebfonts%7Cext.wikimediaEvents.wikibase%7Cjquery%2Coojs%2Csite%7Cjquery. [20:48:00] client%2Ccookie%2CtextSelection%2Cui%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cstorage%2Cuser%2Cutil%7Cmediawiki.ForeignApi.core%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.ui.button%7Cskins.vector.legacy.js%7Cuser.defaults&skin=vector&version=ptknn [20:48:00] AntiComposite: try load https://meta.wikimedia.org/wiki/MediaWiki:Gadget-markblocked.js [20:48:20] there are a lot of other modules in that URL [20:48:42] https://w.wiki/3HUW [20:49:58] But I'd assume this would spike when the train moves to group2 [20:50:31] RhinosF1, AntiComposite - sounds likely then this should be a train blocker? [20:51:00] RhinosF1, loading the meta one had no error [20:51:03] brennen: client errors are but if AC is right that it's that gadget then the impact is gonna be on enwiki [20:51:10] looks like a bug in the gadget [20:51:17] AntiComposite: they diverge a lot so I'm not half surprised [20:51:24] https://en.wikipedia.org/wiki/MediaWiki:Gadget-markblocked.js#L-214 [20:51:44] Now we just need to find someone who speaks js [20:51:54] is the offending line, markBlocked(container) is returning undefined (as expected, because that function doesn't return any values) [20:52:15] AntiComposite: I assume it's fine on enwiki currently [20:52:20] yes [20:52:20] to clarify: blocker for rolling to group2 [20:52:31] and trying to add `undefined` as a hook is broken [20:52:40] this doesn't seem to be a mediawiki bug as far as I can tell [20:52:48] Skizzerz: did that change this week though? [20:53:00] that gadget has been unchanged since December 2020 [20:53:15] on enwiki [20:54:11] checking for mw.hook changes [20:55:13] brennen: not 100% sure but Jdlrobson probably understands them rules more. I'd say it's more than possible but the rules are based on numbers so it'd be a guess until it happened on whether it would be. [20:55:38] I assume Skizzerz will be able to give us a better idea if they can find a change that causes it [20:56:09] https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/mediawiki.base/mediawiki.base.js$492 is the erroring line in core [20:56:25] mw.hook.add() being passed undefined means that we try to call .apply() on undefined [20:56:36] it's documented as taking a callable, so it's an error with the gadget [20:56:54] That line changed this week Skizzerz [20:57:03] https://phabricator.wikimedia.org/rMWe0a3aa7e58c5f95deb63cbe3dfb2435d5d68cbeb [20:57:11] RhinosF1: ok, thanks. can i ask folks to document on a ticket if releng action's needed? i got a vaccine shot yesterday and my physical ability to stay at the computer is fading fast. [20:57:19] yeah, it's in a try: catch now [20:57:21] yep [20:58:12] so the script's always been doing something it probably shouldn't, but everyone assumed it fine because it didn't throw any errors [20:58:18] shouldn't have meaningfully changed anything though. Wrapping in a try/catch and throwing the error on a delay just prevents a misbehaving gadget from breaking other gadgets [20:58:44] fix is to change the gadget itself (line 214) to: [20:58:55] mw.hook( 'wikipage.content' ).add( function () { markBlocked( container ); } ); [20:59:40] Skizzerz: can you make that? [20:59:42] I don't think anything in core needs to change [20:59:46] agreed [20:59:47] I'm not an interface admin on enwiki, so no :) [20:59:55] anyone know any IAs? [21:00:00] I can put in an edit request I suppose [21:00:21] Amir1: ^ [21:00:27] Does global work? [21:00:38] what terrible thing I have done [21:00:58] Amir1: can you fix an enwiki gadget? [21:01:00] I'm global, if it's not controversial (per policy) I can do it [21:01:28] See what Skizzerz said. Line 214 of Mark blocked needs fixing [21:01:44] https://en.wikipedia.org/wiki/MediaWiki:Gadget-markblocked.js#L-214 [21:01:46] To [21:01:53] 21:58:55 mw.hook( 'wikipage.content' ).add( function () { markBlocked( container ); } ); [21:01:57] Amir1: ^ [21:02:44] ftr there are 6,612 people with markblocked.js on enwiki according to Special:GadgetStatistics [21:03:04] surprised it hasn't been reported before, looking at the talk page [21:03:06] that's a lot of people [21:03:41] Skizzerz: https://en.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js&diff=1021641704&oldid=995951700 [21:03:53] Can you test please? [21:04:03] AntiComposite: ^ [21:04:07] AntiComposite: can you test that out? [21:04:08] confirmed fixed [21:04:15] brennen: solved [21:04:15] does the gadget still operate as expected? [21:04:28] notably try testing on a history page [21:05:15] works on special:log [21:05:26] \o/ [21:05:28] and on history [21:05:33] https://en.wikipedia.org/wiki/Special:Log/block [21:05:36] thanks all [21:05:36] awesome! [21:05:43] Does it throw exception in console.log? [21:05:51] Not anymore [21:05:58] AC confirmed that [21:05:59] back to previous behavior [21:06:06] \o/ [21:06:10] oh, let me check logstash then, hope it reduces the logspam [21:06:15] (no execption, no giant red error, script works as expected) [21:07:15] someone should probably mwgrep to see if it's been copied to other wikis [21:07:47] * legoktm does [21:08:21] 39 wikis [21:08:44] YAY [21:08:50] https://phabricator.wikimedia.org/P15789 [21:08:52] I can fix all [21:09:06] maybe some of these can be converted to just hotlink from enwp? [21:09:26] hotlink plus l10n [21:09:30] I'm not allowed to do such change, it's "controversial" [21:09:53] maybe posting a talk page asking people to do it would be nicce [21:10:12] also in that case, it should use one in meta (like hotcat) plus i18n [21:10:21] fun stuff [21:11:36] Making sure the train doesn't send icinga moaning about client errors is probably better first [21:11:45] But that would be better in future [21:12:23] most of the other wikis will have a version predating https://en.wikipedia.org/w/index.php?title=MediaWiki%3AGadget-markblocked.js&diff=prev&oldid=987495425 [21:12:50] too old to be broken. Classic [21:13:31] then you have things like https://ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-markblocked.js#L-206 where they use a function that just calls a single function :) [21:13:53] AntiComposite: I mean, that's basically what my fix is now doing :) [21:15:22] "it's not redundant it's just future-proofing" [21:15:26] with how it's currently written, container is guaranteed to be undefined on that line, so there's no difference on enwiki between calling markBlocked() vs markBlocked(container). I left it as the latter because it required a smaller change to implement a fix, and allows for future-proofing should container somehow get defined [21:15:37] :P [21:17:30] it's not guaranteed to be undefined, it's just undefined on every page that isn't a mainspace diff [21:17:59] on line 214, container is guaranteed to be undefined [21:18:42] unless some other script defines it [21:19:04] which iirc would require operating in debug=true mode to avoid ResourceLoader wrapping the gadget in an IIFE [21:21:28] no, it's defined in the case statement [21:21:44] in ns0 [21:21:45] ahhh you're right. I didn't notice the fallthrough [21:22:05] * AntiComposite did check in a debugger to make sure I wasn't reading it wrong [21:26:18] I'm currently super busy with some stuff, if I can do some changes, ping me and I do it [21:30:41] It has no user impact whatsoever [21:30:46] It's pure log spam [21:31:05] It's just letting people know now gadget does stupid thing [21:31:25] Instead of failing silently [21:32:38] well, I'd count "giant red error boxes on basically every page" as user impact [21:32:55] It's only in console though ain't it [21:33:00] no [21:33:51] js errors cause https://www.mediawiki.org/wiki/Bubble_notifications now [21:34:18] but I'm 1/3 through legoktm's list and haven't found anything [21:34:38] because the're all using outdated versions? [21:34:46] should I grep for markBlocked\(container instead? [21:34:58] Ah [21:35:20] probably would make more sense [21:35:22] It'll be fixed anyway between you guys I guess before train [21:35:43] most are using ruwiki-like or meta-like versions [21:35:47] AntiComposite: just enwiki, srwiki, zhwiki [21:35:54] for markBlocked\(container [21:37:57] that seems about right [21:39:01] all three are group2 as well, so no user impact on those wikis until the train rolls tomorrow