Page MenuHomePhabricator

Nav timing throws exception on Safari "TypeError: entryTypes contained only unsupported types"
Closed, ResolvedPublic

Description

[Error] TypeError: entryTypes contained only unsupported types
	observe (index.php:75:735)
	setupPaintTimingObserver (Script Element 1:75:735)
	emitNavigationTimingWithOversample (Script Element 1:83:646)
	emitNavigationTiming (Script Element 1:83:763)
	loadCallback (Script Element 1:87:167)

I wasn't sure at first whether it's a console.error that logs a trace or actually throws, but looks like it is a real throw.

observer = new PerformanceObserver(function () {});
observer.observe({
  entryTypes: ['paint']
});
console.log('yay');

In Safari, this doesn't reach the console.log() call.

I suspect this means latest master won't collect any navtiming events as setupPaintTimingObserver() will throw before logEvent('NavigationTiming', event); is reached.

Details

Related Gerrit Patches:
mediawiki/extensions/NavigationTiming : wmf/1.33.0-wmf.19Don't assume PerformanceObserver entry types are supported
mediawiki/extensions/NavigationTiming : masterDon't assume PerformanceObserver entry types are supported

Event Timeline

Krinkle created this task.Feb 26 2019, 11:17 PM
Restricted Application added a project: Performance-Team. · View Herald TranscriptFeb 26 2019, 11:17 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Gilles claimed this task.Feb 27 2019, 10:05 AM
Gilles triaged this task as High priority.

Change 493178 had a related patch set uploaded (by Gilles; owner: Gilles):
[mediawiki/extensions/NavigationTiming@master] Don't assume PerformanceObserver entry types are supported

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

It's definitely real. The paint entryType is part of the Paint Timing spec, and not the PerformanceObserver spec itself. It's perfectly valid for a browser to implement the latter and not the former.

Change 493227 had a related patch set uploaded (by Krinkle; owner: Gilles):
[mediawiki/extensions/NavigationTiming@wmf/1.33.0-wmf.19] Don't assume PerformanceObserver entry types are supported

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

Change 493178 merged by jenkins-bot:
[mediawiki/extensions/NavigationTiming@master] Don't assume PerformanceObserver entry types are supported

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

Change 493227 merged by jenkins-bot:
[mediawiki/extensions/NavigationTiming@wmf/1.33.0-wmf.19] Don't assume PerformanceObserver entry types are supported

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

Mentioned in SAL (#wikimedia-operations) [2019-02-28T09:37:22Z] <gilles@deploy1001> Synchronized php-1.33.0-wmf.19/extensions/NavigationTiming/modules/ext.navigationTiming.js: T217210 Don't assume PerformanceObserver entry types are supported (duration: 00m 54s)

Gilles closed this task as Resolved.Feb 28 2019, 9:49 AM