Page MenuHomePhabricator

TypeError: Argument 2 passed to Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::addLabelUsage() must be of the type string, null given, called in /srv/mediawiki/php-1.37.0-wmf.16/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxCallback.php on line 26
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   TypeError: Argument 2 passed to Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary::addLabelUsage() must be of the type string, null given, called in /srv/mediawiki/php-1.37.0-wmf.16/extensions/Scribunto/in
exception.trace
from /srv/mediawiki/php-1.37.0-wmf.16/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php(176)
#0 /srv/mediawiki/php-1.37.0-wmf.16/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxCallback.php(26): Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary->addLabelUsage(string, NULL)
#1 [internal function]: Scribunto_LuaSandboxCallback->__call(string, array)
#2 /srv/mediawiki/php-1.37.0-wmf.16/extensions/Scribunto/includes/engines/LuaSandbox/LuaSandboxInterpreter.php(113): LuaSandboxFunction->call(LuaSandboxFunction)
#3 /srv/mediawiki/php-1.37.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(297): Scribunto_LuaSandboxInterpreter->callFunction(LuaSandboxFunction, LuaSandboxFunction)
#4 /srv/mediawiki/php-1.37.0-wmf.16/extensions/Scribunto/includes/engines/LuaCommon/LuaModule.php(68): Scribunto_LuaEngine->executeFunctionChunk(LuaSandboxFunction, PPTemplateFrame_Hash)
#5 /srv/mediawiki/php-1.37.0-wmf.16/extensions/Scribunto/includes/common/Hooks.php(128): Scribunto_LuaModule->invoke(string, PPTemplateFrame_Hash)
#6 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(3393): ScribuntoHooks::invokeHook(Parser, PPTemplateFrame_Hash, array)
#7 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(3078): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#8 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#9 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(2992): PPFrame_Hash->expand(PPNode_Hash_Tree)
#10 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#11 /srv/mediawiki/php-1.37.0-wmf.16/extensions/ParserFunctions/includes/ParserFunctions.php(123): PPFrame_Hash->expand(PPNode_Hash_Tree)
#12 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(3393): MediaWiki\Extensions\ParserFunctions\ParserFunctions::if(Parser, PPTemplateFrame_Hash, array)
#13 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(3078): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#14 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#15 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPTemplateFrame_Hash.php(178): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#16 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPTemplateFrame_Hash.php(190): PPTemplateFrame_Hash->getNamedArgument(string)
#17 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(3874): PPTemplateFrame_Hash->getArgument(string)
#18 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPFrame_Hash.php(280): Parser->argSubstitution(array, PPTemplateFrame_Hash)
#19 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(2992): PPFrame_Hash->expand(PPNode_Hash_Tree)
#20 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#21 /srv/mediawiki/php-1.37.0-wmf.16/extensions/ParserFunctions/includes/ParserFunctions.php(146): PPFrame_Hash->expand(PPNode_Hash_Tree)
#22 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(3393): MediaWiki\Extensions\ParserFunctions\ParserFunctions::ifeq(Parser, PPTemplateFrame_Hash, array)
#23 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(3078): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#24 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#25 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(3267): PPFrame_Hash->expand(PPNode_Hash_Tree)
#26 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#27 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(3267): PPFrame_Hash->expand(PPNode_Hash_Tree)
#28 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/PPFrame_Hash.php(263): Parser->braceSubstitution(array, PPFrame_Hash)
#29 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(2916): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#30 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(1584): Parser->replaceVariables(string)
#31 /srv/mediawiki/php-1.37.0-wmf.16/includes/parser/Parser.php(645): Parser->internalParse(string)
#32 /srv/mediawiki/php-1.37.0-wmf.16/includes/content/WikitextContent.php(375): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#33 /srv/mediawiki/php-1.37.0-wmf.16/includes/content/AbstractContent.php(534): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#34 /srv/mediawiki/php-1.37.0-wmf.16/includes/Revision/RenderedRevision.php(266): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#35 /srv/mediawiki/php-1.37.0-wmf.16/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#36 /srv/mediawiki/php-1.37.0-wmf.16/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)
#37 /srv/mediawiki/php-1.37.0-wmf.16/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#38 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#39 /srv/mediawiki/php-1.37.0-wmf.16/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#40 /srv/mediawiki/php-1.37.0-wmf.16/includes/jobqueue/jobs/RefreshLinksJob.php(278): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput(array)
#41 /srv/mediawiki/php-1.37.0-wmf.16/includes/jobqueue/jobs/RefreshLinksJob.php(198): RefreshLinksJob->getParserOutput(MediaWiki\Revision\RevisionRenderer, ParserCache, WikiPage, BufferingStatsdDataFactory)
#42 /srv/mediawiki/php-1.37.0-wmf.16/includes/jobqueue/jobs/RefreshLinksJob.php(136): RefreshLinksJob->runForTitle(Title)
#43 /srv/mediawiki/php-1.37.0-wmf.16/extensions/EventBus/includes/JobExecutor.php(79): RefreshLinksJob->run()
#44 /srv/mediawiki/rpc/RunSingleJob.php(76): MediaWiki\Extension\EventBus\JobExecutor->execute(array)
#45 {main}
Impact
Notes

