Page MenuHomePhabricator

Client: Error: invalid entity serialization
Closed, ResolvedPublic8 Estimated Story PointsPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.10

message
Error: invalid entity serialization
trace
at value URL1:845:504
at URL1:839:92
at fire URL1:144:214
at fireWith URL1:145:406
at URL1:945:1755
at fire URL1:144:214
at fireWith URL1:145:406
at done URL1:227:106
at URL1:230:601

URL1: https://m.wikidata.org/w/load.php?lang=en&modules=ext.centralNotice.choiceData%2Cdisplay%2CgeoIP%2CkvStore%2CstartUp%7Cext.centralauth.centralautologin%7Cext.eventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.uls.common%2Ci18n%2Clanguagenames%2Cmediawiki%2Cmessages%7Cext.wikimediaEvents.wikibase%7Cjquery%2Coojs%2Coojs-router%2Csite%2Cvue%2Cwikibase%7Cjquery.client%2Ccookie%2Ci18n%2Cthrottle-debounce%2Culs%7Cjquery.uls.data%2Cgrid%7Cmediawiki.String%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Crouter%2Cstorage%2Ctemplate%2Cuser%2Cutil%2Cviewport%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.template.mustache%7Cmediawiki.ui.anchor%7Cmobile.init%2Cstartup%7Cmobile.messageBox.styles%7Cmobile.ooui.icons%7Cmobile.pagelist.styles%7Cmobile.pagesummary.styles%7Cmobile.placeholder.images%7Cmobile.startup.images%7Cmw.config.values.wbRepo%7Cskins.minerva.icons.images.scripts%7Cskins.minerva.icons.images.scripts.misc%7Cskins.minerva.icons.page.issues.default.color%7Cskins.minerva.icons.page.issues.medium.color%7Cskins.minerva.icons.page.issues.uncolored%7Cskins.minerva.options%2Cscripts%7Cuser.defaults%7Cutil.ContentLanguages%2Cinherit%7Cwikibase.WikibaseContentLanguages%2CgetLanguageNameByCode%2CgetUserLanguages%2Cmobile%2Ctermbox%7Cwikibase.entityPage.entityLoaded&skin=minerva&version=1fll4

Impact

  • About 160 events per 24 hours?
  • Doesn't seem to affect user experience directly, but an unneeded module is being loaded (i.e. termbox)

Notes

  • Errors happen when opening a Lexeme page, and on mobile version of the page only
  • Example Logstash document: https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.10.07/clienterror/?id=AXUDJ5Yv1pGl6xFMAuJ-
  • Very similar to the error we saw in T263982, that was created by T261488 and fixed by T264066.
  • What this probably needs is to make sure that the new termbox is only loaded for items and properties. Alternatively, this task could be used to rethink this process more fundamentally and allow for implementing it in a clean way that supports both loading it for different entity types and both on mobile or desktop, all configurable.
  • The refactor ("rethinking this process" the above point mentions) will be done if it turns out to be a simpler task than implementing a "quick fix". Otherwise the refactoring will be made a separate task to be triaged accordingly.

Acceptance Criteria

  • Mobile page of Lexeme is rendered as expected
  • There are no Error: invalid entity serialization errors reported in the client

Details

Request ID
undefined
Request URL
https://m.wikidata.org/wiki/Lexeme:L136571

Event Timeline

Jdlrobson added a subscriber: Jdlrobson.

Suggested high priority since out of all our errors this is impacting the most unique IPs (1277 in last 24hrs, nearest is 68 Ips per 24hrs).

I'm suspecting this may have been introduced during https://gerrit.wikimedia.org/r/628047 / https://gerrit.wikimedia.org/r/628830 (for T259541, T228147, T261511) and think the ticket should be expedited.


Not only is there what appears to be an attempt to render termbox on a lexeme page (as the description states) but also an error

wikibase.entityPage.entityLoaded should only be loaded in conjunction with the right JS config (e.g. ParserOutputJsConfigBuilder)!

e.g. on https://m.wikidata.org/wiki/Lexeme:L136571?action=purge which indicates that OutputPageBeforeHTMLHookHandler, which usually deals with mapping entities to JS behavior, has lost its smarts.

So the error

wikibase.entityPage.entityLoaded should only be loaded in conjunction with the right JS config (e.g. ParserOutputJsConfigBuilder)!

seems to be surfacing another problem (T266224) but is, indirectly, also caused by termbox inappropriately being loaded.

WMDE-leszek set the point value for this task to 8.Oct 28 2020, 1:28 PM

Change 640933 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Only load termbox on Item and Property pages

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

Change 641163 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Register fake entity type in hook test

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

Change 640933 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Only load termbox on Item and Property pages

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

Change 641163 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Register fake entity type in hook test

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

WMDE-leszek added a subscriber: WMDE-leszek.

Confirm all good on beta site.