Page MenuHomePhabricator

Wikibase Lexeme QUnit test failures (ReferenceError: wikibase is not defined)
Closed, ResolvedPublic

Description

Seen on https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-noselenium-docker/9025/consoleFull from https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikisource/+/595794/

02:40:44 ReferenceError: wikibase is not defined
02:40:44     at tests/qunit/services/ItemLookup.tests.js (http://localhost:9876/load.php?modules=WikibaseLexeme.tests%7CWikibaseLexeme.tests.ControllerViewFactory%2CFormChanger%2CGrammaticalFeatureListWidget%2CItemLookup%2CLanguageFromItemExtractor%2CLexemeDeserializer%2CLexemeLanguageFieldObserver%2CLexemeRevisionStore%2CSenseChanger%2CViewFactoryFactory%7CWikibaseLexeme.tests.datamodel.Lexeme%7CWikibaseLexeme.tests.serialization.FormSerializer%2CSenseSerializer%7Ccolor-picker%2CdataValues%2CdiffMatchPatch%2Cdompurify%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.articleplaceholder.createArticle%7Cext.centralauth.ForeignApi%7Cext.cite.style%2Cstyles%2CvisualEditor%7Cext.cite.visualEditor.core%2Cdata%7Cext.eventLogging%7Cext.eventLogging.debug%7Cext.templateDataGenerator.data%7Cext.uls.common%2Ci18n%2Cinit%2Clanguagenames%2Cmediawiki%2Cmessages%2Cpreferences%7Cext.visualEditor.data%2CmoduleIcons%2CmoduleIndicators%7Cjquery.animateWithEvent%2Cclient%2Ccolor%2Ccookie%2ChighlightText%2Ci18n%2Cinputautoexpand%2ClengthLimit%2CmakeCollapsible%2Csuggestions%2Ctablesorter%2CtextSelection%2Cthrottle-debounce%2Ctipsy%2Cui%2Culs%2Cvalueview%7Cjquery.event.special.eachchange%7Cjquery.makeCollapsible.styles%7Cjquery.tablesorter.styles%7Cjquery.ui.commonssuggester%2Clanguagesuggester%2Csuggester%7Cjquery.uls.data%2Cgrid%7Cjquery.util.getDirectionality%7Cjquery.valueview.Expert%2CExpertExtender%2CExpertStore%7Cjquery.valueview.experts.CommonsMediaType%2CEmptyValue%2CGeoShape%2CGlobeCoordinateInput%2CMonolingualText%2CQuantityInput%2CStringValue%2CTabularData%2CTimeInput%2CUnDeserializableValue%7Cjquery.valueview.tests.MockViewState%2CtestExpert%7Cjquery.wikibase.entitysearch.tests%7Cjquery.wikibase.entityselector%2Csiteselector%2Cwbtooltip%7Cjquery.wikibase.siteselector.tests%7Cjquery.wikibase.toolbar.styles%7Cjquery.wikibase.wbtooltip.tests%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CString%2CTitle%2CUpload%2CUri%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%7Cmediawiki.Upload.BookletLayout&version=duvqj:65:388)
02:40:44     at runScript (http://127.0.0.1:9412//index.php?title=Special:JavaScriptTest/qunit/export:13:747)
02:40:44     at execute (http://127.0.0.1:9412//index.php?title=Special:JavaScriptTest/qunit/export:15:120)
02:40:44     at doPropagation (http://127.0.0.1:9412//index.php?title=Special:JavaScriptTest/qunit/export:7:631)
02:40:44 Chrome Headless 73.0.3683.75 (Linux x86_64) LOG: 'Exception in module-execute in module WikibaseLexeme.tests.LanguageFromItemExtractor:'
02:40:44 Chrome Headless 73.0.3683.75 (Linux x86_64) WARN: ReferenceError: wikibase is not defined
02:40:44 ReferenceError: wikibase is not defined
02:40:44     at tests/qunit/services/LanguageFromItemExtractor.tests.js (http://localhost:9876/load.php?modules=WikibaseLexeme.tests%7CWikibaseLexeme.tests.ControllerViewFactory%2CFormChanger%2CGrammaticalFeatureListWidget%2CItemLookup%2CLanguageFromItemExtractor%2CLexemeDeserializer%2CLexemeLanguageFieldObserver%2CLexemeRevisionStore%2CSenseChanger%2CViewFactoryFactory%7CWikibaseLexeme.tests.datamodel.Lexeme%7CWikibaseLexeme.tests.serialization.FormSerializer%2CSenseSerializer%7Ccolor-picker%2CdataValues%2CdiffMatchPatch%2Cdompurify%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.articleplaceholder.createArticle%7Cext.centralauth.ForeignApi%7Cext.cite.style%2Cstyles%2CvisualEditor%7Cext.cite.visualEditor.core%2Cdata%7Cext.eventLogging%7Cext.eventLogging.debug%7Cext.templateDataGenerator.data%7Cext.uls.common%2Ci18n%2Cinit%2Clanguagenames%2Cmediawiki%2Cmessages%2Cpreferences%7Cext.visualEditor.data%2CmoduleIcons%2CmoduleIndicators%7Cjquery.animateWithEvent%2Cclient%2Ccolor%2Ccookie%2ChighlightText%2Ci18n%2Cinputautoexpand%2ClengthLimit%2CmakeCollapsible%2Csuggestions%2Ctablesorter%2CtextSelection%2Cthrottle-debounce%2Ctipsy%2Cui%2Culs%2Cvalueview%7Cjquery.event.special.eachchange%7Cjquery.makeCollapsible.styles%7Cjquery.tablesorter.styles%7Cjquery.ui.commonssuggester%2Clanguagesuggester%2Csuggester%7Cjquery.uls.data%2Cgrid%7Cjquery.util.getDirectionality%7Cjquery.valueview.Expert%2CExpertExtender%2CExpertStore%7Cjquery.valueview.experts.CommonsMediaType%2CEmptyValue%2CGeoShape%2CGlobeCoordinateInput%2CMonolingualText%2CQuantityInput%2CStringValue%2CTabularData%2CTimeInput%2CUnDeserializableValue%7Cjquery.valueview.tests.MockViewState%2CtestExpert%7Cjquery.wikibase.entitysearch.tests%7Cjquery.wikibase.entityselector%2Csiteselector%2Cwbtooltip%7Cjquery.wikibase.siteselector.tests%7Cjquery.wikibase.toolbar.styles%7Cjquery.wikibase.wbtooltip.tests%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CString%2CTitle%2CUpload%2CUri%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%7Cmediawiki.Upload.BookletLayout&version=duvqj:67:257)
02:40:44     at runScript (http://127.0.0.1:9412//index.php?title=Special:JavaScriptTest/qunit/export:13:747)
02:40:44     at execute (http://127.0.0.1:9412//index.php?title=Special:JavaScriptTest/qunit/export:15:120)
02:40:44     at doPropagation (http://127.0.0.1:9412//index.php?title=Special:JavaScriptTest/qunit/export:7:631)
02:40:44 Chrome Headless 73.0.3683.75 (Linux x86_64) LOG: 'Exception in module-execute in module WikibaseLexeme.tests.LexemeLanguageFieldObserver:'
02:40:44 Chrome Headless 73.0.3683.75 (Linux x86_64) WARN: ReferenceError: wikibase is not defined
02:40:44 ReferenceError: wikibase is not defined
02:40:44     at tests/qunit/special/formHelpers/LexemeLanguageFieldObserver.tests.js (http://localhost:9876/load.php?modules=WikibaseLexeme.tests%7CWikibaseLexeme.tests.ControllerViewFactory%2CFormChanger%2CGrammaticalFeatureListWidget%2CItemLookup%2CLanguageFromItemExtractor%2CLexemeDeserializer%2CLexemeLanguageFieldObserver%2CLexemeRevisionStore%2CSenseChanger%2CViewFactoryFactory%7CWikibaseLexeme.tests.datamodel.Lexeme%7CWikibaseLexeme.tests.serialization.FormSerializer%2CSenseSerializer%7Ccolor-picker%2CdataValues%2CdiffMatchPatch%2Cdompurify%7CdataValues.DataValue%2CTimeValue%2Cvalues%7Cext.articleplaceholder.createArticle%7Cext.centralauth.ForeignApi%7Cext.cite.style%2Cstyles%2CvisualEditor%7Cext.cite.visualEditor.core%2Cdata%7Cext.eventLogging%7Cext.eventLogging.debug%7Cext.templateDataGenerator.data%7Cext.uls.common%2Ci18n%2Cinit%2Clanguagenames%2Cmediawiki%2Cmessages%2Cpreferences%7Cext.visualEditor.data%2CmoduleIcons%2CmoduleIndicators%7Cjquery.animateWithEvent%2Cclient%2Ccolor%2Ccookie%2ChighlightText%2Ci18n%2Cinputautoexpand%2ClengthLimit%2CmakeCollapsible%2Csuggestions%2Ctablesorter%2CtextSelection%2Cthrottle-debounce%2Ctipsy%2Cui%2Culs%2Cvalueview%7Cjquery.event.special.eachchange%7Cjquery.makeCollapsible.styles%7Cjquery.tablesorter.styles%7Cjquery.ui.commonssuggester%2Clanguagesuggester%2Csuggester%7Cjquery.uls.data%2Cgrid%7Cjquery.util.getDirectionality%7Cjquery.valueview.Expert%2CExpertExtender%2CExpertStore%7Cjquery.valueview.experts.CommonsMediaType%2CEmptyValue%2CGeoShape%2CGlobeCoordinateInput%2CMonolingualText%2CQuantityInput%2CStringValue%2CTabularData%2CTimeInput%2CUnDeserializableValue%7Cjquery.valueview.tests.MockViewState%2CtestExpert%7Cjquery.wikibase.entitysearch.tests%7Cjquery.wikibase.entityselector%2Csiteselector%2Cwbtooltip%7Cjquery.wikibase.siteselector.tests%7Cjquery.wikibase.toolbar.styles%7Cjquery.wikibase.wbtooltip.tests%7Cmediawiki.ForeignApi%2CForeignStructuredUpload%2CForeignUpload%2CString%2CTitle%2CUpload%2CUri%7Cmediawiki.ForeignApi.core%7Cmediawiki.ForeignStructuredUpload.BookletLayout%7Cmediawiki.Upload.BookletLayout&version=duvqj:76:908)
02:40:44     at runScript (http://127.0.0.1:9412//index.php?title=Special:JavaScriptTest/qunit/export:13:747)
02:40:44     at execute (http://127.0.0.1:9412//index.php?title=Special:JavaScriptTest/qunit/export:15:120)
02:40:44     at doPropagation (http://127.0.0.1:9412//index.php?title=Special:JavaScriptTest/qunit/export:7:631)

Event Timeline

Reedy created this task.May 12 2020, 2:30 AM
Restricted Application added a project: Wikidata. · View Herald TranscriptMay 12 2020, 2:30 AM

Doesn’t seem to happen all the time, a recheck on that change was successful. No idea yet how common the error is.

Hm, it looks like the WikibaseLexeme.tests.ItemLookup ResourceLoader module (see src/WikibaseLexemeHooks.php) doesn’t declare any dependencies, but still accesses the wikibase global. But TBH I’m not sure why it does that? It doesn’t seem to use it at all.

Change 595882 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] Remove unused reference to wikibase global in test

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

Change 595884 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] Remove unused wikibase global from more tests

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

Change 595882 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Remove unused reference to wikibase global in test

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

Change 595884 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Remove unused wikibase global from more tests

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

Lucas_Werkmeister_WMDE closed this task as Resolved.May 12 2020, 3:13 PM
Lucas_Werkmeister_WMDE claimed this task.

I think we can close this, please reopen if you see it happening again.

Lucas_Werkmeister_WMDE renamed this task from Wikibase Lexeme test failures to Wikibase Lexeme QUnit test failures (ReferenceError: wikibase is not defined).May 12 2020, 3:14 PM