Page MenuHomePhabricator

Error: Unknown widget type: id: namespace, class: mw.widgets.NamespaceInputWidget
Closed, InvalidPublicPRODUCTION ERROR

Description

Error
normalized_message
Error: Unknown widget type: id: namespace, class: mw.widgets.NamespaceInputWidget
stack trace
at OO.ui.Element.static.unsafeInfuse https://en.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=1bff4:151:990
at OO.ui.Element.static.infuse https://en.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=1bff4:150:569
at conditionGetField https://en.wikipedia.org/wiki/Special:Contributions/WebbfactZAR line 10 > injectedScript:454:399
at conditionParse https://en.wikipedia.org/wiki/Special:Contributions/WebbfactZAR line 10 > injectedScript:455:393
at https://en.wikipedia.org/wiki/Special:Contributions/WebbfactZAR line 10 > injectedScript:457:33
at https://en.wikipedia.org/wiki/Special:Contributions/WebbfactZAR line 10 > injectedScript:456:986
at each https://en.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=1bff4:5:285
at each https://en.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=1bff4:3:93
at https://en.wikipedia.org/wiki/Special:Contributions/WebbfactZAR line 10 > injectedScript:456:721
at fire https://en.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=1bff4:46:934
at add https://en.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=1bff4:47:454
at https://en.wikipedia.org/wiki/Special:Contributions/WebbfactZAR line 10 > injectedScript:456:697
at fire https://en.wikipedia.org/wiki/Special:Contributions/WebbfactZAR line 10 > injectedScript:763:636
at https://en.wikipedia.org/wiki/Special:Contributions/WebbfactZAR line 10 > injectedScript:451:1499
at mightThrow https://en.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=1bff4:49:881
at Deferred/then/resolve/</process< https://en.wikipedia.org/w/load.php?lang=en&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=vector&version=1bff4:50:544
Impact

211 errors in last 12 hours. Seems to mostly be affecting the /wiki/Special:Contributions path on de, ja, and en wikis.

Notes

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle subscribed.

This is an issue with the mw.widgets modules in MW core that uses OOUI, or possibly a bug in OOUI itself.

It does not relate to OOjs core.

matmarex subscribed.

Probably a bug in the HTMLForm code using OOUI, rather than OOUI itself. Looks like we're not loading the required dependency to infuse a mw.widgets.NamespaceInputWidget.

It's probably a bug in one of my patches: in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/789260 I refactored some dependency loading code to fix hide-if handling for some fields, and in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/788821 I used it on Special:Contributions.

I can't reproduce this, and the volume seems low, so I'll look into it next week.

Logstash query for "Unknown widget type: id: namespace, class: mw.widgets.NamespaceInputWidget": https://logstash.wikimedia.org/goto/e352a9ab59451d9e68957b763bfeac3d

image.png (539×2 px, 44 KB)

Actually, the stack traces I see in Logstash are impossible (I don't want to copy-paste here, since they include usernames in the URL). They show conditionGetField() calling OO.ui.Element.static.infuse(), but the current code after 789260 doesn't do that. It looks like the affected users are somehow seeing the old version of the code. This looks like some kind of a cache invalidation issue.

Krinkle triaged this task as Medium priority.Jul 5 2022, 6:40 PM

Well, it stopped happening a month ago… Guess we'll never know what was wrong with the caching.

image.png (516×2 px, 57 KB)