Page MenuHomePhabricator

Some pages load unavailable modules: ext.tmh.player and ext.disambiguator
Closed, DeclinedPublicBUG REPORT

Description

Since first week of October 2022 I am monitoring the following message on browser console:

Skipped unavailable module ext.tmh.player

Since spring 2022 I noticed already:

Skipped unavailable module ext.disambiguator

I am not able to track them, and I have no idea who issued those messages. Meanwhile I checked all site and user JS. Nothing changed within the last weeks.

  • Therefore something in MW needs to be fixed.

I cannot identify which circumstances in page generation are the steps which triggered those warnings.

Event Timeline

Umherirrender subscribed.

Both modules are marked as ES6 (but months ago) and the warning has some comment in the code:

mediawiki.loader.js
				// This module is not currently known, or has invalid dependencies.
				//
				// Most likely due to a cached reference after the module was
				// removed, otherwise made redundant, or omitted from the registry
				// by the ResourceLoader "target" system or "requiresES6" flag.
				//
				// These errors can be comon common, e.g. queuing an ES6-only module
				// unconditionally from the server-side is OK and should fail gracefully
				// in ES5 browsers.
				mw.log.warn( 'Skipped unavailable module ' + modules[ i ] );

It is not tracked as an error, when everything is okay. Not sure if the warning is (still) needed in that case.

Krinkle subscribed.

@PerfektesChaos These warnings are expected and harmless when using an older browser. If you see this warning in a modern browser (e.g. during software development, beta testing, or on Wikipedia even after purging the page) then that is likely a bug. The bug would be with the feature that the module belongs to. ResourceLoader itself is only detecting and informing developers about the issue.

("Modern" browser as defined under mw:Compatibility § Grade A.).

Krinkle renamed this task from Unavailable modules reported to Some pages load unavailable modules: ext.tmh.player and ext.disambiguator.Oct 10 2022, 10:33 PM
Krinkle moved this task from Limbo to Watching on the Performance-Team (Radar) board.

Yeah, I perform CSS/JS developing with an aged browser. If it works with an old browser it works everywhere. Console is visible only on development there, and some debugging otherwise.

Then this error message is misleading and the mechanism should be improved. I would take a misspelled module name, or no longer or not yet existing module, or failed internal access. These ones are well known but cannot be loaded but they are available in repository.

ES6 features should be used iff really needed. There is a significant number of customers on this planet who cannot upgrade for various reasons. They should get a general impression of the wiki page. Even if some details and advanced functionalities do not work; they would not use them either.

Skipped unavailable module ext.tmh.player

[…] I perform CSS/JS developing with an aged browser. […] Console is visible only on development there, and some debugging otherwise.
[…] this error message is misleading and the mechanism should be improved […] These ones are well known but cannot be loaded but they are available in repository.

This message is only meant to be visible to developers. Thanks for confirming that. I'm open to new ways to describe this if you see some. However, note that In ResourceLoader terminology, "registry" and "available" have a specific meaning. I've improved documentation at https://www.mediawiki.org/wiki/ResourceLoader/Vocabulary to cover this.

ES6 features should be used iff really needed. There is a significant number of customers on this planet who cannot upgrade for various reasons.

I agree. Generally speaking, my stance is much stricter. I'm less worried about ES6 nowadays and more about the reliability and accessibility for JavaScript in general. Much of our ecosystem (Grade C browser mode, which can happen in Grade A browsers as well, e.g. on slow connections or when something fails for any reason), and external re-use (e.g. Kiwix, IPFS, Apple Dictionary) all render without our optional JS layer.

ES6 will soon become a requirement for this optional layer (T178356) regardless of which feature. This is why it is all the more important to ensure our "Basic" layer is as capable and equal as possible, with JS merely an optional layer over top for interactivity. https://www.mediawiki.org/wiki/Compatibility#Browsers.