Page MenuHomePhabricator

TypeError: Cannot read properties of undefined (reading 'getAttribute') in ve.ui.MWReferenceSearchWidget.buildIndex
Closed, ResolvedPublicPRODUCTION ERROR

Description

https://logstash.wikimedia.org/app/dashboards#/doc/logstash-*/logstash-default-1-7.0.0-1-2023.11.17?id=sVsA3osBaR9sTI-qcKq4
74 errors (so far) in last deploy branch.

at ve.ui.MWReferenceSearchWidget.buildIndex  https://en.wikipedia.org/w/load.php?lang=en&modules=ext.cite.visualEditor&skin=vector-2022&version=gq2ci:4:899
at ve.ui.CitoidInspector.setModePanel  https://en.wikipedia.org/w/load.php?lang=en&modules=ext.citoid.visualEditor&skin=vector-2022&version=1my3k:24:617
at ve.ui.CitoidInspector.onModeIndexSet  https://en.wikipedia.org/w/load.php?lang=en&modules=ext.citoid.visualEditor&skin=vector-2022&version=1my3k:23:685
at OO.EventEmitter.emit  https://en.wikipedia.org/w/load.php?lang=en&modules=oojs&skin=vector-2022&version=rwdvu:8:344
at OO.ui.IndexLayout.setTabPanel  https://en.wikipedia.org/w/load.php?lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=vector-2022&version=1ttx6:221:365
at OO.ui.IndexLayout.onTabSelectWidgetSelect  https://en.wikipedia.org/w/load.php?lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=vector-2022&version=1ttx6:217:717
at OO.EventEmitter.emit  https://en.wikipedia.org/w/load.php?lang=en&modules=oojs&skin=vector-2022&version=rwdvu:8:344
at OO.ui.SelectWidget.selectItem  https://en.wikipedia.org/w/load.php?lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=vector-2022&version=1ttx6:100:628
at OO.ui.SelectWidget.chooseItem  https://en.wikipedia.org/w/load.php?lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=vector-2022&version=1ttx6:101:194
at OO.ui.SelectWidget.onDocumentMouseUp  https://en.wikipedia.org/w/load.php?lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=vector-2022&version=1ttx6:91:932

Steps to replicate the issue (include links if applicable):

What happens?:

What should have happened instead?:

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Related stack trace:

at VeCeMWReferencesListNode.eval  https://en.wikipedia.org/w/load.php?lang=en&modules=ext.cite.visualEditor.core&skin=vector-2022&version=1202n:27:36
at ve.ce.MWReferencesListNode.update  https://en.wikipedia.org/w/load.php?lang=en&modules=ext.cite.visualEditor.core&skin=vector-2022&version=1202n:26:600
at later  https://en.wikipedia.org/w/load.php?lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=vector-2022&version=1ttx6:3:152

Change #1018175 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Cite@master] Add safe-guard to ReferenceSearchWidget.buildIndex

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

I had a first look:

  • This happens in a spot where the InternalList data structure is deconstructed. There is an .indexOrder array of integers. The numbers in this array point to elements in .firstNodes.
  • It appears like these two parts of the data structure don't match and one of the elements in .firstNodes is missing.
  • As far as I understand this is a secondary data structure managed by VE. I suspect a recent change in either VE or Parsoid to be responsible. Maybe T214241?
  • I checked the history of ve.ui.MWReferenceSearchWidget.js but couldn't spot any suspicious code change. I have a few more changes prepared for the same class, but these aren't merged yet.

(Let's keep this task and solve the root issue after the production error is worked-around.)

Change #1018175 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Add safe-guard to ReferenceSearchWidget.buildIndex

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

No errors in last 30 days. Did this get fixed by above change?

Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptMar 20 2025, 10:05 PM
thiemowmde claimed this task.