Page MenuHomePhabricator

TypeError: Cannot read properties of undefined (reading 'length')
Closed, InvalidPublicPRODUCTION ERROR


TypeError: Cannot read properties of undefined (reading 'length')
at HTMLDocument.<anonymous>  <anonymous>:311:4017
at mightThrow
at process

25 in last 12 hours

188 in last 30 days


T296614 might be related?

Event Timeline

Jdlrobson subscribed.

The stack traces are not very useful here, but the majority are coming from a Chinese Wikipedia gadget,,,*, and a Object.window.mirokado.loadit script.

The ones that remain are only occurring on Special:Book, Special:Contributions and Special:ContentTranslation. Untagging our backlog as we don't maintain any of these pages.

The ContentTranslation stack trace is a little more useful:

at  URL1:171:354
at  URL1:170:703
at VeUiCXTransclusionContextItem.VeUiMWTransclusionContextItem  URL1:274:391
at VeUiCXTransclusionContextItem  URL2:552:551
at VeUiContextItemFactory.OO.Factory.create  <anonymous>:426:592
at  URL3:622:919
at  URL3:622:628
at  URL3:625:765
at  URL3:1186:385
at  URL4:807:116
	input-kafka-clienterror-codfw, kafka, es, es, throttle-exempt, normalized_message_untrimmed


Marking as low, as number of errors is < 100.

Krinkle removed a project: ContentTranslation.
Krinkle subscribed.

This task seems to be about the ones coming from the zhwiki gadget, since the reported trace is about eval'ed user scripts running on special pages that are not related to CX.

The CX trace is not related, other than that it too contains code where the word "length" appears somewhere in an undefined property. e.g. fooArray.length. Arrays are common in JavaScript. We generally don't use the same task for different instances of the same programmer mistake in multiple/unrelated code bases.

The CX issue is tracked at T296614 already. For issues with gadgets, and more generally issues with low incidence rate, it is probably not worth keeping a task open for as it isn't actionable and has no teams associated with it.