Page MenuHomePhabricator

TypeError: undefined is not an object (evaluating 'entry.serverTiming.forEach')
Closed, ResolvedPublicPRODUCTION ERROR

Description

See logstash. 8000 errors in the past 1 hr

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

What happens?:

What should have happened instead?:

Software version: MediaWiki 1.47.0-wmf.1

Other information: Vector-22 and Minerva

Event Timeline

Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptWed, May 6, 8:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
AnneT triaged this task as Unbreak Now! priority.Wed, May 6, 8:32 PM

this is happening here:
https://gerrit.wikimedia.org/g/mediawiki/extensions/TestKitchen/+/b9066f84f9931d42fe45be906e2b4ccab4a0f870/modules/ext.testKitchen/enrollmentConfig.js#233

maybe the quickest fix is guarding the entry.serverTiming before calling the forEach something like:

entries.forEach( ( entry ) => {
	if ( !entry.serverTiming ) {
		return;
	}

	entry.serverTiming.forEach( ( serverTimingEntry ) => {
		if ( serverTimingEntry.name === HEADER_NAME ) {
			result = serverTimingEntry.description;
		}
	} );
} );

Change #1283966 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/extensions/TestKitchen@master] UBN fix: guard entry.serverTiming before forEach

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

Change #1283966 merged by jenkins-bot:

[mediawiki/extensions/TestKitchen@master] UBN fix: guard entry.serverTiming before forEach

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

Change #1283972 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/extensions/TestKitchen@wmf/1.47.0-wmf.1] UBN fix: guard entry.serverTiming before forEach

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

Change #1283972 merged by jenkins-bot:

[mediawiki/extensions/TestKitchen@wmf/1.47.0-wmf.1] UBN fix: guard entry.serverTiming before forEach

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

Mentioned in SAL (#wikimedia-operations) [2026-05-06T22:08:11Z] <cjming@deploy1003> Started scap sync-world: Backport for [[gerrit:1283972|UBN fix: guard entry.serverTiming before forEach (T425591)]]

Mentioned in SAL (#wikimedia-operations) [2026-05-06T22:10:03Z] <cjming@deploy1003> cjming: Backport for [[gerrit:1283972|UBN fix: guard entry.serverTiming before forEach (T425591)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-05-06T22:14:36Z] <cjming@deploy1003> Finished scap sync-world: Backport for [[gerrit:1283972|UBN fix: guard entry.serverTiming before forEach (T425591)]] (duration: 06m 25s)

phuedx claimed this task.
phuedx subscribed.

Being bold.