Page MenuHomePhabricator

TypeError: userLanguages is null at at wikibase.getUserLanguages.js/</wb.getUserLanguages
Closed, ResolvedPublic

Description

The script at https://www.wikidata.org/w/index.php?title=User:Bargioni/WikiDesc.js runs the code var user_langs = wb.getUserLanguages(); which appears to trigger the above error message.

Not sure if the gadget is missing dependencies or an issue in the code. 72 instances in last 12hrs.

https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.12.10/clienterror/?id=AXZNrLePa1L68BhciPpq

Event Timeline

Change 649825 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Wikibase@master] Don't assume wbUserSpecifiedLanguages is always there

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

Change 649825 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Don't assume wbUserSpecifiedLanguages is always there

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

I think this patch broke our Travis CI: https://travis-ci.org/github/wikimedia/Wikibase/jobs/750050359

3) LuaStandalone: Wikibase\Client\Tests\Integration\DataAccess\Scribunto\Scribunto_LuaWikibaseLibraryTest::testFormatValue
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'userlang'
+'maxIncludeSize'
/home/travis/build/wikimedia/phase3/extensions/Wikibase/client/tests/phpunit/integration/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php:600
/home/travis/build/wikimedia/phase3/includes/parser/ParserOptions.php:1356
/home/travis/build/wikimedia/phase3/includes/parser/ParserOptions.php:140
/home/travis/build/wikimedia/phase3/includes/parser/ParserOptions.php:357
/home/travis/build/wikimedia/phase3/includes/parser/Parser.php:2856
/home/travis/build/wikimedia/phase3/extensions/Wikibase/client/includes/DataAccess/Scribunto/WikitextPreprocessingSnakFormatter.php:57
/home/travis/build/wikimedia/phase3/extensions/Wikibase/client/includes/DataAccess/Scribunto/SnakSerializationRenderer.php:62
/home/travis/build/wikimedia/phase3/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php:715
/home/travis/build/wikimedia/phase3/extensions/Wikibase/client/tests/phpunit/integration/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php:369
/home/travis/build/wikimedia/phase3/tests/phpunit/MediaWikiIntegrationTestCase.php:437
/home/travis/build/wikimedia/phase3/maintenance/doMaintenance.php:106

Wait, that can't be. This patch only changes javascript and this test failure is in PHP. Apparently, it just so happened that on the same patch the language handling started to independently fail 🙃

/me keeps looking somewhere else for the cause

Krinkle assigned this task to thiemowmde.

Change 672596 had a related patch set uploaded (by Tobias Andersson; owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Wikibase@REL1_35] Don't assume wbUserSpecifiedLanguages is always there

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

Change 672596 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@REL1_35] Don't assume wbUserSpecifiedLanguages is always there

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