Event Timeline

mmodell triaged this task as Unbreak Now! priority.Jul 29 2021, 7:24 PM
mmodell added projects: LuaSandbox, Wikibase-Lua.

This is breaking in production, I'm rolling back the train

Legoktm added a subscriber: Legoktm.

Not an issue with LuaSandbox, but the Scribunto_LuaWikibaseEntityLibrary

Change 708642 had a related patch set uploaded (by Legoktm; author: Legoktm):

[mediawiki/extensions/Wikibase@master] Revert \"Add types for files touch in the following commits\"

https://gerrit.wikimedia.org/r/708642

Change 708642 abandoned by Legoktm:

[mediawiki/extensions/Wikibase@master] Revert \"Add types for files touch in the following commits\"

Reason:

Doesn't cleanly apply

https://gerrit.wikimedia.org/r/708642

Change 708834 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/extensions/Wikibase@master] Let language parameter accept null in Scribunto_LuaWikibaseEntityLibrary

https://gerrit.wikimedia.org/r/708834

Change 708644 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[mediawiki/extensions/Wikibase@wmf/1.37.0-wmf.16] Let language parameter accept null in Scribunto_LuaWikibaseEntityLibrary

https://gerrit.wikimedia.org/r/708644

Change 708644 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@wmf/1.37.0-wmf.16] Let language parameter accept null in Scribunto_LuaWikibaseEntityLibrary

https://gerrit.wikimedia.org/r/708644

Mentioned in SAL (#wikimedia-operations) [2021-07-29T20:59:37Z] <ladsgroup@deploy1002> Synchronized php-1.37.0-wmf.16/extensions/Wikibase/client: Backport: [[gerrit:708644|Let language parameter accept null in Scribunto_LuaWikibaseEntityLibrary (T287704)]] (duration: 01m 09s)

Change 708834 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Let language parameter accept null in Scribunto_LuaWikibaseEntityLibrary

https://gerrit.wikimedia.org/r/708834

mmodell lowered the priority of this task from Unbreak Now! to Needs Triage.EditedJul 29 2021, 9:29 PM

The immediate error is resolved. Not sure if there are more code changes needed to call this resolved. At least it's no longer blocking T281157: 1.37.0-wmf.16 deployment blockers

Thanks all for jumping on this and getting the train unblocked in nearly record time!

I think the ticket is done, I leave it to my fellow campers and @Addshore to close it or not. The patch wasn't a band-aid.

Change 708978 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Wikibase@master] Add regression test for Label/Desc usage without lang code

https://gerrit.wikimedia.org/r/708978

Ladsgroup added a subscriber: Ladsgroup.

Michael is writing the regression tests.

Change 708978 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Add regression unit-tests for Label/Desc usage without lang code

https://gerrit.wikimedia.org/r/708978

Change 710049 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/Wikibase@master] Fail safely if language in Lua is not a string

https://gerrit.wikimedia.org/r/710049

Change 710049 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fail safely if language in Lua is not a string

https://gerrit.wikimedia.org/r/710049

What’s left to review here? All the attached Gerrit changes are merged, as far as I can tell.

Ah, in my mind https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/710053 was still associated with this task, but you're right that that patch is just additional cleanup and not really related to guarding against a repetition of this incident. Moving this on to verification.

I’d also be okay with leaving this in peer review, it should just have some sort of link then ^^